How to Add an MCP Server to Claude, Cursor and VS Code
How to add an MCP server to Claude Code, Claude Desktop, claude.ai, Cursor and VS Code: exact commands, remote vs local, OAuth sign-in and common errors.
Dieser Artikel ist auf Englisch.
TL;DR. Every MCP client takes the same two facts, the server's own URL (remote) or its install command (local), and stores them in its own place. Claude Code uses claude mcp add in a terminal. claude.ai and Claude Desktop add remote servers under Customize, Connectors. Claude Desktop starts local servers from claude_desktop_config.json. Cursor reads .cursor/mcp.json, VS Code reads .vscode/mcp.json or a portable .mcp.json. Sign-in happens in a browser the first time the client connects. Each listing on mcp.tc has these steps filled in, with a button per client.
Remote or local: check this first
An MCP server is either a program your client starts on your computer (local, "stdio" in the spec) or a web service you point your client at (remote, "Streamable HTTP"). The MCP transports specification defines both, and the older HTTP+SSE transport is deprecated, so new servers should offer a single Streamable HTTP endpoint, usually at /mcp.
Which one you have changes what you paste:
- A remote server has a URL such as
https://mcp.notion.com/mcp. You add the URL. Nothing runs on your machine. - A local server has a package or command such as
npx -y @modelcontextprotocol/server-memory. Your client runs it as a child process, so you need the runtime it depends on (Node.js fornpx, uv foruvx, Docker fordocker).
claude.ai only connects to remote servers. Claude Desktop does both, but through two different screens. Claude Code, Cursor and VS Code do both from one config. When a service offers both kinds, remote vs local MCP servers helps you pick.
The examples below use three servers you can try right away: DeepWiki (remote, no sign-in), Notion (remote, OAuth sign-in) and Memory (local, runs with npx).
Claude Code
Claude Code adds servers from the terminal. The syntax, from the Claude Code MCP docs, is claude mcp add --transport <type> <name> <url-or-command>.
Remote server
Run this inside your project folder:
claude mcp add --transport http deepwiki https://mcp.deepwiki.com/mcpThen start claude and type /mcp. The server should show as connected. For a server that needs a key in a header:
claude mcp add --transport http example https://mcp.example.com/mcp \
--header "Authorization: Bearer YOUR_KEY"Local server
The -- separates Claude's options from the server's command:
claude mcp add --transport stdio memory -- npx -y @modelcontextprotocol/server-memoryEnvironment variables go after the server name and before the --, as --env KEY=value (short form -e).
Scope
By default the server is saved for the current project only, privately, in ~/.claude.json. Add --scope user to have it in every project, or --scope project to write it to a .mcp.json file at the project root that you can commit:
{
"mcpServers": {
"deepwiki": {
"type": "http",
"url": "https://mcp.deepwiki.com/mcp"
}
}
}.mcp.json expands ${VAR} and ${VAR:-default} from the environment, so secrets stay out of the file. Useful commands: claude mcp list shows every server with its status, claude mcp get <name> shows one, claude mcp remove <name> deletes it, and claude mcp add-from-claude-desktop imports what Claude Desktop already has (macOS and WSL only).
OAuth sign-in
Add the server without any header, then authenticate from inside Claude Code:
claude mcp add --transport http notion https://mcp.notion.com/mcpStart claude, type /mcp, pick notion and choose Authenticate. A browser tab opens on Notion's sign-in page. After you approve, the token is stored and the status changes to connected. You can also run the sign-in straight from your shell with claude mcp login notion. To sign in as someone else, clear the stored token with claude mcp logout notion or Clear authentication in the /mcp menu. Until you finish, claude mcp list shows "Needs authentication".
claude.ai
claude.ai treats a remote MCP server as a custom connector. The Claude help article lists the plans: Free, Pro, Max, Team and Enterprise, with Free limited to one custom connector.
- Open Customize, then Connectors.
- Click + Add, then Add custom connector.
- Give it a name, paste the server URL, for example
https://mcp.notion.com/mcp, and click Continue. - Review the authentication settings Claude detected and click Continue. Under Authentication, choose Sign in now, Sign in when needed or No sign in, then click Add. Signing in opens the vendor's page, where you approve access.
- In a chat, click the + button at the lower left of the message box, open Connectors and turn the connector on.
On Team and Enterprise plans an owner adds connectors under Organization settings, Connectors, and each member then connects from their own Customize, Connectors page. The server has to be reachable from the public internet; a server on your laptop or behind a VPN cannot be added here. A server that takes an API key works too: put it under Request headers in the same form, for example Authorization: Bearer YOUR_KEY.
The "Add to claude.ai" button on an mcp.tc listing opens that connector form with the name and URL already filled in.
Claude Desktop
Claude Desktop has two paths, and mixing them up is the usual reason a server "doesn't show up".
Remote server: Connectors
Remote servers go through the same Connectors screen as claude.ai: open Customize, then Connectors, click + Add, then Add custom connector, and follow the same steps, Request headers included. Connectors belong to your Claude account, so one you added on claude.ai shows up here too, and in the mobile apps. The MCP quickstart for remote servers walks through the connector screens with screenshots, though it still calls the page Settings, Connectors.
Local server: the JSON config file
Local servers go in claude_desktop_config.json. Open Settings, then Developer, then Edit Config. The file lives at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the server under mcpServers:
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}Quit Claude Desktop completely and start it again; it only reads the file on launch. The server then appears behind the + button in the chat box, under Connectors, where Manage connectors lists its tools. Full details, including a filesystem example with allowed directories, are in the MCP quickstart for local servers.
That page also warns that paths in args must be absolute, and that a local server runs with your user account's permissions, so read its tool list before you add it.
Cursor
Cursor reads mcp.json from two places, per its MCP docs: ~/.cursor/mcp.json for every project and .cursor/mcp.json inside a project for that project only. The Customize page in Cursor's sidebar lists every server with a toggle.
Remote server:
{
"mcpServers": {
"deepwiki": {
"url": "https://mcp.deepwiki.com/mcp"
}
}
}Local server:
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}A key goes in a headers object next to url, and Cursor expands ${env:NAME} so you can keep it in your shell environment instead of the file. Save, and the server appears in Customize with a toggle. For an OAuth server such as Notion, Cursor runs the OAuth sign-in for you: follow its prompt and approve access on the vendor's page.
Cursor also supports install links: a cursor://anysphere.cursor-deeplink/mcp/install?name=...&config=... URL with the base64-encoded JSON, which opens a prompt to install the server. The "Add to Cursor" button on each mcp.tc listing sends the same name and config through Cursor's web address, https://cursor.com/install-mcp?name=...&config=..., which opens that prompt in the app.
VS Code
VS Code (with Copilot) stores servers in .vscode/mcp.json for a workspace, or in a user-level mcp.json that you open with the command MCP: Open User Configuration. The format, documented in the VS Code MCP reference, uses servers rather than mcpServers, and type is required:
{
"servers": {
"deepwiki": {
"type": "http",
"url": "https://mcp.deepwiki.com/mcp"
},
"memory": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}VS Code also reads a portable format: a .mcp.json at the workspace root, or ~/.copilot/mcp-config.json for your user, both with a top-level mcpServers object like the Claude Code example above. Its guided flow now suggests these for new servers and lists .vscode/mcp.json as deprecated, though that file still works.
Three other ways in, from the VS Code docs: the command MCP: Add Server walks you through the fields; the Extensions view lists servers when you type @mcp; and from a terminal, this adds a server to your user profile:
code --add-mcp '{"name":"deepwiki","type":"http","url":"https://mcp.deepwiki.com/mcp"}'For an API key, use an input variable so the key never lands in the file. VS Code asks for the value the first time the server starts and keeps it in secure storage:
{
"servers": {
"example": {
"type": "http",
"url": "https://mcp.example.com/mcp",
"headers": { "Authorization": "Bearer ${input:api-key}" }
}
},
"inputs": [
{ "type": "promptString", "id": "api-key", "description": "API key", "password": true }
]
}For OAuth, add the server with just the URL. VS Code opens a browser window for the sign-in the first time it connects to the server. Once connected, the Configure Tools button in the chat input lets you turn single tools on or off. MCP: List Servers shows status and has a Show Output entry for the logs. Workspace servers follow Workspace Trust, so a .vscode/mcp.json or .mcp.json in a cloned repo only runs after you trust the folder.
Troubleshooting
The server does not connect. Check the URL against the vendor's docs, path included: https://mcp.deepwiki.com/mcp and https://mcp.deepwiki.com are different addresses. Restart the client after editing a JSON file. In Claude Code, claude mcp list prints the status of every server, and a "Failed to connect" line ends with the HTTP status or error the server returned (in versions since 2.1.219).
The local server does not start. Run its command in a terminal first, for example npx -y @modelcontextprotocol/server-memory. If it fails there, the client cannot start it either, and the fix is usually a missing runtime. On macOS, spawn npx ENOENT in the Claude Desktop logs usually means the app cannot find npx, because GUI apps do not inherit your shell's PATH; put the full path from which npx in command. On Windows, if the logs show an error with ${APPDATA} in a path, the quickstart says to add the expanded %APPDATA% path to the server's env, and to install npm globally (npm install -g npm) if npx still fails.
Where the logs are. Claude Desktop writes mcp.log and one mcp-server-NAME.log per server to ~/Library/Logs/Claude on macOS and %APPDATA%\Claude\logs on Windows. VS Code: MCP: List Servers, then Show Output. Cursor: Output panel, MCP Logs.
It keeps asking me to sign in, or answers 401. The sign-in never finished. Claude Code: /mcp, pick the server, Authenticate (or claude mcp login <name>). Cursor: open the Output panel, pick MCP Logs and look for the authentication error. VS Code: accept the sign-in prompt. With an API key, check that you replaced the placeholder and that the header name matches the vendor's docs.
The server only offers SSE. It uses the older transport. Claude Code 2.1.265 and later switch to SSE on their own when you add the URL with --transport http; older versions need --transport sse. VS Code also falls back to SSE, or takes "type": "sse".
Timeouts on slow servers. Claude Code reads MCP_TIMEOUT (milliseconds) as the server startup timeout, and a .mcp.json entry can carry its own timeout for tool calls.
How mcp.tc fits in
Each listing on mcp.tc is one page per server with the URL or install command at the top, the sign-in requirement as a badge, the tool list, and the steps above already filled in for that server. The "Add to" buttons do the first step: Add to Claude Code copies the claude mcp add command, Add to claude.ai opens the connector form, Add to Cursor opens the install link, and Add to VS Code opens VS Code's install prompt.
Every button uses the vendor's own URL or package. The mcp.tc link, https://mcp.tc/i/notion for example, is the page, so share it with colleagues but do not paste it into a client: an MCP client that connects to it gets an HTTP 409 error whose message names the real endpoint. The connect guide has the same steps for ChatGPT, Codex, Gemini CLI and Devin Desktop, plus a generic config with notes for Zed and Cline, and the verification page explains what the checkmark next to a server's name means (we confirmed who runs it, nothing more).
FAQ
Can I use the same server in Claude Code, Cursor and VS Code at once?
Yes. Each client keeps its own config, so you add the server three times, once per client. For a remote server, each client gets its own OAuth token. For a local server, each client starts its own copy of the process.
Do I need Node.js for a remote server?
No. A remote server runs on the vendor's machines; your client only needs the URL. Node.js is only needed for local servers started with npx.
Where is the MCP config file for each client?
Claude Code: .mcp.json at the project root for project scope, otherwise managed by claude mcp add. Claude Desktop: claude_desktop_config.json in ~/Library/Application Support/Claude/ (macOS) or %APPDATA%\Claude\ (Windows), local servers only. Cursor: ~/.cursor/mcp.json or .cursor/mcp.json. VS Code: .vscode/mcp.json or the user mcp.json, or in the portable format .mcp.json at the workspace root and ~/.copilot/mcp-config.json. claude.ai has no file; everything is under Customize, Connectors.
Why does the client say "this link is a page, not an MCP endpoint"?
You pasted an mcp.tc link into the client. Open the listing, copy the server's own URL from the box at the top, and use that instead. For a local server, use the install command.
What happens to my credentials when I sign in?
The OAuth token is issued for the server's own URL and your client sends it only there. mcp.tc never sees it, since every setup step points your client straight at the vendor. Check the tool list on the listing before you connect, and prefer servers with a verified checkmark when the same service has more than one entry in the directory.
Quellen
Die Seiten, die dieser Artikel zitiert. Wir schreiben die Artikel mit KI-Unterstützung auf Grundlage der Quellen, die sie zitieren, und prüfen sie vor der Veröffentlichung an diesen Quellen. Zahlen zum Verzeichnis stammen aus der Datenbank von mcp.tc.
- code.claude.com/docs/en/mcp
- modelcontextprotocol.io/docs/develop/connect-local-servers
- modelcontextprotocol.io/docs/develop/connect-remote-servers
- support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp
- support.claude.com/en/articles/11176164-use-connectors-to-extend-claude-s-capabilities
- cursor.com/docs/context/mcp
- cursor.com/docs/mcp/install-links
- code.visualstudio.com/docs/copilot/customization/mcp-servers
- code.visualstudio.com/docs/copilot/reference/mcp-configuration
- modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http
- modelcontextprotocol.io/specification/2026-07-28/changelog