PaletteCraft MCP Server
Deterministic light/dark color tokens and measured contrast checks.
PaletteCraft MCP scores 63 (Good), licensed MIT and written in TypeScript. It installs as a local process. It does not declare tools yet. Filed under Uncategorized. GitHub shows 0 stars. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
63 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade C
60/100 for listing completeness. Lost points: no listed tools, short summary, no docs link.
How quality is graded
Where the 63 comes from
22 + 20 + 0 + 10 + 4 + 7 = 63. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 0 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 7 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "ahmedsaeed1-eng-palettecraft-mcp": { "command": "npx", "args": [ "-y", "palettecraft-mcp@0.1.0" ] } }}
Environment variables
This server does not declare environment variables.
Tools
All capabilitiesTools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.
About
PaletteCraft MCP
Start with one color. Build a complete design system.
Gallery: these six palettes come from actual runs of the project. The button labels show calculated foreground/background contrast, and each card reports the measured checks for its own theme.
An original, deterministic design-token engine for frontend and mobile development. Start with a brand color and a mood, produce coordinated light and dark semantic palettes, and receive measured contrast checks before using them in a UI.
- 14 semantic colors per theme, including text, surfaces, buttons, status text, outlines, and focus.
- 58 tested color pairs per generation: 29 in each theme.
- Five moods: balanced, calm, vibrant, warm, and neutral.
- Contrast checking and foreground adjustment with explicit pass/fail.
- JSON, CSS custom properties, Tailwind CSS v4, and Flutter Material color roles.
- Local computation only. No hosted service, API key, model, telemetry, arbitrary code execution, or network request from the tools.
- Genuine MCP stdio via the official TypeScript SDK.
Package installation
Once this version is published to npm by the repository maintainer, register the pinned local stdio server directly with Codex:
codex mcp add palettecraft -- npx --yes palettecraft-mcp@0.1.0
Or install the exact release and use the installed command:
npm install -g palettecraft-mcp@0.1.0
codex mcp add palettecraft -- palettecraft-mcp
The package metadata declares the MCP Registry identity
io.github.ahmedsaeed1-eng/palettecraft-mcp. The official registry entry is a separate
publication step after npm release; local stdio use does not require it.
Quick start
Prerequisites: Node.js 20+ and an MCP client, such as Codex.
git clone https://github.com/ahmedsaeed1-eng/palettecraft-mcp.git
cd palettecraft-mcp
npm ci
npm run build
Connect the built server to Codex:
codex mcp add palettecraft -- node /absolute/path/to/palettecraft-mcp/dist/server.js
Alternatively configure the server in Codex's user config:
[mcp_servers.palettecraft]
command = "node"
args = ["/absolute/path/to/palettecraft-mcp/dist/server.js"]
Use your real absolute path. On Windows, forward slashes or escaped backslashes work in TOML. See the Codex MCP configuration reference.
Then ask your agent:
Generate a calm palette from #0F766E for my app, check light and dark contrast, and return the Tailwind v4 design token export.
MCP tools
generate_palette
| Parameter | Required | Values/default |
|---|---|---|
seed | yes | Opaque six-digit color, e.g. #0F766E |
mood | no | balanced (default), calm, vibrant, warm, neutral |
format | no | json (default), css, tailwind, dart, all |
Example input:
{
"seed": "#0F766E",
"mood": "calm",
"format": "all"
}
Output is structured JSON with light and dark objects. Each has
tokens, contrastChecks, and a pass-count summary. The exports
object contains the requested integration snippets. JSON mode returns the
tokens and checks without additional snippet strings. Every check reports
the semantic foreground/background, rounded ratio, unrounded exactRatio,
threshold, pass flag, and usage.
check_contrast
| Parameter | Required | Values/default |
|---|---|---|
foreground | yes | #RRGGBB |
background | yes | #RRGGBB |
threshold | no | 4.5 (default), 3, or 7 |
Example input:
{"foreground":"#777777","background":"#FFFFFF","threshold":4.5}
The input fails the 4.5:1 threshold. The tool returns a measured
suggestion, its rounded and unrounded ratio, and its own passes flag. A suggestion can fail
when the requested threshold is mathematically impossible for the chosen
background; the tool does not label it as a pass.
Semantic token reference
| Token | Intended use |
|---|---|
| background / surface / surfaceVariant | Canvas, panel, elevated/tinted panel |
| text / textMuted | Body and secondary text on the three surfaces |
| primary / onPrimary | Link or button fill, with label on button |
| secondary / onSecondary | Secondary action and its label |
| success / warning / error | Status text paired with an icon or label |
| outline / focus | Control boundary or focus visual against surfaces |
Exports
CSS custom properties
Use the generated CSS in your app stylesheet, and set the theme attribute on the document root or theme container:
<body data-theme="dark">
<button class="primary">Continue</button>
</body>
.primary {
background: var(--pc-primary);
color: var(--pc-on-primary);
}
Tailwind CSS v4
The export combines the generated custom properties with top-level
@theme inline declarations. Tailwind utility classes reference the
current theme at runtime:
<div class="bg-pc-background text-pc-text">
<button class="bg-pc-primary text-pc-on-primary">Continue</button>
</div>
It is designed for Tailwind CSS v4, not v3.
Flutter
The Dart export provides paletteCraftLight and paletteCraftDark
ThemeData values and explicit Material 3 color roles. Paste the snippet in
a Dart file in your app, then integrate both:
MaterialApp(
theme: paletteCraftLight,
darkTheme: paletteCraftDark,
themeMode: ThemeMode.system,
)
Core Material color roles are mapped using the ColorScheme API. Other Flutter theme roles rely on framework defaults and require their own review. Always validate real app screens, states, and text sizes.
Explore the output: calm teal
Seed #0F766E, mood calm. Palette swatches and check totals below are
generated by the actual algorithm, not a hand-picked design mock.
| Token | Light | Dark |
|---|---|---|
| background | #F9FAFA | #101414 |
| surface | #FFFFFF | #1B2221 |
| text | #1B2222 | #EEF2F1 |
| textMuted | #5A7270 | #9EB3B1 |
| primary | #267973 | #87D9D3 |
| onPrimary | #F9FAFA | #131616 |
| secondary | #3D7396 | #87B3CF |
| success | #257C4E | #7DD8A8 |
| warning | #95630F | #F1C374 |
| error | #AB2521 | #E98E8B |
Measured pairs passed: light 29/29, dark 29/29.
Run the included example for the entire structured JSON report and snippets:
npm run example
Contrast methodology
The engine converts each opaque sRGB input to relative luminance and calculates the ratio of the brighter and darker color. Normal text pairs use the WCAG AA minimum of 4.5:1. Outline/focus pairs use 3:1. The standalone checker also supports 7:1. See WCAG 2.2 contrast and non-text contrast.
To improve a failing foreground, it searches the same hue and saturation
at 0.1% HSL lightness increments. The selected passing candidate minimizes
lightness displacement among those candidates; for multiple surfaces it
must pass against all of them. If none meets the threshold, the candidate
with the highest observed minimum contrast is returned with passes=false.
Pass/fail always uses the unrounded ratio.
PaletteCraft does not certify a UI as WCAG conformant. It checks listed opaque static color pairs, not alpha blending, gradients, rendered font size, focus geometry, dynamic states, color perception, or assistive technology. Never communicate status using color alone.
Development
npm ci
npm run typecheck
npm run format:check
npm test
Tests cover reference luminance values, unrounded threshold decisions, hex/HSL conversion, feasible and impossible contrast adjustments, 45 reference seed/mood combinations and 250 additional deterministic sample combinations across both themes, export consistency (including Flutter error-label contrast), and a real MCP client/server exchange including schema validation. CI gates TypeScript and source whitespace on Node 20 and 22. Flutter and Tailwind snippets are inspected for token consistency; this test suite does not compile a Flutter app or build a Tailwind project.
No accounts or secrets are necessary.
License
MIT. Original design-token and contrast code by Ahmed Saeed. See THIRD_PARTY.md for independent dependency licenses and the referenced W3C specification.
Frequently asked questions
What is PaletteCraft MCP Server?
Deterministic light/dark color tokens and measured contrast checks.
How do I install PaletteCraft MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. PaletteCraft MCP Server runs locally from the npm package palettecraft-mcp with the command npx -y palettecraft-mcp@0.1.0.
Is PaletteCraft MCP Server free and open source?
Yes. PaletteCraft MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does PaletteCraft MCP Server support remote (HTTP) connections?
No remote endpoint is listed for PaletteCraft MCP Server. It runs locally on your machine over stdio, started by your MCP client.
How is PaletteCraft MCP Server's trust score calculated?
PaletteCraft MCP Server scores 63 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.