MCP server

/

Coding assistants

Claude Desktop and Claude Code

Installing Spectron as an MCP server in Claude Desktop and Claude Code.

Spectron can be installed as an MCP server in both Claude Desktop (the macOS and Windows application) and Claude Code (the CLI-based agentic coding tool). Once installed, Claude gains access to all seven Spectron tools and can persist and retrieve memory across conversations.

npx install-mcp spectron --client claude-desktop --context acme-prod

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

PlatformPath
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"spectron": {
"url": "https://api.spectron.dev/mcp",
"headers": {
"API-KEY": "<your-api-key>",
"X-Spectron-Context": "acme-prod"
}
}
}
}
  1. Restart Claude Desktop completely (quit and reopen)

  2. Start a new conversation

  3. Click the tools icon (the hammer symbol) in the composer – you should see the seven Spectron tools listed: memory_store, memory_recall, memory_reflect, memory_profile, knowledge_search, knowledge_get, memory_forget

  4. Send the message: "What MCP tools do you have?" – Claude should describe the Spectron tools

If the tools do not appear, check that the config file is valid JSON and that the Spectron API key is correct. You can validate the file with cat ~/Library/Application\ Support/Claude/claude_desktop_config.json | python3 -m json.tool.

Storing a preference:

"Remember that I prefer responses in British English and that I work in the fintech industry."

Claude calls memory_store and the preference is available in all future conversations.

Retrieving a profile at the start of a session:

You can instruct Claude (via its system prompt in Claude Desktop projects) to call memory_profile at the start of every conversation:

"At the start of every conversation, call memory_profile to retrieve my current context and apply my preferences and instructions to your responses."

Searching your knowledge base:

"What does our compliance documentation say about KYC requirements?"

Claude calls knowledge_search against the Spectron knowledge base and returns the relevant policy content.

Claude Code is Anthropic's CLI-based agentic coding assistant. It uses the same MCP protocol as Claude Desktop, with a different config file path.

npx install-mcp spectron --client claude-code --context acme-prod

Claude Code stores its MCP configuration at:

~/.claude/mcp.json

If the file does not exist, the installer creates it. If it exists, the spectron entry is merged in.

{
"mcpServers": {
"spectron": {
"url": "https://api.spectron.dev/mcp",
"headers": {
"API-KEY": "<your-api-key>",
"X-Spectron-Context": "acme-prod"
}
}
}
}

Run Claude Code and ask:

claude "What MCP tools do you have access to?"

Claude Code should list the seven Spectron tools. You can also run:

claude mcp list

to see all configured MCP servers and their status.

Remember architectural decisions as you code:

claude "Remember that we have decided to use event sourcing for the orders service and that the aggregate root is OrderAggregate."

Claude Code calls memory_store. The next time you start a Claude Code session in this project, memory_recall surfaces this decision before Claude answers questions about the orders service.

Recall context before a coding task:

claude "What do you remember about our database schema decisions?"

Set scope per project:

Install with project-specific scope so memories are isolated per repository:

npx install-mcp spectron \
--client claude-code \
--context acme-prod \
--scope user=alice \
--scope project=orders-service

Pass --scope flags to scope all memory operations to a specific user and project by default:

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

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

Claude Desktop: Open the config file and delete the "spectron" key, then restart Claude Desktop.

Claude Code: Run claude mcp remove spectron, or edit ~/.claude/mcp.json directly and remove the "spectron" entry.

Was this page helpful?