Configure MCP servers
Unlock the complete study guide.
Bundled into the existing Developing in Agentic AI Systems premium course — no separate purchase.
14-day money-back guarantee — no questions asked.
Included in this chapter:
- Three configuration surfaces, and which agent reads each
- Declaring a server: a launched process or an independent endpoint
- Porting an editor entry to repository settings
- What a cloud agent session can reach, and what it cannot
- Autonomy makes the tools list a security control
- Proving a cloud agent's MCP server started
- In the editor: from a definition to a running server
- In the editor: shipping a server definition safely
- Tools, resources and prompts: three ways the editor uses a server
- Fleet governance: restricting the catalog does not restrict the source
- Fleet governance: which named servers may run
- Fleet governance: which value applies when policy sources overlap
- Fleet governance: confirming what a device actually enforces
Which MCP control does what, and where it lives
| Goal | Control | Where it is set | What it does not do |
|---|---|---|---|
| Give cloud agent and code review a server | An entry in the `mcpServers` object | Repository Settings > Copilot > MCP servers | Reach a developer's editor, which reads its own file |
| Share a server with one project's team | An entry under the top-level `servers` object | The editor file at workspace scope: `.vscode/mcp.json`, committed | Apply to agent sessions running on GitHub |
| Keep a personal server across projects | The editor file at user-profile scope | MCP: Open User Configuration | Travel to colleagues through source control |
| Give one custom agent its own server | MCP servers declared in the profile | That custom agent profile | Override repository MCP settings, which are processed later |
| Bound what an autonomous session may call | The `tools` field on each server entry | Repository MCP settings | Change the credential the server authenticates with |
| Read data outside the current repository | COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN | Agents secret, organization or repository level | Widen what the built-in read-only token can reach |
| Offer a curated catalog of servers | McpGalleryServiceUrl | VS Code enterprise policy | Stop a server added from another source |
| Restrict where servers may come from | ChatMCP | VS Code enterprise policy | Choose which catalog is displayed |
| Permit only named servers | allowedMcpServers | Copilot managed settings, or VS Code enterprise policy (the Copilot managed value wins where both set it) | Close other sources that can grant access |
| Remove one server from a broad approved set | deniedMcpServers | Copilot managed settings, or VS Code enterprise policy (the Copilot managed value wins where both set it) | Grant anything — deny entries only block |
| Make the enterprise-managed allowlist the only grant | allowManagedMcpServersOnly | Copilot managed settings | Add a server to that allowlist |
| Establish what a laptop actually enforces | Developer: Policy Diagnostics | Run in the affected VS Code instance | Change any value — it only reports |
Decision tree
Cheat sheet
Unlock with Premium — includes all practice exams and the complete study guide.