Dev blog · Guides · 2026-11-20 · updated 2026-11-25
How to add MCP servers to Cursor, GitHub Copilot, Gemini CLI and Claude Desktop
Every agent speaks MCP. No two of them keep it in the same file. Cursor wants mcp.json, Copilot wants mcp-config.json, Gemini CLI tucks servers into its general settings.json, and Claude Desktop has its own file in your app data folder.
This guide covers all four, with the exact path, a working example and the command that writes the file for you where one exists. Claude Code and Codex have their own guide.
The short version:
| Agent | User-wide file | Project file | Remote servers in the file? |
|---|---|---|---|
| Cursor | ~/.cursor/mcp.json |
.cursor/mcp.json |
Yes, url |
| GitHub Copilot (VS Code and Copilot CLI) | ~/.copilot/mcp-config.json |
.mcp.json |
Yes, type: "http" |
| Gemini CLI | ~/.gemini/settings.json |
.gemini/settings.json |
Yes, httpUrl |
| Claude Desktop | claude_desktop_config.json |
none | No, use Settings |
~ is your user folder. On Windows that’s C:\Users\<you>. All four files use the same top-level key, mcpServers, and then disagree about almost everything inside it.
Don’t want to edit any of these files? Calyban writes all four formats for you, in one click. Skip to how it works.
Two caveats before you start. Restart the agent (or open a new chat) after any edit, because none of them reload MCP config mid-conversation. And Copilot and Gemini CLI only load a project’s file once you’ve trusted that folder.
Cursor
Cursor reads ~/.cursor/mcp.json for servers you want everywhere and .cursor/mcp.json inside a project for that project only. Create the file if it isn’t there.
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "@playwright/mcp@latest"]
},
"context7": {
"url": "https://mcp.context7.com/mcp",
"headers": { "CONTEXT7_API_KEY": "${env:CONTEXT7_API_KEY}" }
}
}
}
A local server gets command, args and optionally env. A remote one gets url and optionally headers. Cursor works out SSE versus streamable HTTP by itself, so the keys are the same for both.
Keep keys out of the file with ${env:NAME}, which Cursor fills in from your environment. It also understands ${userHome} and ${workspaceFolder}, handy for servers that need a path.
To check it worked, find the MCP section in Cursor’s settings. It lists each server with the tools it found, and you can switch one off there without deleting it. The file itself has no documented off switch.
Cursor also has a marketplace with an Add to Cursor button. That’s fine for what’s listed there. For everything else, it’s the file.
GitHub Copilot
This one confuses people, because “Copilot” is three products that now share one config.
VS Code’s Copilot chat and Copilot CLI both read ~/.copilot/mcp-config.json. If you’ve set COPILOT_HOME, it’s in that folder instead.
{
"mcpServers": {
"playwright": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@playwright/mcp@latest"],
"tools": ["*"]
},
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp",
"headers": { "CONTEXT7_API_KEY": "${CONTEXT7_API_KEY}" },
"tools": ["*"]
}
}
}
tools limits which of a server’s tools Copilot may use. ["*"] means all of them. GitHub’s own docs use "type": "local" for command servers in one place and “STDIO” in another. Copilot CLI accepts stdio and lists it as local, which we checked on Copilot CLI 1.0.114.
Or skip the JSON. Copilot CLI writes it for you:
copilot mcp add playwright -- npx -y @playwright/mcp@latest
copilot mcp add --transport http context7 https://mcp.context7.com/mcp
copilot mcp list
Inside a Copilot CLI session, /mcp add opens a form instead.
The project file is .mcp.json at the repo root, the same file Claude Code uses. One file, two agents. That’s convenient if your team uses both, and a surprise if you didn’t know. Copilot CLI also reads .github/mcp.json.
If you have an older .vscode/mcp.json (the one with a servers key and an inputs list), VS Code’s docs say that format is deprecated and will be removed in February 2027. New setups should use the files above. Copilot CLI doesn’t read .vscode/mcp.json at all.
Gemini CLI
Gemini CLI keeps MCP servers in ~/.gemini/settings.json, next to every other setting it has. A project can have .gemini/settings.json.
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "@playwright/mcp@latest"]
},
"context7": {
"httpUrl": "https://mcp.context7.com/mcp",
"headers": { "CONTEXT7_API_KEY": "$CONTEXT7_API_KEY" }
}
}
}
Watch the remote key. In Gemini CLI, httpUrl means streamable HTTP and url means the older SSE transport. Most hosted servers today want httpUrl. Put a modern server’s address under url and it won’t connect, with nothing in the file to tell you why.
The command line is easier:
gemini mcp add --scope user playwright npx -y @playwright/mcp@latest
gemini mcp add --scope user --transport http context7 https://mcp.context7.com/mcp
gemini mcp list
gemini mcp add defaults to the project scope, so without --scope user the server lands in .gemini/settings.json in whatever folder you’re standing in. If a server “disappears” when you change folders, that’s usually why.
gemini mcp list shows command servers as Disconnected in folders you haven’t trusted. Run gemini trust in the folder, or open Gemini there and accept the prompt.
One more thing from Google’s docs: on 2026-06-18 Gemini CLI was replaced by Antigravity CLI for unpaid and Google One users. If that’s you, this section may not apply.
Claude Desktop
Claude Desktop is the odd one out. It has one file, no project scope and no command to write it.
Open it from the app: Settings → Developer → Edit Config. That creates the file if it’s missing and shows you where it lives:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
On Windows there’s a catch the docs don’t mention. The Microsoft Store build keeps its config in %LOCALAPPDATA%\Claude-Data\claude_<package id>\ and leaves %APPDATA%\Claude empty. Edit Config opens the right one, so start there if your edits seem to be ignored.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "C:\\Users\\you\\Documents"]
}
}
}
Only local servers go in this file. Hosted ones like Notion or Linear are added in Settings → Connectors instead, and they don’t touch the file at all.
Then quit Claude Desktop completely and open it again. Closing the window isn’t always enough, because the app can keep running in the tray, and it only reads the file when it starts. If it still fails, the logs are in %APPDATA%\Claude\logs (or ~/Library/Logs/Claude on a Mac).
When a server won’t start
Run the command yourself first. Paste npx -y @playwright/mcp@latest into a terminal. If it errors there, no config file will fix it. Command servers need Node.js for npx and uv for uvx.
On Windows, try cmd /c. Some agents can’t start npx directly, because on Windows it’s a .cmd script, not a program. Use "command": "cmd" with "args": ["/c", "npx", "-y", "@playwright/mcp@latest"].
Check the remote key name. It’s url in Cursor, type: "http" plus url in Copilot and httpUrl in Gemini CLI. Claude Desktop doesn’t take remote servers in its file at all. Copying a block written for one agent into another agent’s file gets this wrong without any error.
Check JSON commas. A trailing comma is invalid JSON, and in a strict file it takes down every server, not just the one you added. Gemini CLI is the forgiving one: it accepts comments in settings.json.
The one-click way
All of the above is four file formats, three key names for “remote” and two scope defaults that point in opposite directions. Calyban is a free desktop app that writes these files for you.
Search the catalog, press Install, and pick the agents. Calyban writes each agent’s own format into its own file, adds the cmd /c wrapper on Windows, asks for any API key and keeps it in that agent’s config on your PC. It also:
- skips agents that can’t take a server (a hosted server never goes into Claude Desktop’s file),
- runs a safety check on the server’s launch command first,
- backs up each file before its first edit, and Undo gives back the original bytes,
- never touches servers you added by hand.
The catalog has 1,211 MCP servers, each with its own page and the manual commands filled in, like Playwright and Context7.
Calyban runs on Windows and Linux; Mac is in testing. Every format above comes from each agent’s own documentation and real config files, and Gemini CLI and Copilot CLI were tested against the real programs.
FAQ
Can one MCP config work for every agent? No. They all use mcpServers, but the remote keys differ, and each agent reads only its own file. The one overlap is .mcp.json in a project, which both Claude Code and Copilot read.
Does Cursor read Claude Code’s MCP servers? Not its MCP servers. It does load skills from Claude Code’s and Codex’s folders. More on that in where agent skills go.
Where is Cursor’s MCP config on Windows? C:\Users\<you>\.cursor\mcp.json for every project, or .cursor\mcp.json inside one project.
Why doesn’t Claude Desktop see my remote MCP server? Its config file only takes local servers. Add hosted ones in Settings → Connectors.
Which MCP servers are worth adding? Start with the 25 best MCP servers. If MCP is new to you, read what an MCP server is first. Before installing anything, this five-minute check is worth doing.
Found a path that’s moved, or an agent we should cover next? Tell us on Discord. Calyban is free. If it saves you an afternoon, a coffee keeps it going.