New · for AI agents

Colors for your AI assistant

Connect Swatchly's free MCP server, or install it as a skill, and your assistant can convert colors, generate palettes, check WCAG and APCA contrast, name colors and export Tailwind — correctly, instead of guessing. No API key, no account.

1. Connect the MCP server

One endpoint, any MCP client (Streamable HTTP, no auth):

https://swatchly.xyz/mcp

Claude Code

Run once in your terminal:

claude mcp add --transport http swatchly https://swatchly.xyz/mcp

Cursor

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "swatchly": { "url": "https://swatchly.xyz/mcp" }
  }
}

VS Code (Copilot agent mode)

Add to .vscode/mcp.json:

{
  "servers": {
    "swatchly": { "type": "http", "url": "https://swatchly.xyz/mcp" }
  }
}

OpenAI Codex CLI

Add to ~/.codex/config.toml (recent versions; older ones can use the bridge below):

[mcp_servers.swatchly]
url = "https://swatchly.xyz/mcp"

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "swatchly": { "serverUrl": "https://swatchly.xyz/mcp" }
  }
}

Claude Desktop & other stdio-only clients

Bridge the remote server with mcp-remote (or add it as a custom connector where your plan supports it):

{
  "mcpServers": {
    "swatchly": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://swatchly.xyz/mcp"]
    }
  }
}

Test it from a terminal

curl -s https://swatchly.xyz/mcp \
  -H 'content-type: application/json' -H 'accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"check_contrast","arguments":{"foreground":"#1b264f","background":"#f4e9cd"}}}'

2. Install the skill (optional, recommended)

A skill teaches your assistant when and how to use Swatchly. It's a single small file.

Claude Code

Personal skill (all projects), or use .claude/skills for one project:

mkdir -p ~/.claude/skills/swatchly-color && \
  curl -fsSL https://swatchly.xyz/ai/skill/SKILL.md -o ~/.claude/skills/swatchly-color/SKILL.md

# or, project-only:
mkdir -p .claude/skills/swatchly-color && \
  curl -fsSL https://swatchly.xyz/ai/skill/SKILL.md -o .claude/skills/swatchly-color/SKILL.md

Cursor

Adds an agent-requested rule:

mkdir -p .cursor/rules && \
  curl -fsSL https://swatchly.xyz/ai/skill/swatchly.mdc -o .cursor/rules/swatchly.mdc

Codex, Copilot, Aider & others

Appends to your AGENTS.md (read by Codex and most coding agents):

curl -fsSL https://swatchly.xyz/ai/skill/AGENTS.md >> AGENTS.md

View the files: SKILL.md · Cursor rule · AGENTS.md snippet. They only contain instructions and public URLs.

What your assistant can do

ToolWhat it does
get_colorGet everything about a color
Full details for one color: HEX/RGB/HSL/HSV/HWB/CMYK/Lab/LCh/Luv/OKLab/OKLCH values, nearest color name, hue family, temperature, contrast on white/black, shades, tints, tones, harmonies (complementary, triadic, ...) and color-blindness simulations including dog vision.
convert_colorConvert a color between formats
Convert one color between HEX, RGB, HSL, HSV, HWB, CMYK, XYZ, Lab, LCh, Luv, OKLab and OKLCH.
generate_paletteGenerate a color palette
Generate a harmonious palette in the OKLCH color space.
check_contrastCheck text/background contrast
WCAG 2.2 contrast ratio with AA/AAA verdicts for normal and large text and UI components, plus the APCA Lc value (WCAG 3 draft).
fix_contrastFix a failing color pair
Lighten or darken one color (keeping its hue) until the pair reaches a target contrast ratio.
name_colorName a color
The closest human name for a color (from ~5,000 named colors), the match distance and similar names.
search_color_namesSearch color names
Find named colors and their HEX codes by a word, e.g.
export_paletteExport a palette as code
Turn a palette into ready-to-paste code in 30+ formats: CSS variables and gradients, SCSS, Less, Tailwind (v3 config or v4 @theme with 50-950 scales), design tokens (W3C DTCG, Tokens Studio, Style Dictionary), SwiftUI, UIKit, Jetpack Compose, Android XML, Flutter, Unity, TypeScript, Python, R, Markdown, JSON, CSV and palette files (GIMP .gpl, JASC .pal, Paint.NET, Lospec .hex).
tailwind_scaleTailwind 50-950 scale
Build a Tailwind-style 50-950 color scale from one brand color (the color is kept at its natural step), plus copy-ready Tailwind v4 @theme CSS.
simulate_color_blindnessSimulate color blindness
See how colors look to people with protanopia, protanomaly, deuteranopia, deuteranomaly, tritanopia, tritanomaly, achromatopsia, achromatomaly - or to a dog ('dog').
random_colorsRandom colors
Random colors in a chosen style.
browse_palettesBrowse curated palettes
Search Swatchly's ~3,700 curated palettes, filtered by style (pastel, dark, vintage, neon, warm, cool, earthy, muted, monochromatic, gradient...) or color family (red, blue, green...).
make_gradientGradient steps between two colors
Evenly spaced colors between two colors, blended in perceptual OKLab, plus a CSS linear-gradient using OKLCH interpolation.
color_of_the_yearPantone Color of the Year
Pantone Colors of the Year since 2000 with approximate HEX codes and a matching palette for each.

Try asking

  • “Make a 5-color palette around #264653 and give me the Tailwind v4 theme.”
  • “Does white text on #e9c46a pass WCAG AA? If not, fix it.”
  • “Convert oklch(70% 0.15 30) to HEX and tell me what the color is called.”
  • “Will my palette work for people with deuteranopia? What about my dog?”
  • “Give me three pastel palettes from Swatchly's library.”

FAQ

What is the Swatchly MCP server?

A free remote Model Context Protocol server that lets AI assistants such as Claude, Cursor, Copilot and Codex call Swatchly's color tools directly: convert colors, generate palettes, check contrast, export Tailwind and more. Connect it with one command or a short config snippet.

Do I need an API key or an account?

No. The MCP server, the skills and the REST API are free and keyless.

What is the difference between the MCP server and a skill?

The MCP server gives your assistant callable tools. A skill is a short instruction file that tells the assistant when and how to use Swatchly — through the MCP server if it's connected, or the REST API with curl otherwise. Using both works best.

Does the MCP server store my prompts?

Swatchly doesn't store the colors or arguments you send. Standard Cloudflare request logs apply. All tools are read-only.

Is there a rate limit?

There is no key-based limit, but please follow fair use: responses are deterministic and cached at the edge, so cache on your side and avoid tight loops.

Is the color engine open source?

Yes. The engine behind the site, the API and the MCP server is the MIT-licensed swatchly-color crate on GitHub.