VS Code
MCP Server Setup Guide
VS Code uses MCP through GitHub Copilot in Agent mode. Critical difference from all other clients:
the config key is "servers" — not "mcpServers".
"servers" as the top-level key in .vscode/mcp.json.
Every other MCP client (Cursor, Claude Desktop, Continue, Cline) uses "mcpServers".
Using the wrong key will silently fail — VS Code won't show an error.
Prerequisites
- VS Code 1.99+ — MCP support added in April 2025 update
- GitHub Copilot extension — must be installed and signed in
- GitHub Copilot Chat in Agent mode — switch to Agent in the Copilot chat panel (not Ask/Edit mode)
- anonym.legal API key — Pro or Business plan at anonym.legal
Installation — HTTP (Recommended)
Create .vscode/mcp.json
Create the file in your workspace root. Note the "servers" key (not "mcpServers"):
{
"servers": {
"anonym-legal": {
"type": "http",
"url": "https://anonym.legal/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
"type": "http" in VS Code — this is another VS Code-specific field not needed in other clients.Enable Agent Mode in Copilot Chat
Open GitHub Copilot Chat (Ctrl+Alt+I / Cmd+Ctrl+I). In the chat input, switch the mode dropdown from Ask or Edit to Agent. MCP tools only appear in Agent mode.
Verify Tools Available
In Agent mode, click the tools icon (wrench 🔧) in the chat panel to see available MCP tools. You should see the 7 anonym_legal_ tools listed under the anonym-legal server.
Installation — stdio (Alternative)
{
"servers": {
"anonym-legal": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-server-anonym-legal"],
"env": {
"ANONYM_LEGAL_API_KEY": "YOUR_API_KEY"
}
}
}
}
"type": "stdio". VS Code requires this explicit type declaration.User-Level Config (All Workspaces)
To apply globally, open VS Code User Settings JSON (Ctrl+Shift+P → Preferences: Open User Settings JSON) and add:
{
"github.copilot.chat.mcp.servers": {
"anonym-legal": {
"type": "http",
"url": "https://anonym.legal/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
The "servers" vs "mcpServers" Difference Explained
This is the most common source of confusion when moving between clients:
{
"servers": { ... }
}
{
"mcpServers": { ... }
}
This is a VS Code-specific implementation choice. The MCP specification does not mandate a config file format — VS Code chose a different key. See the comparison page for a full breakdown of differences.
Available Tools (7)
free
tokens
free
free
free
free
free
Operators (6)
John Smith → [CLIENT] or [PERSON]
john@acme.com → (removed)
John Smith → a3f9b1...
4111-xxxx → enc:U2FsdGVkX1...
john@acme.com → jo**@****.com
John Smith → John Smith (tracked)
Using with GitHub Copilot Agent
Before processing this code review request, use anonym_legal_anonymize_text to replace all developer names with [DEV] and all email addresses with [EMAIL]. "Review the code by alice.smith@company.com — she pushed a fix for Bob Johnson's reported bug in auth.ts"
Troubleshooting
Tools not showing in Copilot chat
Confirm you're in Agent mode (not Ask or Edit). Agent mode is required for MCP tool access. Look for the mode dropdown in the Copilot Chat panel header.
Server shows "disconnected" in MCP panel
Check the .vscode/mcp.json is using "servers" (not "mcpServers"). Also verify the "type" field is present: "type": "http" for HTTP or "type": "stdio" for stdio.
VS Code says "MCP is not supported"
Update VS Code to 1.99 or later. MCP support was added in the April 2025 release. Run Help → Check for Updates.
Copilot doesn't auto-invoke tools
In Agent mode, Copilot may ask for confirmation before running MCP tools. Check VS Code settings for github.copilot.chat.mcp.autoApprove if you want to allow automatic invocation.