Where VS Code’s MCP config lives, the servers + inputs format, which transports it supports, and how to fix the common failures — plus how to put a policy gate in front of every tool call.
QUICK ANSWERQuick answer: workspace config in .vscode/mcp.json, user-level config in the profile’s mcp.json. Top-level key is servers — not mcpServers.
| Scope | Path | Notes |
|---|---|---|
| Workspace | .vscode/mcp.json | At the workspace root. Commit it to share servers with the team. |
| User profile | mcp.json (in your VS Code profile) | Open it with MCP: Open User Configuration from the Command Palette; servers here load in every workspace. |
MCP servers no longer live in settings.json — VS Code moved them to a dedicated mcp.json. The file gets full IntelliSense when edited in VS Code.
Two top-level keys: servers (the server entries) and optional inputs (prompted variables, so secrets never sit in the file). Reference inputs as ${input:id}.
| Key | What it does |
|---|---|
type | stdio, http, or sse. |
command | Executable for a stdio server. |
args | Array of arguments passed to the command. |
env | Environment variables. Supports ${input:id}, ${env:VAR} and ${workspaceFolder}. |
cwd | Working directory for a stdio server. |
url | Endpoint for an http or sse server. |
headers | HTTP headers sent with every request — where auth tokens go. |
inputs | Top-level array of prompted variables (promptString, optional password: true); VS Code asks once on first start and stores the value securely. |
{
"inputs": [
{
"type": "promptString",
"id": "github-token",
"description": "GitHub PAT",
"password": true
}
],
"servers": {
"github": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github-token}"
}
}
}
} REMOTE SERVER (HTTP):
{
"servers": {
"my-remote": {
"type": "http",
"url": "https://example.com/mcp",
"headers": {
"Authorization": "Bearer ${input:token}"
}
}
}
} | Transport | Status | How to declare it |
|---|---|---|
| stdio | Supported | "type": "stdio" with command + args. |
| Streamable HTTP | Supported | "type": "http" with url. VS Code tries streamable HTTP first for remote URLs. |
| SSE | Supported | "type": "sse"; also the automatic fallback when a remote server doesn’t speak streamable HTTP. |
MCP: Add Server walks you through the setup and asks whether to target the workspace or your user profile.
Create .vscode/mcp.json (or open the user file via MCP: Open User Configuration) and add entries under servers — with full IntelliSense.
Search @mcp in the Extensions view, or browse the curated gallery at code.visualstudio.com/mcp; install to the user profile or right-click → Install in Workspace.
MCP: List Servers from the Command Palette — select a server and choose Show Output for its logs.VS Code caps a chat request at 128 enabled tools. Open the tools picker and deselect tools or whole servers you don’t need.
Check for the trust dialog — a server is blocked until you confirm trust, and the prompt reappears after config changes.
Restart the server from MCP: List Servers, or enable chat.mcp.autoStart (experimental) to auto-restart on config change.
Shell-based commands may need wrapping (e.g. cmd /c). Use MCP: List Servers → Show Output to see the spawn error.
If your Copilot org policy disables MCP, servers are silently unavailable — an admin must enable the MCP policy in GitHub Copilot settings.
A standard GitHub MCP wired into VS Code Copilot. Every call hits GitHub directly with no policy gate.
{
"servers": {
"github": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_..."
}
}
}
} VS Code supports streamable HTTP natively. Register GitHub in PolicyLayer, mint a grant, point VS Code at the proxy URL. PolicyLayer evaluates every call against the grant’s policy before it reaches GitHub.
{
"servers": {
"github": {
"type": "http",
"url": "https://proxy.policylayer.com/mcp/<server-uuid>/",
"headers": {
"Authorization": "Bearer <grant-token>"
}
}
}
} The <server-uuid> appears on each server's detail page. The <grant-token> shows once at mint time. See the Quick start for the full setup walk-through — and if you operate under SOC 2, HIPAA, GDPR or similar, the compliance hub maps how gateway-mediated MCP traffic evidences each framework.
Allow listing and issue creation. Deny merges into main. Deny everything else by default.
{
"version": "1",
"default": "deny",
"tools": {
"list_repositories": {},
"create_issue": {},
"merge_pull_request": {
"deny_if": [
{
"conditions": [
{ "path": "args.base", "op": "eq", "value": "main" }
]
}
]
}
}
} See Writing policies for the policy format, operators, and quota shapes.
Workspace servers go in .vscode/mcp.json at the workspace root. User-level servers live in a dedicated mcp.json in your VS Code profile — open it with MCP: Open User Configuration. MCP config no longer lives in settings.json.
VS Code’s mcp.json schema uses servers as the top-level key, plus an optional inputs array for prompted secrets. Configs copied from clients that use mcpServers need the key renamed.
Define an input in the inputs array with password: true and reference it as ${input:id} in env or headers. VS Code prompts once on first server start and stores the value securely — so the committed file contains no secrets.
A single chat request can use at most 128 enabled tools. With several MCP servers enabled it is easy to exceed this — deselect tools or servers in the tools picker, or route through a gateway that exposes a curated subset.
MCP availability in Copilot is controlled by a GitHub Copilot organisation policy, and enterprises can also restrict it via VS Code device settings. If the options are missing, an admin has it switched off.
Route your MCP traffic through PolicyLayer. Every tool call is checked against your policy before it runs: allow, deny, or require approval. Per-identity grants. Full audit log. Live in minutes.
Instant setup, no code required.
46,500+ MCP servers and 515,000+ tools scanned and risk-classified.