
Tailwind Context Resolver Mcp
io.github.vola-trebla由 GitHub 帳號 vola-trebla 發布v0.2.0更新於 Oct 24, 2026
Resolves Tailwind CSS design tokens and validates utility classes against the local project config.
發布方自己的服務:Tailwind App
概覽
讓助理讀取專案已解析的 Tailwind CSS v3 主題,並據此驗證工具類別字串。
- 可以做什麼
- 載入專案的 tailwind.config.js 或 .ts,並透過四個工具公開解析後的設計系統。resolve_theme_tokens 回傳某個命名空間(例如 colors.brand、spacing)下的權杖;validate_class_string 將 className 字串拆成有效與無效類別並提出衝突警告;detect_css_conflicts 回報互相衝突的工具類別,例如 flex 與 grid;get_config_summary 回報 Tailwind 版本、前綴、被客製化的主題區段與外掛。驗證以權杖為基礎,而非完整的 PostCSS/JIT 流程。
- 適用情境
- 當助理在具有自訂調色盤、間距刻度、前綴或品牌權杖的專案中撰寫 Tailwind 類別時適用,可讓它對照真實設定而非預設主題檢查類別名稱。最適合在既有的 Tailwind v3 程式碼庫中進行元件或介面相關工作。
- 執行需求
- 以 stdio 在本機執行,通常用 npx 啟動。需要 Node.js 18+,以及專案中的 tailwind.config.js 或 tailwind.config.ts。僅支援 Tailwind CSS v3,v4 的 CSS 設定格式不受支援。未宣告需要帳號、API 金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Tailwind Context Resolver Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
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:
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.
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.
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.
get_config_summary
Returns a compact overview: Tailwind version, prefix, which theme sections are customized, active plugins.
Use first to understand the project's design system before querying specific tokens.
🚀 Setup
Claude Desktop
Add to your claude_desktop_config.json:
Cursor / VS Code / Any MCP client
📋 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
🐸 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
來源:README.md,提交 2e58837
工具
0版本歷史
1- v0.2.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Tailwind 整合
Tailwind App
ai.tailwind官方發布者
讓助理透過 Tailwind 列出 Pinterest 帳號,並建立、排程和管理 Pinterest 貼文。
Tailwind Shades
由 GitHub 帳號 bourhaouta 發布
一個 MCP 伺服器,為助理提供真實的 Tailwind CSS 調色盤:從任意顏色產生 50-950 色階、找出最接近的預設色階,並查詢或列出 Tailwind 預設顏色。

Tailwind V4 Upgrade Blocker Lint
由 GitHub 帳號 jmshinhwa 發布
一個本機 MCP 伺服器,以 19 條規則檢查檔案中遭 Tailwind v4 移除或重新定義的 v3 語法,協助助理找出升級阻礙。