Skip to content

MCP for agents

Give your agent color tools.

Generate a palette, measure contrast, and return an editable result through MCP.

Connect your client

Add https://colorbox.io/mcp as a remote MCP server using Streamable HTTP. The public tools require no account or API key.

This is a common configuration shape; your client may use a connection screen or different keys. Use a client that supports remote Streamable HTTP. The endpoint accepts MCP POST requests; visiting it in a browser returns a 405 information response.

Example client configuration
{
  "mcpServers": {
    "colorbox": {
      "url": "https://colorbox.io/mcp"
    }
  }
}

generate_palette

Generate an sRGB scale with the OKLCH engine. The result includes name, seed, colors (step and hex), CSS variables, a reviewUrl, and a usage note.

The seed guides hue and chroma. It is not guaranteed to appear as an exact step, and generated colors are not automatically suitable for text on every background.

seed
Required. #RRGGBB, including the #.
name
Optional, default brand. A lowercase letter followed by up to 39 lowercase letters, digits, or hyphens.
steps
Optional integer from 2 to 16; default 9.
Tool arguments
{ "seed": "#2563eb", "name": "brand", "steps": 9 }

check_contrast

Measure one opaque foreground/background pair. Returns foreground, background, ratio, minimum, passes, and scope. The minimum is 4.5:1. Colors accept six-digit hex or in-gamut OKLCH.

Tool arguments
{ "foreground": "#000000", "background": "#ffffff" }

repair_text_contrast

Find a foreground for one to eight fixed backgrounds. Supply an optional CSS token to get a declaration. The result uses unchanged, repaired, or blocked status, with measured checks for each surface. A blocked result has no suggested color.

This tool proposes a change; it does not edit your files.

Tool arguments
{
  "foreground": "#666666",
  "backgrounds": ["#0f0f0f", "#242424"],
  "token": "--muted-foreground"
}

A useful agent workflow

Ask your agent to generate a scale, assign text and surface roles, check each pair, and return CSS plus the reviewUrl. Open the link to adjust or save the palette.

Tool output includes structuredContent and a JSON text content block. Treat blocked results as a reason to review the design, not permission to apply a missing or failing value.

Try this prompt
Use Colorbox to generate a nine-step brand palette from #2563eb.
Suggest text colors for white and #0f0f0f backgrounds, and check
each pair. Give me CSS variables, measured contrast ratios,
and the palette review link.

Limits and account access

MCP is configured for 16 requests per 10 minutes per IP at the hosting layer. Protocol requests can count toward that allowance. Back off on HTTP 429 and honor Retry-After when present. POST bodies are limited to 32 KiB.

The endpoint rejects unrelated browser origins. Connect through a compatible agent client rather than calling it directly from a third-party web page.

Public tools cannot read or write user accounts or saved palettes. Review links contain palette values; anyone with a link can read them. Generation does not save a project.