npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tokven-mcp

v1.0.9

Published

Generate complete design token systems from a hex color — OKLCH-derived, WCAG-validated, multi-format

Readme

tokven-mcp

WCAG-safe color system generation for AI agents and developers. Give it a brand hex, get a contrast-validated token system in CSS, Tailwind, or DTCG JSON. Runs locally, no account needed.

What it does

Give it a brand color and a mood. It returns a full token system: colors (light + dark mode), typography pairing, spacing scale, border radius, shadows — all WCAG-validated with contrast ratios. Output as CSS custom properties, Tailwind v4, Tailwind v3, or DTCG JSON. Runs locally, no account needed.

Install

{
  "mcpServers": {
    "tokven": {
      "command": "npx",
      "args": ["-y", "tokven-mcp"]
    }
  }
}

Cursor: Settings → MCP → Add the config above

Claude Desktop: Add to claude_desktop_config.json

Claude Code:

claude mcp add tokven -- npx -y tokven-mcp

Tools

generate_tokens

Generates a complete token system from a hex color.

| Parameter | Required | Description | |-----------|----------|-------------| | hex | yes | Brand color, e.g. #2563eb | | mood | no | Visual personality. Default: cool | | format | no | css | tailwind-v4 | tailwind-v3 | dtcg | | heading_font | no | Override heading font family | | body_font | no | Override body font family | | colors | no | Color scope: primary | primary-secondary | all (default) | | secondary_hex | no | Custom secondary hex. Auto-derived if omitted | | tertiary_hex | no | Custom tertiary hex. Auto-derived if omitted |

Example prompt:

Generate a design system for #2563eb with a corporate mood as Tailwind v4

Returns: Full CSS/Tailwind/DTCG output, Google Fonts @import URL, WCAG contrast results for both light and dark mode.


get_token_preview

Quick summary without full CSS. Useful for comparing moods before committing.

| Parameter | Required | Description | |-----------|----------|-------------| | hex | yes | Brand color | | mood | no | Mood preset |

Example prompt:

Preview tokens for #e05aad with a soft mood

Returns: Primary colors, font pairing, radius, shadow style, contrast pass/fail count.


validate_contrast

WCAG 2.1 contrast check between two colors.

| Parameter | Required | Description | |-----------|----------|-------------| | foreground | yes | Foreground hex color | | background | yes | Background hex color |

Example prompt:

Does #ffffff on #2563eb pass WCAG AA?

Returns: Contrast ratio, AA/AAA pass/fail for normal and large text.


list_moods

Returns all 14 mood presets with descriptions. No parameters.

| Mood | Character | |------|-----------| | warm | Earthy tones, serif typography, editorial | | cool | Blue-grey, clean sans-serif, professional | | bold | High contrast, saturated, hard shadows | | dark | Muted, precise, monospace-friendly | | soft | Pastel, rounded shapes, gentle | | minimal | Near-achromatic, elegant, restrained | | brutalist | Monochrome, raw, zero radius | | playful | High chroma, bouncy, colorful | | vintage | Desaturated warm, classic serif | | luxury | Gold/champagne, refined serif | | nature | Green/earth tones, organic shapes | | neon | Dark bg, max chroma, cyber | | corporate | Professional blue, trustworthy | | retro | Warm saturated, 70s/80s display |

Example output

generate_tokens with hex: "#2563eb", mood: "corporate" returns:

@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@600&family=Noto+Sans:wght@400&display=swap");

:root {
  /* Background */
  --color-bg: #f6f7fa;
  --color-bg-surface: #f0f2f6;
  --color-bg-elevated: #eaecf1;
  --color-border-subtle: #e2e4ea;
  --color-border-default: #d8dbe2;
  --color-border-strong: #c7cad2;

  /* Text */
  --color-text: #0e1016;
  --color-text-muted: #454856;
  --color-text-subtle: #6a6e7b;

  /* Primary */
  --color-primary: #2563eb;
  --color-primary-on: #ffffff;
  --color-primary-container: #e8edf8;
  /* ... 45 more color tokens, typography, spacing, radius, shadows */
}

Plus WCAG contrast validation:

{ "light": "31/31 pass", "dark": "31/31 pass" }

Examples

Example 1: Generate tokens for a brand color

User prompt: "Generate a design system for my app using brand color #2563eb"

Expected behavior:

  • Calls generate_tokens with hex #2563eb, mood "cool"
  • Returns full CSS custom properties block
  • Includes Google Fonts @import URL
  • Shows WCAG contrast results: 31/31 pass for both light and dark mode

Example 2: Preview and compare moods

User prompt: "Show me a preview of #e05aad with a soft mood before I commit"

Expected behavior:

  • Calls get_token_preview
  • Returns compact summary: primary colors, font pairing, radius, shadow style, contrast pass count
  • No full CSS — quick comparison view

Example 3: Check if colors are accessible

User prompt: "Does white text on #2563eb pass WCAG AA?"

Expected behavior:

  • Calls validate_contrast with #ffffff and #2563eb
  • Returns ratio (4.52:1), AA pass for large text, AA fail for normal text, AAA fail
  • Clear pass/fail for each WCAG criterion

Privacy

tokven-mcp runs entirely on your local machine. No data is collected, no network requests are made during token generation, no account required. The MCP server collects no usage data.

Full policy: https://tokven.dev/#/privacy

Requirements

Node.js >= 18

License

MIT