Guides: Hub Claude Desktop Cursor VS Code Windsurf Continue Cline Compare
🔵 VS Code — GitHub Copilot Agent Mode

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".

HTTP + stdio .vscode/mcp.json key: "servers" ⚠
Transport
HTTP (recommended)
Config key
servers ⚠
Config file
.vscode/mcp.json
Requires
Copilot + Agent mode
⚠ Critical VS Code Difference: VS Code uses "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)

1

Create .vscode/mcp.json

Create the file in your workspace root. Note the "servers" key (not "mcpServers"):

.vscode/mcp.json — HTTP methodjson
{
  "servers": {
    "anonym-legal": {
      "type": "http",
      "url": "https://anonym.legal/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
Notice: The HTTP entry also requires "type": "http" in VS Code — this is another VS Code-specific field not needed in other clients.
2

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.

3

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)

.vscode/mcp.json — stdio methodjson
{
  "servers": {
    "anonym-legal": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-server-anonym-legal"],
      "env": {
        "ANONYM_LEGAL_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
stdio type field: For stdio entries, set "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+PPreferences: Open User Settings JSON) and add:

settings.json (user level)json
{
  "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:

VS Code only
{
  "servers": { ... }
}
All other clients
{
  "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)

anonym_legal_analyze_text
free
Scan text and return all detected PII entities with type, position, and confidence score — without modifying anything.
anonym_legal_anonymize_text
tokens
Replace PII with reversible tokens using configurable operators per entity type. Returns anonymized text + session token map.
anonym_legal_detokenize_text
free
Restore original PII values from session tokens. Used to de-anonymize AI responses.
anonym_legal_get_balance
free
Returns your current token balance, plan tier, and next reset date.
anonym_legal_estimate_cost
free
Preview token cost for a text before anonymizing it. No tokens consumed.
anonym_legal_list_sessions
free
List all active tokenization sessions with creation time, entity count, and expiry.
anonym_legal_delete_session
free
Delete a session and all stored tokens — for GDPR right-to-erasure compliance.

Operators (6)

replace
Substitute with custom text or entity type label.
John Smith → [CLIENT] or [PERSON]
redact
Remove entirely — no trace left in the text.
john@acme.com → (removed)
hash
SHA-256 or SHA-512 — deterministic, one-way. Enables deduplication across documents.
John Smith → a3f9b1...
encrypt
AES-256 with your personal key — reversible only by key holder.
4111-xxxx → enc:U2FsdGVkX1...
mask
Partial replacement — configurable chars from start or end.
john@acme.com → jo**@****.com
keep
Detect but pass through unchanged. Useful to audit without modifying.
John Smith → John Smith (tracked)

Using with GitHub Copilot Agent

in Copilot Agent chat
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.

🇩🇪