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.
Prerequisites
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.
Install
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:
The global config is written to your VS Code user settings directory.
Config file locations
| Scope | Path |
|---|---|
| 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 |
What gets written
.vscode/mcp.json (workspace):
VS Code uses the servers key (rather than mcpServers) and requires a type field. The install-mcp command handles this difference automatically.
Committing the config
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:
VS Code will prompt each developer for their API key the first time they use the MCP server in the workspace.
Verify the installation
Open VS Code and the workspace
Open the Copilot chat panel (
Ctrl+Shift+IorCmd+Shift+I)Switch to Agent mode using the mode selector in the chat panel
Type
@spectronor ask: "What MCP servers are available?"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.
Usage examples
Remembering project decisions in agent mode
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.
Recalling context before refactoring
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.
Searching project documentation
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.
Scope per workspace
Install with project-specific scope to keep memory isolated per repository:
This adds X-Spectron-Scope: user=alice,project=platform-v3 to the headers for all tool calls in this workspace.
Removing Spectron
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.