MCP Setup Guide for AI Coding Assistants
Learn how to configure MCP (Model Context Protocol) servers for your AI coding assistant. This guide covers config file locations, JSON formats, and setup for all major clients.
MCP Config Builder
Build mcp.json configuration files visually for Claude Desktop, Cursor, VS Code, Windsurf, and Claude Code.
MCP Servers
No servers configured yet.
Add a server from or .
Client / Editor
Save to: claude_desktop_config.json
Generated Config
// Add at least one server to generate config
Related Guides
What is MCP?
The Model Context Protocol (MCP) is an open standard created by Anthropic that lets AI assistants connect to external tools and data sources. Instead of being limited to what the AI knows, MCP servers give your assistant the ability to read files, query databases, search the web, manage GitHub repos, and much more. MCP has been adopted by Claude Desktop, Claude Code, Cursor, VS Code (via Copilot), Windsurf, and Zed.
// Claude Desktop — ~/.claude/claude_desktop_config.json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-filesystem", "/home/user/projects"]
},
"github": {
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-github"],
"env": { "GITHUB_TOKEN": "ghp_xxxxxxxxxxxx" }
}
}
}
// Verify connection
// Ask Claude: "List my MCP tools" → should show filesystem + GitHub toolsConfig file locations by client
Each AI client stores its MCP configuration in a different file and location. Claude Desktop uses claude_desktop_config.json in the app data directory. Claude Code uses .mcp.json in the project root. Cursor uses .cursor/mcp.json. VS Code uses .vscode/mcp.json. Windsurf uses mcp_config.json in ~/.codeium/windsurf/. Zed embeds MCP config in its settings.json. The JSON structure is similar across clients but the root key and some fields differ.
Common setup issues
The most common MCP setup issues include: forgetting to restart the client after editing config, incorrect file paths in args, missing API keys in the env object, and using the wrong root key (VS Code uses 'servers' while most others use 'mcpServers', and Zed uses 'context_servers'). If a server fails to connect, check the client's MCP logs for specific error messages. Also ensure npx is in your PATH and Node.js is installed for npm-based servers.
Frequently Asked Questions
Where do I put my MCP config file?
It depends on your AI client. Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\ (Windows). Cursor: .cursor/mcp.json in your project root. VS Code: .vscode/mcp.json. Always restart your client after saving changes.
Do I need Node.js installed for MCP servers?
Most MCP servers are distributed as npm packages and launched via npx, so yes — you need Node.js (v18+) and npm installed. Some servers are available as Python packages (via uvx/pip) or Docker containers. Check the server's documentation for requirements.
Can I use the same MCP config across different clients?
The server configurations (command, args, env) are the same, but the JSON wrapper differs between clients. Most clients use mcpServers as the root key, but VS Code uses 'servers' and Zed uses 'context_servers'. Use a config builder to generate the correct format for each client.
Related Generate Tools
JSON Mock Data Generator
Generate realistic fake JSON data for API testing with 30+ field types, preset templates, and schema builder
README Generator
Generate professional GitHub README.md files with badges, installation steps, usage examples, and more
robots.txt Generator
Generate robots.txt files with crawl rules for Googlebot, Bingbot, AI bots, and more — presets included
Zod Schema Generator
Generate Zod validation schemas from JSON — auto-detects emails, URLs, UUIDs, dates, and nested objects