Most people meet MCP by installing someone else's server, and the config format is shared across hosts.
Connecting a server to a host means telling the host either the command that starts it (stdio) or its URL (Streamable HTTP).
Many servers are published as packages and started with a package runner: npx runs a Node.js package and uvx (or uv run) runs a Python one, downloading it on first use.
Local servers in a JSON config. Claude Desktop and Cursor read a JSON file with an mcpServers object. Each entry has a name, a command, its args, and optional env (environment variables, such as API keys). Claude Desktop's file is claude_desktop_config.json; Cursor uses .cursor/mcp.json in your project. After editing, fully restart the app.
Claude Code uses a command instead of editing a file:
# remote server by URL
claude mcp add --transport http notion https://mcp.notion.com/mcp
# local server: everything after -- is the launch command
claude mcp add --transport stdio files -- npx -y @modelcontextprotocol/server-filesystem ~/DocumentsA --scope project server is written to .mcp.json in the repo so teammates get it too. Type /mcp inside Claude Code to see connection status.
Remote servers in Claude apps are added as custom connectors in Settings, by pasting the server URL. If the server needs a login, the app opens a browser sign-in page.
Tips:
- Use absolute paths (starting from the root, like
/Users/ana/...). Hosts launch servers from their own folder with a minimal environment, so relative paths and your shell's settings don't apply. - If a host can't find
npxoruv, use their full path. - Every server you add can see whatever you pass it. Prefer official or well-known servers and give each only the folders and keys it needs.
Example
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/ana/Documents/notes"
]
},
"my-notes": {
"command": "uv",
"args": ["run", "--with", "mcp[cli]", "mcp", "run", "/Users/ana/code/notes_server.py"],
"env": { "NOTES_API_KEY": "replace-me" }
}
}
}Remember
- Local server = command + args (+ env); remote server = URL
- Claude Desktop and Cursor share the mcpServers JSON shape
- Claude Code: claude mcp add ... and /mcp to check status
- Use absolute paths; hosts don't inherit your shell
Watch out for
- Editing the config but only closing the window: the app must be fully restarted to relaunch servers.