
How to add an MCP server to GitHub Copilot CLI
Add MCP servers to GitHub Copilot CLI with copilot mcp add, /mcp add or ~/.copilot/mcp-config.json, or share them with a repo in .github/mcp.json.
- Local servers
- Yes
- runs stdio servers
- Hosted servers
- Yes
- connects by URL
- Config
- JSON
- how servers are added
- Picks
- 7
- ranked
Run copilot mcp add <name> -- <command> for a local server or copilot mcp add --transport http <name> <url> for a hosted one. Copilot CLI saves it to ~/.copilot/mcp-config.json, and a repository can carry its own servers in .github/mcp.json or .mcp.json. The GitHub MCP server is already built in. You need an active Copilot subscription, and an organization can limit which servers run.
Good for
- Developers with a Copilot subscription who work in the terminal
- Teams that commit shared servers to .github/mcp.json
- Organizations that control servers with a registry and allowlist
- People running copilot -p in scripts who need servers to load
Install GitHub Copilot CLI
Copilot CLI
- 1
Copy this prompt.
Add the GitHub Copilot CLI MCP server to Copilot CLI. Run this command: npm install -g @github/copilot Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Copilot CLI. It shows the change and asks before running it.
Requires Active Copilot subscription.
Run copilot and use /login to sign in with GitHub. The GitHub MCP server is already built in, so you only add other servers.
From the vendor's docs. Source.
At a glance
- Add a local server
- copilot mcp add <name> -- <command> [args...]
- Add a hosted server
- copilot mcp add --transport http <name> <url>
- Project config
- .mcp.json (any folder up to the repo root) or .github/mcp.json; loaded only in trusted folders
- Connectors
- /mcp, then Connectors view, for services GitHub sets up and signs in for you (public preview)
- Check servers
- copilot mcp list, or /mcp in a session
- Default timeout
- 30,000 ms for tool discovery and tool calls
Add an MCP server to GitHub Copilot CLI
- 1
Add a local server with copilot mcp add
Put the launch command after
--. Pass keys with--env.copilot mcp add context7 -- npx -y @upstash/context7-mcp copilot mcp add github --env GITHUB_PERSONAL_ACCESS_TOKEN=YOUR_GITHUB_PAT -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-serverUses Context7
- 2
Or add a hosted server by URL
copilot mcp add --transport http notion https://mcp.notion.com/mcp copilot mcp add --transport http --header "Authorization: Bearer YOUR-TOKEN" stripe https://mcp.stripe.comUse
--transport ssefor the older SSE type. - 3
Or use the form inside a session
Start
copilot, type/mcp add, fill in the name, server type and command or URL, then press Ctrl+S. The server is available at once, with no restart. - 4
Or edit mcp-config.json by hand
Open
~/.copilot/mcp-config.json:{ "mcpServers": { "playwright": { "type": "local", "command": "npx", "args": ["@playwright/mcp@latest"], "env": {}, "tools": ["*"] }, "context7": { "type": "http", "url": "https://mcp.context7.com/mcp", "headers": { "CONTEXT7_API_KEY": "YOUR-API-KEY" }, "tools": ["*"] } } } - 5
Share servers with a repository
Put the same JSON in
.github/mcp.json(committed and shared) or.mcp.json(per checkout). Copilot CLI loads these only after you trust the folder..vscode/mcp.jsonis not read. - 6
Check it loaded
Run
copilot mcp listin your shell, or/mcpinside a session.copilot mcp get <name>shows its status and tools. - 7
Sign in, disable or remove
For a server that needs OAuth, run
/mcp auth <name>. Runcopilot mcp disable <name>to keep it configured but unused, andcopilot mcp remove <name>to delete it.
Best MCP servers for GitHub Copilot CLI
Official servers with an approved PlugWiki page whose transport Copilot CLI supports (stdio or HTTP); ordered by GitHub stars, then weekly downloads.
- 1
Context7OfficialHosted or LocalAPI keyGives the assistant current library docs.
64,001 GitHub stars - 2
Playwright MCPOfficialLocalDrives a real browser so the assistant can test what it builds.
38,887 GitHub stars - 3
GitHub MCP ServerOfficialHosted or LocalOAuthPull requests, issues and code search beyond what git can do.
34,115 GitHub stars - 4
Stripe MCPOfficialHosted or LocalOAuthStripe's hosted server for payments, customers and refunds.
2,014 GitHub stars - 5
sentry-mcpOfficialHosted or LocalOAuthPulls Sentry errors into the assistant so it can find the cause.
952 GitHub stars - 6
ZapierOfficialHostedOAuthReaches thousands of apps through the actions you set up in Zapier.
452 GitHub stars - 7
Firecrawl MCP ServerOfficialHosted or LocalAPI keyTurns web pages into clean text, using your Firecrawl key.
190,711/wk downloads a week
MCP servers that work in GitHub Copilot CLI
40 · official first, then servers with a page, then by stars
Scrapling MCP ServerOfficialLocalNo sign-inWeb scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
90.6K GitHub stars
Context7OfficialHosted or LocalAPI keyUp-to-date docs for AI agents
64K GitHub stars
Chrome DevTools MCPOfficialLocalMCP server for Chrome DevTools
54.5K GitHub stars
Playwright MCPOfficialLocalPlaywright MCP server
38.9K GitHub stars
GitHub MCP ServerOfficialHosted or LocalOAuthGitHub's official MCP server. Lets an AI assistant read code, manage issues and pull requests, check Actions runs and security alerts. Hosted at api.githubcopilot.com/mcp or run locally with Docker or a Go binary.
34.1K GitHub stars
OpenWork MCP GatewayOfficialHostedOAuthYour OpenWork org's skills, plugins, workflows, and connections through one OAuth MCP URL.
24.3K GitHub stars
MCP Toolbox for DatabasesOfficialLocaltoken in envMCP Toolbox for Databases enables your agent to connect to your database.
16.8K GitHub stars
apify-mcp-serverOfficialHosted or LocalOAuthExtract data from any website with thousands of scrapers, crawlers, and automations on Apify Store ⚡
14K GitHub stars
SeleniumBase MCPOfficialLocalNo sign-inStealthy browser automation, testing, and web-scraping via CDP Mode.
13.2K GitHub stars
AutoClipOfficialLocalNo sign-inClip long videos into short clips with covers and captions. Local CLI and MCP.
9.9K GitHub stars
Firecrawl MCP ServerOfficialHosted or LocalAPI keyFirecrawl, the context API for AI agents: search, scrape, interact with the web, plus paper search.
7.7K GitHub stars
firecrawl-mcp-serverOfficialLocalAPI keyOfficial Firecrawl MCP server, the context API for AI agents: search, scrape, and interact with the web, plus parse, crawl, map, Agent and Monitor, from any MCP client.
7.7K GitHub stars
MobileBuildMCPOfficialLocalBuild, run and test iOS and macOS apps, drive the simulator and debug with LLDB from your AI assistant. Formerly XcodeBuildMCP.
6.5K GitHub stars
magic-mcpOfficialLocalAPI keyIt's like v0, but in your Cursor / Claude Code / Windsurf: search 10,000+ React/Tailwind components, generate new UI with AI, and publish your own — right from your editor. Magic MCP is now the 21st MCP; this package keeps old configs working. Setup: 21st.dev/mcp
6.3K GitHub stars- Excalidraw MCPOfficialHosted or LocalNo sign-in
Official Excalidraw MCP App server: streams hand-drawn diagrams into the chat with interactive fullscreen editing. Hosted or local.
5.6K GitHub stars
Exa MCP ServerOfficialHosted or LocalOAuthConnect AI agents to Exa for web search, content fetching, and multi-step research.
5.2K GitHub stars
notion-mcp-serverOfficialLocaltoken in envOfficial Notion MCP Server
4.7K GitHub stars
mcp-grafanaOfficialHosted or LocalAn MCP server giving access to Grafana dashboards, data and more.
3.6K GitHub stars- Google Analytics MCP ServerOfficialLocaltoken in env
Google's official Google Analytics MCP server: runs locally and queries GA4 reports and property settings with your Google credentials. Read-only unless you add the --allow-write flag.
3.6K GitHub stars
SupabaseOfficialHosted or LocalOAuthMCP server for interacting with the Supabase platform
3K GitHub stars
Show all 40Show fewer
brightdata-mcpOfficialLocaltoken in envA powerful Model Context Protocol (MCP) server that provides an all-in-one solution for public web access.
2.7K GitHub stars
Perplexity MCP ServerOfficialHosted or LocalOAuthConnector for Perplexity API, to enable real-time, web-wide research.
2.6K GitHub stars
tavily-mcpOfficialLocalProduction ready MCP server with real-time search, extract, map & crawl.
2.5K GitHub stars
Solana MCP by VybeOfficialHostedOAuthSolana MCP developer toolkit: wallets, trades, markets, PnL, transfers, onchain, swaps & API tools.
2.2K GitHub stars
Azure DevOps (ADO)OfficialHostedOAuthThe MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
2.1K GitHub stars
Azure DevOps Local MCP ServerOfficialLocalOAuthThe MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
2.1K GitHub stars
anysearch-mcp-serverOfficialHostedAPI keyUnified real-time search MCP server supporting general web search, vertical domain search, parallel batch search, and full-page URL content extraction.
2.1K GitHub stars
Microsoft Learn MCPOfficialHostedNo sign-inOfficial Microsoft Learn MCP Server – real-time, trusted docs & code samples for AI and LLMs.
2K GitHub stars- WordPress MCP AdapterOfficialLocal
The official WordPress plugin that turns a self-hosted site into an MCP server, exposing Abilities API actions from core, plugins and themes over STDIO (WP-CLI) or HTTP.
1.9K GitHub stars
MeiGen-AI-Design-MCPOfficialHosted or LocalOAuthDiscover inspiration and create images and videos with the latest AI models. Works with ChatGPT, Claude, Cursor, and other MCP clients.
1.8K GitHub stars
MATLAB MCP ServerOfficialLocalNo sign-inConnect AI coding agents to MATLAB. Run code, tests, and analysis via MCP.
1.7K GitHub stars
datagouv-mcpOfficialHostedNo sign-inOfficial data.gouv.fr Model Context Protocol (MCP) server that allows AI chatbots to search, explore, and analyze datasets from the French national Open Data platform, directly through conversation.
1.6K GitHub stars
MiniMax-MCPOfficialLocalAPI keyOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
1.6K GitHub stars
mcp-server-qdrantOfficialLocalAPI keyAn official Qdrant Model Context Protocol (MCP) server implementation
1.6K GitHub stars
TerraformOfficialHosted or LocalAPI keyGenerate more accurate Terraform and automate workflows for HCP Terraform and Terraform Enterprise
1.6K GitHub stars
@brave/brave-search-mcp-serverOfficialLocalBrave Search MCP Server: web results, images, videos, rich results, AI summaries, and more.
1.5K GitHub stars
IDA MCPOfficialLocalNo sign-inOfficial Hex-Rays MCP server that lets AI agents open, decompile and annotate binaries in IDA, alongside you in the IDA GUI or headless.
1.5K GitHub stars- X MCP (X API)OfficialHosted or LocalOAuth
X's hosted MCP server for the X API at api.x.com/mcp: AI clients search posts, read users, trends and news, manage bookmarks and publish Articles through your X developer app, directly or via the xurl mcp bridge.
1.4K GitHub stars
Power BI Authoring MCP Server (Local)OfficialLocalOAuthThe Power BI Authoring MCP server lets an AI agent create and change Power BI semantic models.
1.3K GitHub stars
ref-tools-mcpOfficialLocalAPI keyToken efficient search for coding agents over public and private documentation.
1.2K GitHub stars
Common errors and fixes
Servers in .mcp.json or .github/mcp.json do not load
Cause: Project-level servers are skipped silently in folders you have not trusted.
Fix: Start copilot in the folder and confirm trust, or add the server with copilot mcp add.
copilot-cli Source
Project servers missing in copilot -p runs
Cause: Prompt mode cannot ask for trust, so it skips project servers in untrusted folders.
Fix: Trust the folder first, pass --trust-folder, or set GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP=true.
copilot-cli Source
Servers from .vscode/mcp.json are ignored
Cause: Copilot CLI does not read that file; VS Code uses the key servers.
Fix: Move the entries to .github/mcp.json under mcpServers.
copilot-cli Source
Remote server shows needs-auth
Cause: The OAuth token expired, or the server needs a different account.
Fix: Run /mcp auth <server-name> and sign in again.
copilot-cli Source
/mcp edit or /mcp delete refuses a server
Cause: The server comes from a repository .mcp.json, not your user file.
Fix: Edit the file named in the error message.
copilot-cli Source
A server is blocked or missing
Cause: Your organization set a registry URL and allowlist policy.
Fix: Ask an administrator to allow the server, or use one on the allowlist.
copilot-cli Source
Connector cannot be connected
Cause: Copilot connectors are in public preview and your organization may not allow them.
Fix: Ask an administrator to update the Copilot policy for connectors.
copilot-cli Source
A slow server warns it is taking too long to connect
Cause: The server takes more than 10 seconds to connect.
Fix: Raise slowConnectionThresholdMs to quiet the warning; timeout sets the real limit.
copilot-cli Source
Verdict
Copilot CLI gives you three ways to add a server (command, in-session form or JSON), shared repo configs, and the GitHub MCP server built in. The main limit is that it needs a Copilot subscription, and an organization allowlist can block servers you add.
Copilot CLI gives you three ways to add a server (command, in-session form or JSON), shared repo configs, and the GitHub MCP server built in. The main limit is that it needs a Copilot subscription, and an organization allowlist can block servers you add.
Best for
- Developers who already pay for GitHub Copilot
- Teams that share servers by committing .github/mcp.json
Skip it if
- You want to reuse a VS Code mcp.json without changes
- Your organization restricts MCP servers and you cannot change the policy
Questions
How do I add an MCP server to GitHub Copilot CLI?
Run copilot mcp add <name> -- <command> for a local server, or copilot mcp add --transport http <name> <url> for a hosted one. You can also type /mcp add inside a session.
Where is the Copilot CLI MCP config file?
~/.copilot/mcp-config.json, under the mcpServers key. Set COPILOT_HOME to move the folder. A repository can add .github/mcp.json or .mcp.json.
Does Copilot CLI support remote HTTP MCP servers?
Yes. Use type "http" (streamable HTTP) or "sse" with a url, or copilot mcp add --transport http <name> <url>.
Does Copilot CLI support OAuth for MCP servers?
Yes, for remote servers. Run /mcp auth <server-name> to sign in or switch accounts. For CI with no browser, set oauthGrantType to "client_credentials".
Is the GitHub MCP server already in Copilot CLI?
Yes. It is built in and works without setup. Pass --disable-builtin-mcps to turn it off.
Project or global MCP servers in Copilot CLI?
copilot mcp add writes to your user file, ~/.copilot/mcp-config.json. Project servers go in .github/mcp.json or .mcp.json, and they win over user servers with the same name.
How do I disable an MCP server in Copilot CLI?
Run copilot mcp disable <name> or /mcp disable <name>. It stays configured and the setting persists. Use --disable-mcp-server <name> to skip one for a single run.
Can I reuse my VS Code mcp.json in Copilot CLI?
Not as it is. Copilot CLI does not read .vscode/mcp.json, because VS Code uses the top-level key servers. Copy the entries under mcpServers in .github/mcp.json instead.
Is Copilot CLI free to use with MCP servers?
You need an active Copilot subscription. Each prompt also counts against your monthly premium requests.
Why are my project MCP servers not loading in Copilot CLI?
Project servers load only in trusted folders and are skipped silently otherwise. In copilot -p runs, set GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP=true or pass --trust-folder.
Information
updated Nov 2, 2026
- Transports
- stdio, SSE, Streamable HTTP
- Config file (all)
~/.copilot/mcp-config.json- MCP docs
- github.com
Sources
Docs, issue trackers and discussions this page is built from.
Show all 3Hide
- GitHub Copilot CLI README · github.com
- Adding MCP servers for GitHub Copilot CLI · docs.github.com
- GitHub Copilot CLI command reference · docs.github.com