The Complete Guide to MCP Config Files — Claude Desktop, Cursor, Lovable, and More
Nikhil Tiwari
MCP Playground
📖 TL;DR
- MCP config files tell your AI client how to connect to MCP servers — each client has a slightly different file path and format
- Claude Desktop and Cursor use the same
mcpServersJSON format; Zed usescontext_servers - Remote servers just need a URL; STDIO servers need a command (
npxoruvx) and args - Use the free MCP Config Generator to generate ready-to-paste configs automatically
- Never hardcode secrets in config files — use environment variables instead
MCP (Model Context Protocol) has exploded in adoption. Hundreds of servers exist for everything from Supabase and GitHub to Figma and Notion. But every time you want to add one to your workflow, you hit the same question: where exactly does this config go, and what format does it need to be in?
The answer depends on which client you're using. This guide covers the six most popular MCP clients in 2026 — with exact file paths, format examples, and common pitfalls for each one.
Understanding MCP Server Types First
Before diving into client-specific configs, you need to know which type of server you're configuring:
🌐 Remote (HTTP / SSE)
The server runs somewhere on the internet. You provide a URL (e.g. https://mcp.supabase.com/sse). No local installation needed.
⚙️ STDIO (npm / PyPI)
The server runs locally as a child process. Your client spawns it via npx (Node) or uvx (Python) and communicates over stdin/stdout.
1. Claude Desktop
Claude Desktop was the first mainstream MCP client and still has the largest ecosystem. It reads from a JSON config file on your machine.
Config file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Remote server example:
{
"mcpServers": {
"supabase": {
"url": "https://mcp.supabase.com/sse",
"headers": {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
}
}
}
STDIO server example (npm):
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_TOKEN_HERE"
}
}
}
}
⚠️ Restart required
Claude Desktop reads the config file once at startup. After editing, you must fully quit and reopen the app for changes to take effect.
2. Cursor
Cursor uses the same mcpServers format as Claude Desktop, which means you can often copy configs directly between the two. You have two scope options:
- Global (all projects):
~/.cursor/mcp.json - Project-scoped:
.cursor/mcp.json(inside your project root)
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "@playwright/mcp@latest"],
"env": {}
},
"notion": {
"url": "https://mcp.notion.com/sse",
"headers": {
"Authorization": "Bearer YOUR_NOTION_TOKEN"
}
}
}
}
✅ Hot reload
Unlike Claude Desktop, Cursor picks up config changes automatically — no restart needed. Open the MCP settings panel (Settings → MCP) to verify the server connected.
3. Lovable
Lovable is one of the fastest-growing AI app builders in 2026, letting you build full-stack apps with natural language. MCP support in Lovable gives your projects live access to external APIs and databases during development.
In Lovable, you configure MCP servers through the project settings UI — there's no manual JSON file to edit. Navigate to:
Project Settings → Integrations → MCP Servers → Add Server
Paste the server URL and any required auth token. Lovable stores credentials securely in the project's secret vault — they're never exposed in the codebase. STDIO servers are not supported in Lovable (it's a browser-based environment); only remote HTTP/SSE servers work.
💡 Lovable tip
If you're building a Supabase-backed app in Lovable, the Supabase MCP server gives your AI assistant direct read/write access to your database during generation — no manual schema copying required.
4. Cline
Cline is a powerful open-source AI coding agent (VS Code extension) with strong MCP support. It manages MCP servers through its own settings panel in VS Code, storing the config at:
- macOS/Linux:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json - Windows:
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
The format mirrors Claude Desktop's mcpServers schema exactly:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/yourname/projects"
]
}
}
}
The easiest way to add servers in Cline is through the MCP Servers panel in the sidebar — click the plug icon, then "Install MCP Server". Cline can even auto-install servers from natural language descriptions.
5. Continue
Continue is an open-source AI coding assistant that works in both VS Code and JetBrains IDEs. MCP support was added in v0.9 and has become a core part of its tooling layer.
Config lives in ~/.continue/config.json (or ~/.continue/config.yaml for YAML users). The MCP section uses a mcpServers array:
{
"mcpServers": [
{
"name": "github",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_TOKEN_HERE"
}
},
{
"name": "supabase",
"url": "https://mcp.supabase.com/sse",
"requestOptions": {
"headers": {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
}
}
]
}
⚠️ Array vs object
Continue uses an array for mcpServers (not an object like Claude Desktop/Cursor). Each entry needs a name field. Mixing up the format is a common source of silent failures.
6. Zed
Zed is a high-performance code editor built in Rust with native MCP support. Its config uses a different key — context_servers — inside ~/.config/zed/settings.json.
STDIO server (npm):
{
"context_servers": {
"github": {
"command": {
"path": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_TOKEN_HERE"
}
}
}
}
}
Remote server (via mcp-remote bridge):
{
"context_servers": {
"supabase": {
"command": {
"path": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.supabase.com/sse",
"--header",
"Authorization: Bearer YOUR_ACCESS_TOKEN"
]
}
}
}
}
💡 Zed and remote servers
Zed currently only supports STDIO transport natively. To use a remote HTTP/SSE server, you need the mcp-remote bridge package (shown above), which acts as a local STDIO proxy to the remote server.
Quick Reference: Client Config Comparison
| Client | Config File | Root Key | Remote Support | Restart Needed? |
|---|---|---|---|---|
| Claude Desktop | claude_desktop_config.json | mcpServers {} | ✅ Yes (url + headers) | Yes |
| Cursor | ~/.cursor/mcp.json | mcpServers {} | ✅ Yes (url + headers) | No (hot reload) |
| Lovable | Settings UI (no file) | — | ✅ Remote only | No |
| Cline | cline_mcp_settings.json | mcpServers {} | ✅ Yes | No (hot reload) |
| Continue | ~/.continue/config.json | mcpServers [] | ✅ Yes (url field) | No |
| Zed | ~/.config/zed/settings.json | context_servers {} | Via mcp-remote | Yes |
Best Practices for MCP Config Files
Never hardcode secrets
API keys and tokens in your config file sit in plaintext on your filesystem. Use environment variables wherever possible, and if you must hardcode a token (some clients require it), make sure the file is not inside a project directory that gets committed to git.
# Add to .gitignore if your config is project-scoped
.cursor/mcp.json
.continue/config.json
Use npx -y for npm packages
The -y flag tells npx to skip install confirmation prompts. Without it, your client may hang waiting for a y/n input that never comes.
Pin versions in production
Using @latest is convenient but can break if the server releases a breaking change. Once you've validated a server version works, pin it: @modelcontextprotocol/server-github@0.6.2.
Test before adding to production config
Before adding a server to your client config, use MCP Playground to verify the server is reachable, the auth token works, and the tools behave as expected. This saves you the debug loop of editing a config file, restarting your client, and discovering the URL was wrong.
Common Config Mistakes and How to Fix Them
Generate Your Config in Seconds
Writing config JSON by hand is tedious and error-prone. The MCP Config Generator handles it automatically — paste a server URL, npm package name, or PyPI package and get a ready-to-paste config for Claude Desktop, Cursor, and Zed in one click.
MCP Config Generator — Free
Paste a URL or package name → get ready-to-paste config for Claude Desktop, Cursor, and Zed. No sign-up.
Generate Config →Related Resources
- MCP Config Generator — auto-generate configs for any server
- MCP Server Tester — verify remote servers before adding to config
- MCP Servers Directory — browse 1,000+ servers with package info
- What Is the Model Context Protocol? — protocol fundamentals
- Build a Custom MCP Server — step-by-step Node.js guide
Written by Nikhil Tiwari
15+ years in product development. AI enthusiast building developer tools that make complex technologies accessible to everyone.
Related Resources