MCP server

/

Coding assistants

Cursor

Installing Spectron as an MCP server in Cursor.

Installing Spectron in Cursor gives every AI interaction in your editor access to persistent memory. Cursor's agent can recall previous decisions, project context, and user preferences across sessions without you having to repeat yourself.

For integration rules your agent should follow (auth, scope, endpoints, common mistakes), see Agent guide (AGENTS.md) — you can copy that page into .cursor/rules/ or a project skill.

Run the following command in your terminal, replacing acme-prod with your context ID:

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

The installer prompts for your Spectron API key and writes the MCP configuration to ~/.cursor/mcp.json. If that file already exists, the spectron entry is merged in without disturbing other MCP servers.

SurrealDB Cloud — use your context host from Surrealist API keys (not a generic shared domain):

{
"mcpServers": {
"spectron": {
"url": "https://<your-context-host>/mcp",
"headers": {
"Authorization": "Bearer <your-api-key>",
"X-Spectron-Context": "acme-prod"
}
}
}
}

Self-hosted — replace the URL with your Spectron server's base URL + /mcp.

The shipped install-mcp helper does not set a default scope. Narrow reads and writes by passing a scope argument on each tool (slash paths, for example ["org/acme/user/alice"] or ["org/acme/project/platform-v3"]). Register paths with spectron scopes create before first use.

For project isolation, use separate contexts or distinct scope paths in tool arguments — not install-time flags.

  1. Open Cursor

  2. Navigate to Settings → Features → MCP

  3. You should see spectron listed with a green indicator confirming the server is reachable

  4. Open the chat panel and ask: "What MCP tools do you have available?" – Cursor should report the seven Spectron tools

If the indicator is red, check that the URL (your context host + /mcp) and API key in ~/.cursor/mcp.json are correct.

At the start of a work session, tell Cursor about the project:

"Remember that we're using a hexagonal architecture pattern in this codebase and that all new services should implement the Repository interface before touching the domain layer."

Cursor invokes memory_store with an appropriate scope (for example ["org/acme/project/platform-v3"]). The next time you start a session, that instruction is retrieved by memory_recall before Cursor answers questions about architecture.

When you ask an architectural question:

"Should I add this feature to the gateway service or create a new service?"

Cursor calls memory_recall with the query and scope before composing its response, retrieving previous decisions about service boundaries.

If you have synced your documentation into Spectron's authoritative knowledge:

"What does our internal wiki say about the deployment process?"

Cursor calls knowledge_search against the knowledge base and incorporates the retrieved content into its response.

To change the API key or context host after installation, edit ~/.cursor/mcp.json directly or re-run the install command. Re-running merges the new values over the existing entry:

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

Open ~/.cursor/mcp.json and delete the "spectron" key from mcpServers. Cursor will no longer offer the Spectron tools in subsequent sessions.

Was this page helpful?