MCP server

/

Coding assistants

Windsurf

Installing Spectron as an MCP server in Windsurf.

Windsurf's Cascade agent supports MCP servers natively. Installing Spectron gives Cascade persistent memory – it can recall decisions, project context, and user preferences across sessions without requiring you to re-explain your codebase on every invocation.

npx install-mcp spectron --client windsurf --context acme-prod

The installer writes the Spectron MCP configuration to Windsurf's global MCP config file and merges it with any existing entries.

PlatformPath
macOS~/.codeium/windsurf/mcp_config.json
Windows%USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"spectron": {
"serverUrl": "https://api.spectron.dev/mcp",
"headers": {
"API-KEY": "<your-api-key>",
"X-Spectron-Context": "acme-prod"
}
}
}
}

Windsurf uses serverUrl rather than url. The install-mcp command writes the correct key automatically.

For self-hosted Spectron, replace https://api.spectron.dev with your instance's base URL.

Pass --scope flags to set a default scope that applies to all Spectron tool calls from Windsurf:

npx install-mcp spectron \
--client windsurf \
--context acme-prod \
--scope user=alice \
--scope org=acme

This adds X-Spectron-Scope: user=alice,org=acme to the config headers. Individual tool calls can still override this scope by passing a scope argument.

  1. Restart Windsurf

  2. Open the Cascade panel

  3. Run a prompt: "What MCP tools do you have access to?" – Cascade should report the seven Spectron tools

  4. Alternatively, open Windsurf → Settings → MCP to see a list of configured servers and their connection status

If Spectron does not appear or shows as disconnected, check that the config file is valid JSON and that the API key and URL are correct.

At the start of a new project or codebase:

"Remember that this project uses domain-driven design with bounded contexts. The orders and inventory contexts must never share a database table directly – communication is via events only."

Cascade calls memory_store. The architectural constraint is available in all future sessions and is recalled automatically when Cascade encounters related code.

Before suggesting a solution:

"What do you remember about how we handle authentication in this codebase?"

Cascade calls memory_recall and returns relevant stored context before composing its response.

If your internal documentation is synced into Spectron's authoritative knowledge store:

"What does our runbook say about rolling back a failed deployment?"

Cascade calls knowledge_search and retrieves the relevant runbook section.

Ask Cascade to save a comprehensive project brief at the start of an engagement:

"Store the following as project context: we are building a multi-tenant SaaS platform in Go, using SurrealDB for application data, deployed on Kubernetes in AWS eu-west-1."

Cascade calls memory_store with the full brief. Subsequent sessions recall this context automatically via memory_recall.

To change the API key, context, or scope, edit ~/.codeium/windsurf/mcp_config.json directly or re-run the install command:

npx install-mcp spectron \
--client windsurf \
--context acme-prod \
--scope user=alice \
--scope project=new-project

Re-running the command merges the updated values over the existing configuration entry.

Open ~/.codeium/windsurf/mcp_config.json and delete the "spectron" key from mcpServers. Restart Windsurf to apply the change.

Was this page helpful?