How GitHub Copilot CLI handles MCP
GitHub Copilot CLI can load MCP servers from a project or user config. Project servers are only picked up after you trust the folder, which keeps an unfamiliar repository from silently adding tools.
Project or global. Project scope keeps the server with the repository; global scope makes it available in every workspace.
Terminal work in GitHub-centric repositories.
-a github-copilot-cliWhere the MCP config lives
The installer writes this file for you. Use the paths below when you want to inspect, edit, or remove a server by hand.
.mcp.jsonor an existing .github/mcp.json
~/.copilot/mcp-config.jsonProject paths are relative to the workspace. Global paths are per user. On Windows, ~ means your user folder; use %USERPROFILE% in Explorer or PowerShell. A project config is shared with the team; a global config is personal.
Add a remote server
Start with a server in the MCP directory, or use your provider's endpoint. The examples use https://mcp.example.com/mcp so you can see the shape; replace it with the real URL.
- 01
Find the endpoint
Open a server page and copy its hosted endpoint. Do not use a local command or an npm package name for a remote server; those are different connection types.
Open the MCP directory - 02
Run the installer
Use the project config for a repository-specific server, or the global config for every workspace. The server name becomes
examplein the config.GitHub Copilot CLI · project# Add this to GitHub Copilot CLI MCP settings: { "mcpServers": { "example": { "type": "http", "url": "https://mcp.example.com/mcp" } } }GitHub Copilot CLI · global# Add this to GitHub Copilot CLI MCP settings: { "mcpServers": { "example": { "type": "http", "url": "https://mcp.example.com/mcp" } } }If the server page says SSE instead of HTTP, add
--transport sse:SSE variant# Add this to GitHub Copilot CLI MCP settings: { "mcpServers": { "example": { "type": "sse", "url": "https://mcp.example.com/mcp" } } } - 03
Authorize if the provider asks
The first connection may open a browser for OAuth. Sign in with the provider and approve only the scopes you need. If the server uses an API key, create it in the provider's dashboard and add it through the client's auth flow or config.
Never paste a provider token into a project config you will commit. Prefer the client's secret store or a user-level config for credentials.
- 04
Reload and verify
Run `copilot mcp list --json`. Trust the project folder first if this is a project install.
Then ask for a task, not a tool: “Find the open issues assigned to me” or “Summarize the latest release.” The client decides which advertised tool to call.
What changes in the chat
Once the server is connected, its tools appear in the client's tool list. You still talk to the agent normally; MCP is plumbing, not a different chat interface.
“Find the customer notes mentioning the migration and summarize the blockers.”
“Create a draft page with this outline, but do not publish it yet.”
“Check the failed deployment and list the last three changes that touched it.”
“Which MCP tools do you have available for this task?”
If the agent ignores the server, check that the server is enabled and that its tools are approved. Some clients require a per-tool confirmation before the first call.
When it does not connect
The server is missing
Confirm the file exists at the path above, the JSON or TOML is valid, and you restarted the client or opened a new session.
It connects but tools are empty
Enable the server in the client's MCP UI, approve its tools, and check that the provider has not revoked your token.
OAuth keeps reopening
Remove the server from the client, revoke the app's access in the provider's account settings, then add it again.
A project server is ignored
Some clients require you to trust the folder before loading project MCP config. Trust the repository, then start a new session.
What to watch for in Copilot CLI
- A project install does not take effect until Copilot CLI trusts the folder.
- `.mcp.json` is shared with Claude Code. Removing a server from either client removes it for both.
- If a project already has `.github/mcp.json`, use that file instead of creating `.mcp.json`.
Remove or reset the server
Remove the server when it is no longer needed, or reset it when a credential or connection state gets stuck.
- Remove the server from the Copilot CLI MCP config.
- Start a new Copilot CLI session and run
copilot mcp list. - Confirm that the server and its tools are absent.
Remove and re-add the server to clear a stuck approval or token.
Official documentation
Client behavior changes. These links are the source of truth for paths, flags, and approval behavior.