tailwind-context-resolver-mcp MCP Server
Resolves Tailwind CSS design tokens and validates utility classes against the local project config.
tailwind-context-resolver-mcp scores 51 (Fair), licensed MIT and written in TypeScript. It installs as a local process. It declares 4 tools. Filed under Design. GitHub shows 0 stars. Package registries report about 51 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.
Fair trust
51 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
66/100 for listing completeness. Lost points: 4 of 4 tools barely described, short summary, no docs link.
How quality is graded
Where the 51 comes from
22 + 5 + 0 + 10 + 4 + 10 = 51. 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: 5 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: 10 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": { "vola-trebla-tailwind-context-resolver-mcp": { "command": "npx", "args": [ "-y", "tailwind-context-resolver-mcp@0.2.0" ] } }}
Environment variables
This server does not declare environment variables.
Tools4Tool docs quality grade F
All capabilitiesAbout
tailwind-context-resolver-mcp ๐จ๐ธ
An MCP server that loads your project's tailwind.config.ts/js and exposes its actual design system to AI agents โ so they stop hallucinating class names.
๐ค The Problem
AI agents generate Tailwind classes based on training data โ the default Tailwind docs. Your project is not the default docs.
You have a custom color palette. A non-standard spacing scale. Maybe a prefix like tw-. Brand tokens like bg-brand-primary. The agent doesn't know any of this. It guesses.
The result:
// Agent confidently generates this:
<div className="bg-primary-500 text-brand p-18 tw-flex-center">
// Your project has:
// - bg-brand-primary (not bg-primary-500)
// - no "text-brand" token
// - spacing.18 = 4.5rem (ok actually)
// - no "flex-center" utility
// - no "tw-" prefix
The agent can't validate what it writes because it has no access to your resolved config. It's working from memory of the default theme โ not yours.
โ The Fix
This MCP server runs the Tailwind resolver locally and gives agents a typed, queryable interface to your actual config. Before writing a component, the agent can ask:
- "What brand colors exist in this project?"
- "Is
p-18a valid spacing value here?" - "Does this project use a custom prefix?"
- "Is
bg-brand-primary flex grida valid class string?"
๐ ๏ธ Tools
resolve_theme_tokens
Query any namespace in the resolved Tailwind theme. Returns all design tokens as flat key-value pairs.
namespace: "colors.brand" โ { primary: "#3b82f6", secondary: "#8b5cf6", danger: "#ef4444" }
namespace: "spacing" โ { "1": "0.25rem", "2": "0.5rem", "18": "4.5rem", ... }
namespace: "fontFamily" โ { sans: ["Inter", "sans-serif"], mono: [...] }
Use before generating components to discover what tokens actually exist.
validate_class_string
Validates a Tailwind className string against the project's resolved config. Returns valid classes, invalid (hallucinated) classes, and conflict warnings.
{
"valid_classes": ["bg-brand-primary", "text-white", "p-4", "hover:bg-brand-secondary", "flex"],
"invalid_classes": ["bg-fake-token", "text-brand"],
"warnings": ["Conflicting multiple layout models: flex, grid"],
"config_prefix": ""
}
Use to catch hallucinated design tokens before writing code.
detect_css_conflicts
Detects conflicting Tailwind utilities โ e.g. flex + grid, or absolute + fixed on the same element.
{
"conflicts": [{ "classes": ["flex", "grid"], "reason": "multiple layout models" }],
"has_conflicts": true
}
get_config_summary
Returns a compact overview: Tailwind version, prefix, which theme sections are customized, active plugins.
{
"tailwind_version": "3.4.19",
"prefix": "",
"theme_extensions": ["colors", "spacing", "fontFamily"],
"total_colors": 142,
"total_spacing": 34,
"plugins": ["@tailwindcss/forms"]
}
Use first to understand the project's design system before querying specific tokens.
๐ Setup
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"tailwind-context-resolver": {
"command": "npx",
"args": ["-y", "tailwind-context-resolver-mcp"]
}
}
}
Cursor / VS Code / Any MCP client
{
"tailwind-context-resolver": {
"command": "npx",
"args": ["-y", "tailwind-context-resolver-mcp"]
}
}
๐ Requirements
- Tailwind CSS v3 โ v4 uses a CSS-based config format and is not supported (the server will tell you clearly)
- Node.js 18+
- A
tailwind.config.jsortailwind.config.tsin your project
๐ง How It Works
The server uses the same config loading strategy as the Tailwind CLI:
jitiloads yourtailwind.config.tsat runtime โ nots-noderequiredtailwindcss/resolveConfigmerges your config with Tailwind defaults to produce the full resolved theme- Tools perform token-based class validation โ checking that
bg-brand-primarymaps to an actualcolors.brand.primarytoken โ without running the full PostCSS/JIT pipeline
This approach is fast, stable, and works with any Tailwind v3 project without additional configuration.
๐ Agent Workflow Example
1. get_config_summary โ understand the project's design system
2. resolve_theme_tokens โ query specific namespaces before writing classes
(namespace: "colors.brand", "spacing")
3. validate_class_string โ validate the className string before committing it
4. detect_css_conflicts โ final sanity check for conflicting utilities
๐ธ Part of the MCP Toolbelt
Built alongside:
- playwright-network-chaos-mcp โ network fault injection for Playwright tests
- v8-cpu-profile-decoder-mcp โ V8 CPU profile analysis for AI agents
License
MIT
Frequently asked questions
What is tailwind-context-resolver-mcp MCP Server?
Resolves Tailwind CSS design tokens and validates utility classes against the local project config.
How do I install tailwind-context-resolver-mcp 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. tailwind-context-resolver-mcp MCP Server runs locally from the npm package tailwind-context-resolver-mcp with the command npx -y tailwind-context-resolver-mcp@0.2.0.
Is tailwind-context-resolver-mcp MCP Server free and open source?
Yes. tailwind-context-resolver-mcp 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 tailwind-context-resolver-mcp MCP Server support remote (HTTP) connections?
No remote endpoint is listed for tailwind-context-resolver-mcp MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does tailwind-context-resolver-mcp MCP Server provide?
tailwind-context-resolver-mcp MCP Server provides 4 tools: detect_css_conflicts, get_config_summary, resolve_theme_tokens, and validate_class_string. See the full tool list for descriptions and parameters.
How is tailwind-context-resolver-mcp MCP Server's trust score calculated?
tailwind-context-resolver-mcp MCP Server scores 51 out of 100 (Fair). 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.