MCP · Windsurf
Deslint for Windsurf
Windsurf's Cascade agent moves across files at the speed of a full codebase edit. That's exactly when a deterministic verification layer matters most — without one, a single Cascade run can silently regress your dark-mode contrast and snap every button to off-palette greys. Deslint's MCP server gives Cascade a deterministic tool to call on every touched file, before it ships.
Install
Add the deslint server to Windsurf's MCP config. Open Windsurf Settings → Cascade → MCP Servers, or edit the config file directly:
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"deslint": {
"command": "npx",
"args": ["-y", "@deslint/mcp"]
}
}
}Restart Windsurf to load the server. The deslint.* tools will appear in Cascade's tool list.
How Cascade uses deslint
- Per-step validation. Cascade calls
analyze_fileon each file it edits, applies the fixable suggestions, and keeps iterating until the budget holds. - Cross-file consistency. Because
analyze_projectreturns aggregated scores across the whole workspace, Cascade can detect when its own edits have started a regression trend and stop early. - PR-ready output.
compliance_checkproduces a clean JSON report Cascade can attach to its proposed diff — so your reviewers see the scorecard, not just the edit.
Cascade prompt pattern
“Refactor the marketing site to use our new typography tokens. After each file, calldeslint.analyze_and_fix. Before finishing, rundeslint.enforce_budgetand show me the scorecard.”
This pattern turns deslint into a self-checking contract for Cascade: the agent cannot mark the step complete unless the budget passes.
Why local matters here
Cascade can traverse entire monorepos. Sending that surface area to a cloud linter would be a data-governance nightmare. Deslint is a local stdio subprocess — it reads files, runs rules, returns JSON. No network. No LLM in the check loop. No egress to worry about, regardless of how aggressively Cascade scans.