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.
Install
Run the following command in your terminal, replacing acme-prod with your context ID:
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.
What gets written
For self-hosted Spectron, replace https://api.spectron.dev with your server's base URL.
Per-project scope
To isolate memory by project, pass --scope flags. Each project can have its own context so that memories from one codebase do not surface in another:
This adds X-Spectron-Scope: user=alice,project=platform-v3 to the headers, so all tool calls default to that scope. You can still override scope per call by passing a scope argument to any tool.
Verify the installation
Open Cursor
Navigate to Settings → Features → MCP
You should see spectron listed with a green indicator confirming the server is reachable
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 and API key in ~/.cursor/mcp.json are correct and that your Spectron instance is accessible.
Usage examples
Storing project context
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
Repositoryinterface before touching the domain layer."
Cursor invokes memory_store automatically. The next time you start a session, that instruction is retrieved by memory_recall before Cursor answers questions about architecture.
Recalling decisions before answering questions
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 before composing its response, retrieving previous decisions about service boundaries and applying them to its answer.
Querying the knowledge base
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.
Per-project isolation
Because scope is set in the config headers, memories stored while working on platform-v3 are automatically isolated from memories in a different project context. Switch projects by editing ~/.cursor/mcp.json or by running install-mcp again with different --scope flags.
Updating the configuration
To change the API key, context, or scope after installation, edit ~/.cursor/mcp.json directly or re-run the install command. Re-running merges the new values over the existing entry:
Removing Spectron from Cursor
Open ~/.cursor/mcp.json and delete the "spectron" key from mcpServers. Cursor will no longer offer the Spectron tools in subsequent sessions.