MCP server

/

Coding assistants

VS Code

Installing Spectron as an MCP server in VS Code.

VS Code supports MCP servers through the GitHub Copilot extension (version 1.99 or later with agent mode enabled) and through compatible AI extensions that implement the MCP client protocol.

  • VS Code 1.99 or later

  • GitHub Copilot extension with agent mode enabled, or another MCP-compatible VS Code extension

To enable Copilot agent mode: open VS Code settings, search for github.copilot.chat.agent.enabled, and set it to true.

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

The installer writes the Spectron configuration to .vscode/mcp.json in your current working directory. This makes the MCP server available to all contributors who open the workspace, which is suitable for shared team projects.

To install globally for all VS Code workspaces instead, pass --global:

npx install-mcp spectron --client vscode --context acme-prod --global

The global config is written to your VS Code user settings directory.

ScopePath
Workspace.vscode/mcp.json (relative to your project root)
Global (macOS)~/Library/Application Support/Code/User/mcp.json
Global (Windows)%APPDATA%\Code\User\mcp.json
Global (Linux)~/.config/Code/User/mcp.json

.vscode/mcp.json (workspace):

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

VS Code uses the servers key (rather than mcpServers) and requires a type field. The install-mcp command handles this difference automatically.

The .vscode/mcp.json file can be committed to your repository so the team shares the same MCP server configuration. The API key should not be committed directly. Instead, use a VS Code input variable to prompt for the key at runtime:

{
"inputs": [
{
"id": "spectronApiKey",
"type": "promptString",
"description": "Spectron API key",
"password": true
}
],
"servers": {
"spectron": {
"type": "http",
"url": "https://api.spectron.dev/mcp",
"headers": {
"API-KEY": "${input:spectronApiKey}",
"X-Spectron-Context": "acme-prod"
}
}
}
}

VS Code will prompt each developer for their API key the first time they use the MCP server in the workspace.

  1. Open VS Code and the workspace

  2. Open the Copilot chat panel (Ctrl+Shift+I or Cmd+Shift+I)

  3. Switch to Agent mode using the mode selector in the chat panel

  4. Type @spectron or ask: "What MCP servers are available?"

  5. Copilot should acknowledge the Spectron tools

Alternatively, open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run MCP: List Servers to see the status of all configured MCP servers including Spectron.

In Copilot agent mode:

"Remember that we use Prisma for all database access in this project and that direct SQL queries are not permitted outside of migration scripts."

Copilot calls memory_store. The decision persists across VS Code sessions and is recalled the next time you ask a database-related question.

Before asking Copilot to refactor a module:

"What do you know about the design decisions behind the authentication module?"

Copilot calls memory_recall, retrieves the relevant context, and incorporates it into its refactoring suggestions.

If your team's documentation is synced into Spectron's knowledge base:

"What does our architecture decision record say about the API gateway pattern?"

Copilot calls knowledge_search and returns the relevant ADR content.

Install with project-specific scope to keep memory isolated per repository:

npx install-mcp spectron \
--client vscode \
--context acme-prod \
--scope user=alice \
--scope project=platform-v3

This adds X-Spectron-Scope: user=alice,project=platform-v3 to the headers for all tool calls in this workspace.

Delete the "spectron" entry from .vscode/mcp.json (workspace) or from the global mcp.json file. VS Code will stop offering the Spectron tools in subsequent sessions.

Was this page helpful?