MCP · Claude Code
Deslint for Claude Code
Claude Code is fast at shipping UI. It is equally fast at shipping arbitrary hex colours, off-scale spacing, missing alt text, and contrast failures. Deslint is the verification layer Claude Code calls before it writes the file — deterministic, delivered over the Model Context Protocol, zero LLM in the hot path.
Install
Run once. The installer detects Claude Desktop (which Claude Code shares config with) and writes the MCP server entry. Restart Claude Code to pick it up.
Or drop the snippet into Claude's config manually:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"deslint": {
"command": "npx",
"args": ["-y", "@deslint/mcp"]
}
}
}What happens next
- Claude Code handshakes with the
deslintMCP server over stdio on startup. - When you ask Claude to change UI, it calls
analyze_and_fixon the touched files first and applies the suggestions it returns. - On any remaining violation it cannot auto-fix, Claude receives a structured plan from
suggest_fix_strategyand tells you exactly what it needs you to decide. - Drift never lands in the repo. You never waste a review cycle arguing over
bg-[#1a5276]again.
Example prompt
“Add a primary CTA button to the pricing card. Use our design tokens — run enforce_budget before you commit.”Claude calls deslint's enforce_budget tool, which gates on the rule budgets in your .deslintrc.json. If the budget is exceeded, Claude halts and asks you to approve the drift — or reverts its own edit.
Why this works for regulated teams
The Deslint MCP server is a local stdio subprocess. It never calls the network. It never invokes an LLM of its own. The rules are deterministic ESLint rules — the same ones you can inspect in the open-source repository. Zero code leaves your machine. Safe inside enterprise firewalls and private-cloud Claude Code deployments.
Further reading: How to fix design drift in AI-generated code →