audit_theme_usage
Identifies dead design tokens by scanning the project files. Checks each CSS custom property defined in @theme blocks to see if it is referenced anywhere in the source code.
Validate Tailwind classes against the project's actual config — catch conflicting utilities, resolve theme tokens, find dead design tokens, and check a class against the JIT engine itself.
LABSCO SUMMARY
Tailwind's real vocabulary is whatever the project's config produces, including arbitrary values and custom scales, so any validator working from a static list will reject valid classes and accept invalid ones. Running the classes through the compiler makes the answer authoritative. The conflict detector addresses the other common failure, which is subtler: two utilities setting the same property do not error, they silently resolve by stylesheet order and produce something that looks nearly right. Supporting both the v3 config file and the v4 CSS theme is necessary rather than generous — that migration split the ecosystem and a tool that handles one is useless on the other.
A Tailwind configuration analysis toolkit: it resolves the project's real theme, validates class strings against it, detects conflicts, and audits which tokens are actually used.
A Tailwind project for it to read — the tools work against the project's own configuration and CSS.
One command — npx -y tailwind-context-resolver-mcp
USE CASES
Validate against the project's own configuration and through the JIT engine, rather than against Tailwind's defaults.
Detect conflicting utilities in the class string — two values for the same property resolve silently by stylesheet order rather than erroring.
Resolve the theme for the namespace, using the v4 CSS path or the config path depending on which version the project is on.
Audit which tokens are actually referenced anywhere and find the ones defined and never used.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
audit_theme_usageIdentifies dead design tokens by scanning the project files. Checks each CSS custom property defined in @theme blocks to see if it is referenced anywhere in the source code.
detect_css_conflictsDetects conflicting Tailwind utility classes in a className string — e.g. applying both 'flex' and 'grid', or multiple position utilities. Use to prevent silent CSS bugs before generating or reviewing component code.
get_config_summaryReturns a compact overview of the project's Tailwind configuration: version, prefix, which theme sections have been customized, and what plugins are active. Use first to understand the project's design system before querying specific tokens.
resolve_theme_tokensQueries the resolved Tailwind CSS theme for a specific namespace and returns all design tokens. Use before generating components to discover what colors, spacing, or font values actually exist in this project. Example namespaces: 'colors', 'colors.brand', 'spacing', 'fontFamily', 'fontSize', 'screens'.
resolve_v4_theme_variablesParses the project's root CSS file (Tailwind CSS v4) and extracts all design tokens defined in @theme blocks. Returns a flat map of CSS custom properties (e.g., --color-primary-500 -> oklch(...)).
simulate_jit_compilationValidates Tailwind utility classes against the JIT engine by programmatically compiling them. Supports complex arbitrary values, JIT modifiers, and custom plugin classes. Returns the generated CSS rules.
validate_class_stringValidates a Tailwind CSS className string against the project's actual config. Returns valid_classes, invalid_classes (hallucinated tokens), possibly_valid_classes (plugin-generated — cannot verify without PostCSS), and conflict warnings. Handles variants (hover:, dark:, lg:), important (!), opacity modifiers (/50), negative values (-mt-4), and arbitrary values ([32rem]). Use to catch hallucinated design tokens before writing code.
BEFORE YOU INSTALL
7 tools when we connected.
CONTEXT COST
Rated by the size of the 7 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
Add the block to your client, or run the command directly.
{
"mcpServers": {
"tailwind-context-resolver-mcp": {
"command": "npx",
"args": [
"-y",
"tailwind-context-resolver-mcp"
]
}
}
}npx -y tailwind-context-resolver-mcp