Skip to main content
Glama
coryking

Behr Colormapper MCP

by coryking
README.md
# Behr Colormapper MCP

A public, stateless MCP server that converts digital sRGB colors into the nearest Behr paint colors and searches Behr colors by code or name. Matching uses CIEDE2000 perceptual distance in CIE Lab space.

## MCP endpoint

`https://behr-colormapper.coryking.workers.dev/mcp`

The endpoint uses Streamable HTTP with JSON responses and requires no authentication. The Worker root is reserved for a human-facing project page.

## Tools

- `behr_match_paint` accepts `#RGB`, `#RRGGBB`, `rgb(r,g,b)`, bare `r,g,b`, and `hsl(h,s%,l%)`. It returns canonical RGB, hex, and Lab input values plus nearest Behr colors ranked by CIEDE2000 delta E.
- `behr_search_colors` searches exact or partial Behr codes and names, ranking exact codes first.

Both tools exclude archived colors unless `include_archived` is true. Their Zod contracts provide MCP input/output JSON Schemas. They are marked read-only, non-destructive, idempotent, and closed-world.

Published screen colors approximate physical paint. Confirm consequential choices with a physical sample under the intended lighting.

## Catalog source

[`data/behr.json`](data/behr.json) is the normalized runtime catalog. Its metadata records the source URL, retrieval date, and catalog counts. [`src/colormapper/refresh.py`](src/colormapper/refresh.py) is the authoritative definition of the Behr source and normalization rules.

Refresh and validate the checked-in snapshot:

```bash
uv sync --group refresh
uv run --group refresh behr-colormapper-refresh
uv run pytest
cd worker && npm test
```

The runtime never contacts Behr.

## Deployment

Pushes to `main` that affect the Worker, catalog, smoke test, or workflow run tests and deploy through GitHub Actions. The repository requires:

- Actions secret `CLOUDFLARE_API_TOKEN` with Workers Scripts → Edit permission
- Actions variable `CLOUDFLARE_ACCOUNT_ID`

Run locally with `cd worker && npm install && npm run dev`.

## License

Code is MIT licensed. Behr color names, codes, and catalog data belong to their respective owner and are included as factual compatibility data.

TDQS

A3.5/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one converts an sRGB color to nearest Behr matches, the other searches by code/name. No overlap or ambiguity in selection.

Naming Consistency5/5

Both tools follow a consistent 'behr_' prefix and verb_noun pattern (match_paint, search_colors). Predictable and readable.

Tool Count4/5

Two tools are sufficient for the core mapping and lookup tasks, but the set feels slightly thin for a color service; a third tool (e.g., color detail) would add value without bloat.

Completeness4/5

The surface covers matching digital colors to Behr and searching by code/name, which are the primary workflows. Minor gaps include no explicit reverse mapping (Behr to sRGB) or dedicated color detail retrieval, though search likely returns enough.

Maintenance

ActivitySlowing
ResponsivenessUnresponsive