WCAG Color Contrast MCP Server

WCAG Color Contrast MCP Server

Enables accurate WCAG color contrast checking and accessibility analysis by calculating actual contrast ratios between color pairs, checking compliance levels, and analyzing luminance values for web accessibility.

Category
Visit Server

README

WCAG MCP Server

A Model Context Protocol (MCP) server for WCAG color contrast checking and accessibility analysis. Built with Bun, TypeScript, and Culori.

Rationale

LLMs will attempt to give you WCAG contrast scores for color pairs, but they are often inaccurate because the LLM is not running the actual equations for determine contrast between colors. This MCP server provides that capability.

Demo of WCAG MCP Server

Quick Start

# Install
bun install

# Build and run
bun run build
bun run start

MCP Configuration

Add to your MCP client configuration:

{
  "mcpServers": {
    "wcag": {
      "command": "bun",
      "args": ["run", "start"],
      "cwd": "/path/to/wcag"
    }
  }
}

Tools

analyze_contrast

Calculate WCAG contrast ratio between two colors.

{
  "foreground": "red", 
  "background": "white"
}

Returns ratio, compliance levels, and color details.

get_color_luminance

Get color luminance value and format conversions.

{
  "color": "#3366cc"
}

Returns luminance and formatted color values.

check_wcag_compliance

Check specific WCAG compliance.

{
  "foreground": "#666666",
  "background": "#ffffff", 
  "level": "AA",
  "textSize": "normal"
}

batch_contrast

Analyze multiple color pairs.

{
  "colorPairs": [
    {"foreground": "red", "background": "white", "label": "Error text"},
    {"foreground": "blue", "background": "gray", "label": "Link"}
  ]
}

Color Formats

Supports any format Culori can parse:

  • Hex: #ff0000, #f00
  • CSS: rgb(255,0,0), hsl(0,100%,50%)
  • Named: red, blue, white
  • Modern: oklch(0.7 0.15 180)

WCAG Standards

Level Normal Text Large Text
AA 4.5:1 3:1
AAA 7:1 4.5:1

Development

bun run dev   # Development with hot reload
bun run build # Build for production  
bun run test-server  # Test the mcp server

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured