Data coding-agents/

GitHub Copilot CLI MCP config: file location, transports and auth

One row of the MCP client config reference, checked 2026-12-06.

Published
Read
1 min
Source
Markdown
Client
GitHub Copilot CLI
Vendor
GitHub
Config file
~/.copilot/mcp-config.json (user); .mcp.json or .github/mcp.json in the workspace, loaded from the working directory up to the Git root (.mcp.json wins); .vscode/mcp.json is not read
Format
JSON, mcpServers object (workspace files may omit the wrapper); copilot mcp add or /mcp add
Scopes
User and workspace (trusted folders only); plugin-provided servers; --additional-mcp-config for one session
Transports
stdio (type local or stdio, the default); http (Streamable HTTP; streamable-http alias); sse (legacy, deprecated)
Remote OAuth
Yes. Browser OAuth by default (authorization code with PKCE and DCR); /mcp auth <server-name> re-runs it; oauthClientId for a static client; oauthGrantType client_credentials for headless use; --device-code forces the device code flow; --header as an alternative
Admin controls
Organization or enterprise registry URL and allowlist policy apply to the CLI; the allowlist check is fail-closed; built-in default servers are exempt
Docs
https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers
Source
https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference

From the MCP client config reference, checked Dec 6, 2026. Licence CC BY 4.0.

Copilot CLI keeps user servers in ~/.copilot/mcp-config.json and reads workspace servers from .mcp.json or .github/mcp.json. When both files sit in one directory, .mcp.json wins, per GitHub’s setup guide. The CLI doesn’t read .vscode/mcp.json. Workspace files load only in trusted folders, and --additional-mcp-config adds a server for one session at the highest priority, per the CLI command reference.

Remote servers sign in with browser OAuth by default. /mcp auth <server-name> starts a fresh OAuth flow. oauthClientId sets a static client that skips dynamic registration, and oauthGrantType: "client_credentials" skips the browser for headless use.

GitHub Enterprise organizations can enforce an allowlist of permitted servers. GitHub’s reference says the check is fail-closed: non-default servers are blocked if the policy can’t be verified. Built-in default servers are exempt.

Sources

  1. Adding MCP servers for GitHub Copilot CLIGitHub Docs docs.github.com
  2. GitHub Copilot CLI command referenceGitHub Docs docs.github.com

Cite this page

Agents for Devs. "GitHub Copilot CLI MCP config: file location, transports and auth." Published Dec 6, 2026. https://agentsfordevs.com/mcp-clients/github-copilot-cli