{
  "serverInfo": {
    "name": "contrastkit",
    "title": "ContrastKit",
    "version": "0.1.0"
  },
  "description": "WCAG color contrast checker, nearest accessible color, CSS color conversion and palette checks. No API key: about 60 checks per minute per IP.",
  "homepage": "https://contrastkit.mike-tusa.workers.dev/",
  "contact": {
    "email": "digitalpromohub.support@gmail.com"
  },
  "transport": {
    "type": "streamable-http",
    "url": "https://contrastkit.mike-tusa.workers.dev/mcp"
  },
  "protocolVersions": [
    "2026-07-28",
    "2025-11-25",
    "2025-06-18",
    "2025-03-26",
    "2024-11-05"
  ],
  "capabilities": {
    "tools": {
      "listChanged": false
    }
  },
  "authentication": {
    "required": false
  },
  "instructions": "ContrastKit checks color contrast against WCAG 2.x (the ratio used by WCAG 2.0, 2.1 and 2.2 success criteria 1.4.3, 1.4.6 and 1.4.11), finds the nearest passing color, converts CSS colors and checks every pair in a palette. Colors: #rgb, #rrggbb, #rrggbbaa, rgb(), hsl() (comma or space syntax, optional alpha) or CSS color names. Levels: aa (4.5:1, normal text), aa-large (3:1, 18pt or 14pt bold), aaa (7:1), aaa-large (4.5:1), ui (3:1, non-text UI components and graphics). Ratios are reported floored to 2 decimals and pass/fail never rounds up (4.49:1 fails AA). Translucent foregrounds are blended over the background; translucent backgrounds over white. Use check_contrast for a pass/fail, suggest_accessible_color to fix a failing pair, convert_color for hex/rgb/hsl/luminance, check_palette for up to 12 colors. Pure computation, nothing stored, no network calls. No API key: about 60 checks per minute per IP.",
  "tools": [
    {
      "name": "check_contrast",
      "title": "Check WCAG color contrast",
      "description": "Compute the WCAG 2.x contrast ratio between a text (foreground) color and a background color, with pass/fail for AA, AA large text, AAA, AAA large text and non-text UI (3:1). Handles translucent colors. Read-only. Same engine as GET /api/contrast.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "foreground": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Text / foreground color as a CSS color: \"#1a73e8\", \"#fff\", \"rgb(26 115 232)\", \"hsl(217 80% 51%)\", \"rgba(0,0,0,.6)\" or a name like \"navy\"."
          },
          "background": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Background color as a CSS color: \"#1a73e8\", \"#fff\", \"rgb(26 115 232)\", \"hsl(217 80% 51%)\", \"rgba(0,0,0,.6)\" or a name like \"navy\"."
          }
        },
        "required": [
          "foreground",
          "background"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "foreground": {
            "type": "object",
            "properties": {
              "hex": {
                "type": "string"
              },
              "rgb": {
                "type": "string"
              },
              "hsl": {
                "type": "string"
              },
              "alpha": {
                "type": "number"
              },
              "luminance": {
                "type": "number"
              }
            },
            "required": [
              "hex",
              "rgb",
              "hsl",
              "alpha",
              "luminance"
            ]
          },
          "background": {
            "type": "object",
            "properties": {
              "hex": {
                "type": "string"
              },
              "rgb": {
                "type": "string"
              },
              "hsl": {
                "type": "string"
              },
              "alpha": {
                "type": "number"
              },
              "luminance": {
                "type": "number"
              }
            },
            "required": [
              "hex",
              "rgb",
              "hsl",
              "alpha",
              "luminance"
            ]
          },
          "effectiveForeground": {
            "type": "string"
          },
          "effectiveBackground": {
            "type": "string"
          },
          "ratio": {
            "type": "number"
          },
          "ratioExact": {
            "type": "number"
          },
          "pass": {
            "type": "object",
            "properties": {
              "aa": {
                "type": "boolean"
              },
              "aa_large": {
                "type": "boolean"
              },
              "aaa": {
                "type": "boolean"
              },
              "aaa_large": {
                "type": "boolean"
              },
              "ui": {
                "type": "boolean"
              }
            },
            "required": [
              "aa",
              "aa_large",
              "aaa",
              "aaa_large",
              "ui"
            ]
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "ratio",
          "pass",
          "notes",
          "version"
        ]
      },
      "annotations": {
        "title": "Check WCAG color contrast",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "suggest_accessible_color",
      "title": "Suggest the nearest accessible color",
      "description": "For a failing color pair, find the closest color (same hue and saturation, lightness changed as little as possible) that meets the chosen WCAG level. Adjust the foreground (default), the background, or both (best first). Read-only. Same engine as GET /api/suggest.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "foreground": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Text / foreground color as a CSS color: \"#1a73e8\", \"#fff\", \"rgb(26 115 232)\", \"hsl(217 80% 51%)\", \"rgba(0,0,0,.6)\" or a name like \"navy\"."
          },
          "background": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Background color as a CSS color: \"#1a73e8\", \"#fff\", \"rgb(26 115 232)\", \"hsl(217 80% 51%)\", \"rgba(0,0,0,.6)\" or a name like \"navy\"."
          },
          "level": {
            "type": "string",
            "enum": [
              "aa",
              "aa-large",
              "aaa",
              "aaa-large",
              "ui"
            ],
            "default": "aa",
            "description": "WCAG target: aa 4.5:1 (default), aa-large 3:1, aaa 7:1, aaa-large 4.5:1, ui 3:1 (non-text)."
          },
          "adjust": {
            "type": "string",
            "enum": [
              "foreground",
              "background",
              "both"
            ],
            "default": "foreground",
            "description": "Which color may change."
          }
        },
        "required": [
          "foreground",
          "background"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "foreground": {
            "type": "object",
            "properties": {
              "hex": {
                "type": "string"
              },
              "rgb": {
                "type": "string"
              },
              "hsl": {
                "type": "string"
              },
              "alpha": {
                "type": "number"
              },
              "luminance": {
                "type": "number"
              }
            },
            "required": [
              "hex",
              "rgb",
              "hsl",
              "alpha",
              "luminance"
            ]
          },
          "background": {
            "type": "object",
            "properties": {
              "hex": {
                "type": "string"
              },
              "rgb": {
                "type": "string"
              },
              "hsl": {
                "type": "string"
              },
              "alpha": {
                "type": "number"
              },
              "luminance": {
                "type": "number"
              }
            },
            "required": [
              "hex",
              "rgb",
              "hsl",
              "alpha",
              "luminance"
            ]
          },
          "effectiveForeground": {
            "type": "string"
          },
          "effectiveBackground": {
            "type": "string"
          },
          "ratio": {
            "type": "number"
          },
          "ratioExact": {
            "type": "number"
          },
          "pass": {
            "type": "object",
            "properties": {
              "aa": {
                "type": "boolean"
              },
              "aa_large": {
                "type": "boolean"
              },
              "aaa": {
                "type": "boolean"
              },
              "aaa_large": {
                "type": "boolean"
              },
              "ui": {
                "type": "boolean"
              }
            },
            "required": [
              "aa",
              "aa_large",
              "aaa",
              "aaa_large",
              "ui"
            ]
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "version": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "target": {
            "type": "number"
          },
          "adjust": {
            "type": "string"
          },
          "alreadyPasses": {
            "type": "boolean"
          },
          "suggestions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "adjust": {
                  "type": "string"
                },
                "color": {
                  "type": "object",
                  "properties": {
                    "hex": {
                      "type": "string"
                    },
                    "rgb": {
                      "type": "string"
                    },
                    "hsl": {
                      "type": "string"
                    },
                    "alpha": {
                      "type": "number"
                    },
                    "luminance": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "hex",
                    "rgb",
                    "hsl",
                    "alpha",
                    "luminance"
                  ]
                },
                "ratio": {
                  "type": "number"
                },
                "lightnessChange": {
                  "type": "number"
                }
              }
            }
          }
        },
        "required": [
          "ratio",
          "target",
          "alreadyPasses",
          "suggestions",
          "version"
        ]
      },
      "annotations": {
        "title": "Suggest an accessible color",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "convert_color",
      "title": "Convert a CSS color",
      "description": "Convert a CSS color to hex, rgb() and hsl(), with its relative luminance, its contrast on white and on black, and the better text color (black or white) to put on it. Read-only. Same engine as GET /api/convert.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "color": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Color as a CSS color: \"#1a73e8\", \"#fff\", \"rgb(26 115 232)\", \"hsl(217 80% 51%)\", \"rgba(0,0,0,.6)\" or a name like \"navy\"."
          }
        },
        "required": [
          "color"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "input": {
            "type": "string"
          },
          "hex": {
            "type": "string"
          },
          "rgb": {
            "type": "string"
          },
          "hsl": {
            "type": "string"
          },
          "alpha": {
            "type": "number"
          },
          "luminance": {
            "type": "number"
          },
          "contrastOnWhite": {
            "type": "number"
          },
          "contrastOnBlack": {
            "type": "number"
          },
          "bestTextColor": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "hex",
          "luminance",
          "bestTextColor",
          "version"
        ]
      },
      "annotations": {
        "title": "Convert a CSS color",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "check_palette",
      "title": "Check every pair in a palette",
      "description": "Contrast ratio for every pair of 2 to 12 colors (up to 66 pairs), highest first, each flagged against the chosen WCAG level. Use it to see which brand colors can be used together for text. Read-only. Same engine as GET /api/palette.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "colors": {
            "type": "array",
            "minItems": 2,
            "maxItems": 12,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Palette color as a CSS color: \"#1a73e8\", \"#fff\", \"rgb(26 115 232)\", \"hsl(217 80% 51%)\", \"rgba(0,0,0,.6)\" or a name like \"navy\"."
            },
            "description": "2 to 12 CSS colors."
          },
          "level": {
            "type": "string",
            "enum": [
              "aa",
              "aa-large",
              "aaa",
              "aaa-large",
              "ui"
            ],
            "default": "aa",
            "description": "WCAG target: aa 4.5:1 (default), aa-large 3:1, aaa 7:1, aaa-large 4.5:1, ui 3:1 (non-text)."
          }
        },
        "required": [
          "colors"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "level": {
            "type": "string"
          },
          "target": {
            "type": "number"
          },
          "colors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "count": {
            "type": "integer"
          },
          "passing": {
            "type": "integer"
          },
          "pairs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "a": {
                  "type": "string"
                },
                "b": {
                  "type": "string"
                },
                "ratio": {
                  "type": "number"
                },
                "passes": {
                  "type": "boolean"
                }
              }
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "pairs",
          "count",
          "passing",
          "version"
        ]
      },
      "annotations": {
        "title": "Check a palette",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    }
  ]
}