home / mcp / color converter mcp server

Color Converter MCP Server

A comprehensive Model Context Protocol (MCP) server for color conversion, manipulation, analysis, and accessibility, designed for AI coding agents and assistants. This server provides a complete color toolkit for design systems, web development, and accessibility compliance using the `colorizr` library.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bennyzen-mcp-color-convert": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-color-convert@latest"
      ]
    }
  }
}

You set up an MCP server that provides a full color toolkit for conversion, manipulation, analysis, and accessibility. This server integrates with your development workflow so AI agents can convert colors between formats, adjust hues and saturation, analyze contrast, and generate harmonious palettes across design systems and web projects.

How to use

You use this MCP server by connecting an MCP client to the color converter service. Install the server locally or run it through your agent’s configuration, then issue color operations through your agent. You can convert colors between formats, adjust lightness or saturation, analyze contrast, and generate palettes or swatches. The tools work with common formats such as HEX, RGB(A), HSL(A), OkLCH, and OkLab, and preserve or remove alpha as appropriate when converting between formats.

How to install

Prerequisites you need before installing include Node.js 18 or newer and a working npm setup. You will run the installation and start commands locally and configure your MCP client to talk to the server.

Step-by-step setup to run the server via a local MCP client configuration is shown here. Copy these blocks exactly into your setup and adjust paths if needed.

Additional notes

The server supports a wide range of color formats for input and output. Alpha values are preserved when converting between alpha-capable formats and removed when converting to formats that do not support alpha.

To test the server locally, you can run the provided dry-run test command and then integrate with your MCP client to verify each tool’s behavior, such as converting a color to a different format, lightening a color, or generating a design system swatch.

Troubleshooting and tips

If the server won’t start, ensure Node.js 18+ is installed and try reinstalling dependencies. If your MCP client cannot connect, restart the client after changes and verify the start command for the local server.

When testing color operations, verify that you are using supported input formats and correct alpha syntax for the chosen output format.

Available tools

convert

Universal color format converter that accepts hex, rgb(a), hsl(a), oklch, oklab, and named colors, and outputs in hex, rgb, hsl, oklch, or oklab with alpha preserved when applicable.

lighten

Increase the lightness of a color by a specified percentage.

darken

Decrease the lightness of a color by a specified percentage.

saturate

Increase the color saturation by a specified percentage.

desaturate

Decrease the color saturation by a specified percentage.

invert

Rotate the hue by 180 degrees to produce the complementary color.

grayscale

Convert a color to grayscale using perceptual OkLCH space.

rotate

Rotate the hue around the color wheel by a given degree amount.

luminance

Compute WCAG relative luminance (brightness) of a color.

chroma

Measure color intensity or purity on the color scale.

opacity

Extract the alpha/opacity value from a color that supports transparency.

name

Return a common color name or its hex value if unnamed.

palette

Generate a harmonious 6-color palette based on a base color.

scheme

Create color harmonies such as complementary, triadic, or tetradic schemes.

swatch

Produce an 11-step design system swatch from a base color.

random

Generate a random color in a specified output format.

contrast

Calculate WCAG contrast ratio between two colors.

compare

Provide a full WCAG compliance analysis with recommendations.

text_color

Suggest the optimal text color (black or white) for a given background.

is_valid_color

Validate whether a color string is parseable by the system.