Accessible Color Contrast MCP logo

Accessible Color Contrast MCP

Community
ryelle

A simple MCP (Model Context Protocol) server for checking accessible color pairings.

Publisherryelle
Repositorya11y-color-contrast-mcp
LanguageTypeScript
Forks
1
Stars
2
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Accessible Color Contrast MCP exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    2 stars and 1 forks from the linked repository.

Accessible Color Contrast MCP

A simple MCP (Model Context Protocol) server for checking accessible color pairings. This uses the WCAG (Web Content Accessibility Guidelines) contrast algorithm to calculate real contrast ratios, which can inform your AI when working with colors.

More about WCAG Contrast requirements

Setup

Add this to your AI platform:

json
{
	"mcpServers": {
		"accessibility": {
			"command": "npx",
			"args": ["-y", "a11y-color-contrast-mcp"]
		}
	}
}

Note, if you use nvm, you might need to use the path to the correct node and npx versions (24), for example:

json
"accessibility": {
  "command": "/path-user-home/.nvm/versions/node/v24.12.0/bin/node",
  "args": ["/path-user-home/.nvm/versions/node/v24.12.0/bin/npx", "-y", "a11y-color-contrast-mcp"]
}

Example Usage

  • What is the contrast between #481bef and #c3eecb?
  • If I have a background color #22d3ee, should I use light or dark text on it?
  • What color text should I use for a background #6a4ba7 if I need to meet WCAG AAA level support?
  • Can you suggest 3 color pairs that are accessible? The colors should not be black or white, and should be reminiscent of fall.

Available Tools

Get Color Contrast

Get the WCAG contrast value between two colors.

Parameters

  • colorA (required): First color (hex, rgb, hsl, or named color).
  • colorB (required): Second color (hex, rgb, hsl, or named color).

Are Colors Accessible

Test two colors for WCAG accessible contrast.

Parameters

  • colorA: First color (hex, rgb, hsl, or named color).
  • colorB: Second color (hex, rgb, hsl, or named color).
  • level: WCAG level to test against, AA or AAA. Default "AA".
  • size: Font size of text, larger font has a lower threshold. Can be small or large. Default "small".

Use Light or Dark

Detect whether to pair a light or dark color against a given color for best contrast.

Parameters

  • color: Color (hex, rgb, hsl, or named color).
  • level: WCAG level to test against, AA or AAA. Default "AA".
  • size: Font size of text, larger font has a lower threshold. Can be small or large. Default "small".

Development

This package contains a stdio and an http server, though the stdio is the recommended method for interacting with it.

Requirements

  • Node 18+

Install the dependencies with npm install. The MCP server itself lives in src/server.ts, with the stdio server in index.ts and the http server in http.ts.

Scripts

  • npm run build: Builds the src files into build.
  • npm run stdio: Builds the src files, then starts the stdio server.
  • npm run http: Builds the src files, then starts the http server.
  • npm run test: Run the Jest tests.

http server

This is a work in progress while I figure out if it's worth setting up as a remote server. For now, it's developer-only. Once running (see above), you can access this on port 3000.

Here's an example interaction you can test with a tool like Insomnia.

POST http://localhost:3000/mcp

json
{
	"jsonrpc": "2.0",
	"method": "tools/call",
	"params": {
		"name": "get-color-contrast",
		"arguments": {
			"colorA": "#ff0000",
			"colorB": "#ffffff"
		}
	},
	"id": 1
}
HTTP/1.1 200 OK
Content-Type: text/event-stream

event: message
data: {"result":{"content":[{"type":"text","text":"4.00"}]},"jsonrpc":"2.0","id":1}

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "accessibility": {
      "command": "npx",
      "args": [
        "-y",
        "a11y-color-contrast-mcp"
      ]
    }
  }
}

Use Accessible Color Contrast MCP MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Accessible Color Contrast MCP is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Accessible Color Contrast MCP as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Accessible Color Contrast MCP MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "accessible-color-contrast-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "a11y-color-contrast-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Accessible Color Contrast MCP MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Accessible Color Contrast MCP MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Accessible Color Contrast MCP to help me with this task?
Accessible Color Contrast MCP
Sure. I read it.
Here is what I found using Accessible Color Contrast MCP.

Frequently asked questions

What is the Accessible Color Contrast MCP MCP server used for?

Accessible Color Contrast MCP is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Accessible Color Contrast MCP MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Accessible Color Contrast MCP with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Accessible Color Contrast MCP MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Accessible Color Contrast MCP connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Accessible Color Contrast MCP MCP to TypingMind?

Accessible Color Contrast MCP runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Accessible Color Contrast MCP MCP provide in TypingMind?

Accessible Color Contrast MCP exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Accessible Color Contrast MCP MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Accessible Color Contrast MCP requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇