MCP · Cursor
Deslint for Cursor
Cursor's Composer and Agent modes are prolific. Within a week they can quietly rewrite a third of your UI, and half of it will have slipped past your design tokens. Deslint is the verification layer Cursor invokes in-loop — a Model Context Protocol server, called pre-generation, deterministically, with zero network calls.
Install
The one-line installer writes the MCP config into ~/.cursor/mcp.json. Reload Cursor and the deslint server appears under Settings → MCP.
Prefer manual config? Paste this into ~/.cursor/mcp.json:
~/.cursor/mcp.json
{
"mcpServers": {
"deslint": {
"command": "npx",
"args": ["-y", "@deslint/mcp"]
}
}
}How Cursor uses deslint
- In-Composer auto-fix. Before Cursor finalises a multi-file diff, it calls
analyze_and_fixon the touched files. Safe fixes (token swaps, spacing, radius) are applied silently; anything risky is flagged in the diff. - Budget enforcement. Pin your rule budgets in
.deslintrc.json. Cursor callsenforce_budgetbefore committing and refuses to ship the change if it would push the project over budget. - Rule docs on demand.
get_rule_detailslets Cursor quote the rule documentation inline when it's explaining a change to you — so the rule, the violation, and the fix all travel together.
Example tool call
Privacy notes
Deslint never calls the network. The MCP server is a Node process Cursor spawns over stdio. It reads local files, runs ESLint with the deslint rule set, and returns JSON. It does not share code with deslint.com, Anthropic, OpenAI, or any third party — even if Cursor itself is configured to.
Further reading: How to fix design drift in AI-generated code →