How to Use MCP With Claude (Desktop, Code & claude.ai)
By ToolMagpie Research · Updated July 14, 2026 · 9 min read
MCP (Model Context Protocol) lets Claude connect to your tools and data — files, GitHub, a database, the web — through one open standard instead of a custom integration per service. There are three ways to use it with Claude, and each is set up differently. This is an independent, step-by-step guide to all three — Claude Desktop, Claude Code, and claude.ai — with the exact commands and file paths, plus verified-live servers worth installing first.
The short answer
To use MCP with Claude: in Claude Desktop, edit claude_desktop_config.json (Settings → Developer → Edit Config) and restart; in Claude Code, run claude mcp add; on claude.ai, add a remote connector under Customize → Connectors. Then only install servers you trust.
Key takeaways
- MCP (Model Context Protocol) is an open standard from Anthropic that lets Claude connect to external tools and data — a universal adapter between Claude and your apps.
- There are three ways to use MCP with Claude, each set up differently: Claude Desktop (edit a JSON config file), Claude Code (the claude mcp add command), and claude.ai (add a remote connector under Customize → Connectors).
- In Claude Desktop, add servers by editing claude_desktop_config.json via Settings → Developer → Edit Config, then fully quit and restart the app.
- In Claude Code, run claude mcp add — for a remote server: claude mcp add --transport http <name> <url>; for a local one: claude mcp add <name> -- <command>.
- Only install MCP servers you trust: they run with your permissions and can read data and take actions, so review what each one can do and keep your active set small.
What is MCP (and how it works)?
MCP (Model Context Protocol) is an open standard Anthropic introduced in November 2024 (and since adopted well beyond Claude) that lets AI apps connect to external tools and data through a common interface. The pieces: an MCP client (Claude) talks to an MCP server (a small program that exposes tools — read a file, query GitHub, search the web), which does the actual work. Servers connect two ways: local (stdio — a program on your machine) or remote (HTTP — a hosted URL). For the concept in depth, see our MCP servers explainer.
Which Claude surface should you set it up on? Pick by how you work:
| Claude surface | Best for | How you add servers |
|---|---|---|
| Claude Desktop | Everyday desktop use, local tools | Edit claude_desktop_config.json |
| Claude Code | Developers in the terminal | The claude mcp add command |
| claude.ai (web / app) | Remote tools, no config files | Add a connector in Settings |
Set up MCP in Claude Desktop
Claude Desktop reads a JSON config file. Add a server, restart, and its tools appear in the chat.
- Open the Claude menu in your Mac or Windows menu bar (not the settings icon inside the chat window) → Settings… → Developer → Edit Config. This opens (or creates) the config file.
- Add your server under the
mcpServerskey (example below), then save. - Fully quit and restart Claude Desktop — closing the window isn’t enough.
- Confirm the tools loaded via the tools/connectors indicator in the message box.
The config file lives here:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
A minimal example that gives Claude access to two folders via the filesystem server:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Desktop",
"/Users/username/Downloads"
]
}
}
}Replace username, and use absolute paths (on Windows, escape them: "C:\\Users\\username\\Desktop"). The -y flag auto-confirms the npm package. For a server that needs an API key, add an env block alongside args. Claude Desktop also supports one-click extension bundles for no-JSON installs — check Anthropic’s current docs for the exact format, as it has changed across versions.
Add MCP servers in Claude Code
In Claude Code, you add servers from the terminal with claude mcp add — no file editing needed.
Remote (HTTP) server — the recommended default:
claude mcp add --transport http notion https://mcp.notion.com/mcpLocal (stdio) server — everything after -- is the command that starts it:
claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem ~/DesktopAdd an auth header when a server needs a token:
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \
--header "Authorization: Bearer YOUR_TOKEN"Then manage your servers:
claude mcp list— see all configured servers and their statusclaude mcp get <name>/claude mcp remove <name>/mcpinside a session — check tool status and handle any OAuth login
Scopes control where a server applies: local (default — this project, your machine), project (shared via a .mcp.json file in the project root, so teammates get it — they’re prompted to approve it first), and user (all your projects). Set one with -s, e.g. claude mcp add -s user ….
Already configured servers in Claude Desktop? Import them into Claude Code in one command (macOS and WSL): claude mcp add-from-claude-desktop.
Connect a server on claude.ai
On the claude.ai web and desktop apps you add remote MCP servers as connectors — no config files, no local runtime:
- Open Customize → Connectors (on Team or Enterprise plans, an admin adds these under Organization settings → Connectors first).
- Choose Add custom connector and paste the server’s remote URL.
- If the server uses OAuth, add its credentials under the advanced options, then finish and connect.
claude.ai supports remote (URL-based) servers only — for local stdio servers, use Claude Desktop or Claude Code. Connector availability and any plan limits vary by tier and change often, so check the current options in your account; permissions are revocable anytime in Settings.
Recommended starter servers
Good first installs, each verified live in our directory:
- Filesystem — let Claude read and write local files.
- GitHub — issues, PRs, and repo access.
- Brave Search — live web search.
- Playwright — browse and automate the web.
- Context7 — up-to-date library and framework docs.
Need something specific? Browse a registry like Smithery or Composio to find a server for almost any app, or see our full best MCP servers roundup. (MCP isn’t Claude-only — Cursor, Cline, and Windsurf support the same servers.)
Find the right MCP server for your stack — every one live-checked and categorized — in the ToolMagpie directory.
Browse all MCP servers, verified live →Security & troubleshooting
Security first: an MCP server runs with your permissions and can read data and take actions on your behalf, so treat it like installing software with access to your accounts. Only add servers from sources you trust, review the filesystem paths or OAuth scopes you grant, be wary of servers that act on untrusted external content (a prompt-injection vector), and keep your active set small — a handful of focused servers, not everything at once.
If a server won’t show up, work through the usual causes:
- You didn’t fully restart Claude Desktop after editing the config (quit completely).
- A JSON syntax error — validate
claude_desktop_config.jsonbefore restarting. - A relative path where an absolute path is required.
- Node.js /
npxnot installed or not on your PATH (checknode --version). - Still stuck? Read the MCP logs — macOS:
~/Library/Logs/Claude, Windows:%APPDATA%\Claude\logs.
Frequently asked questions
What is MCP in Claude?
MCP (Model Context Protocol) is an open standard, introduced by Anthropic in November 2024, that lets Claude connect to external tools, data sources, and apps through a common interface. Instead of a custom integration for each service, an MCP server exposes tools in a standard way that Claude — and other MCP-compatible apps — can use. It is often described as "USB-C for AI."
Where is the claude_desktop_config.json file located?
On macOS it is at ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows it is at %APPDATA%\Claude\claude_desktop_config.json. The easiest way to open it is inside Claude Desktop: Settings → Developer → Edit Config, which creates the file if it does not exist yet.
How do I add an MCP server to Claude Code?
Use the claude mcp add command. For a remote server: claude mcp add --transport http <name> <url>. For a local server: claude mcp add <name> -- <command> <args> (everything after the -- is the command that starts the server). Then run claude mcp list to confirm it is connected, or /mcp inside a session to see status.
Do I need Node.js to use MCP?
Often, yes. Many MCP servers are distributed as npm packages run with npx, which needs Node.js installed (check with node --version). Others are Python packages run with uvx, or remote HTTP servers that need no local runtime at all. Check each server’s instructions — remote connectors on claude.ai need nothing installed locally.
Why isn’t my MCP server showing up in Claude?
The usual causes: you didn’t fully restart Claude Desktop after editing the config (quit completely, not just close the window); a JSON syntax error in claude_desktop_config.json; a relative instead of absolute path; or Node.js/npx not on your PATH. Check the MCP logs (macOS: ~/Library/Logs/Claude) and validate your JSON before restarting.
Is it safe to use third-party MCP servers?
Treat them like any software you grant access to. An MCP server runs with your permissions and can read data and take actions, so only install servers from sources you trust, review the OAuth scopes or filesystem paths you grant, and keep your active set small. Be cautious with servers that can act on external content, which can carry prompt-injection risk.