MCP Marketplace
BrowseHow It WorksFor CreatorsDocs
Sign inSign up
MCP Marketplace

The curated, security-first marketplace for AI tools.

Product

Browse ToolsSubmit a ToolDocumentationHow It WorksBlogFAQ

Legal

Terms of ServicePrivacy PolicyCommunity Guidelines

Connect

support@mcp-marketplace.ioTwitter / XDiscord

MCP Marketplace ยฉ 2026. All rights reserved.

Back to Browse

Tailwind Context Resolver MCP Server

by vola-trebla
Developer ToolsLow Risk10.0Local
Free

Resolves Tailwind CSS design tokens and validates utility classes against the local project config.

About

Resolves Tailwind CSS design tokens and validates utility classes against the local project config.

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (2 strong, 3 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (20/20 approved).

10 files analyzed ยท 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-vola-trebla-tailwind-context-resolver-mcp": {
      "args": [
        "-y",
        "tailwind-context-resolver-mcp"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

tailwind-context-resolver-mcp ๐ŸŽจ๐Ÿธ

npm version npm downloads CI License: MIT

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-18 a valid spacing value here?"
  • "Does this project use a custom prefix?"
  • "Is bg-brand-primary flex grid a 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.js or tailwind.config.ts in your project

๐Ÿ”ง How It Works

The server uses the same config loading strategy as the Tailwind CLI:

  1. jiti loads your tailwind.config.ts at runtime โ€” no ts-node required
  2. tailwindcss/resolveConfig merges your config with Tailwind defaults to produce the full resolved theme
  3. Tools perform token-based class validation โ€” checking that bg-brand-primary maps to an actual colors.brand.primary token โ€” 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

Reviews

No reviews yet

Be the first to review this server!

0

installs

New

no ratings yet

Links

Source Codenpm Package

Details

Published May 18, 2026
Version 0.2.0
0 installs
Local Plugin

More Developer Tools MCP Servers

Git

Free

by Modelcontextprotocol ยท Developer Tools

Read, search, and manipulate Git repositories programmatically

80.0K
Stars
6
Installs
6.5
Security
No ratings yet
Local

Toleno

Free

by Toleno ยท Developer Tools

Toleno Network MCP Server โ€” Manage your Toleno mining account with Claude AI using natural language.

137
Stars
533
Installs
8.0
Security
4.8
Local

mcp-creator-python

Free

by mcp-marketplace ยท Developer Tools

Create, build, and publish Python MCP servers to PyPI โ€” conversationally.

-
Stars
80
Installs
10.0
Security
4.6
Local

MarkItDown

Free

by Microsoft ยท Content & Media

Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption

156.1K
Stars
45
Installs
6.0
Security
5.0
Local

MCP Marketplace

Free

by mcp-marketplace ยท Developer Tools

Search and install MCP servers from inside your AI client.

-
Stars
30
Installs
10.0
Security
5.0
Remote

FinAgent

Free

by mcp-marketplace ยท Finance

Free stock data and market news for any MCP-compatible AI assistant.

-
Stars
25
Installs
10.0
Security
No ratings yet
Local