Setup takes under 5 minutes per client. Here’s exactly how to connect MCP servers to the three most popular AI coding tools.
Prerequisites
- Node.js 18+ installed (check with
node -v) - Your AI client installed (Claude Desktop, Cursor, or VS Code with Copilot)
Method 1: Claude Desktop
Step 1: Find the config file
# macOS
~/Library/Application Support/Claude/claude_desktop_config.json
# Windows
%APPDATA%/Claude/claude_desktop_config.json
# Linux
~/.config/claude/claude_desktop_config.json
Step 2: Add your MCP servers
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/your/project"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_TOKEN": "ghp_your_token_here" }
}
}
}
Step 3: Restart Claude Desktop
Quit and reopen. You’ll see a hammer icon showing available tools. Ask Claude: “List my GitHub repositories” – it should work.
Method 2: Cursor IDE
Step 1: Open Settings
Cmd+Shift+P > “Cursor Settings” > Features > MCP Servers
Step 2: Add server config
Same JSON format as Claude Desktop. Add your servers and save.
Step 3: Use in Composer
Open Composer (Cmd+I), and your MCP tools are available. Ask: “Search my codebase for all TODO comments” (using filesystem MCP).
Method 3: VS Code (via Continue or Copilot)
With Continue extension:
// ~/.continue/config.json
{
"mcpServers": [
{
"name": "github",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_TOKEN": "ghp_xxx" }
}
]
}
Method 4: Claude Code (CLI)
# Add globally
claude mcp add github --command "npx -y @modelcontextprotocol/server-github"
# Or per-project (.claude/config.json in your repo)
{
"mcpServers": {
"github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"] }
}
}
Troubleshooting
- “Tool not found” – Restart the client after config changes
- “Permission denied” – Check your API token/key has correct scopes
- “Timeout” – The MCP server crashed. Check logs or run the command manually to see errors
- “npx not found” – Ensure Node.js is in your PATH
Your First Test
After setup, try these prompts:
- “What files are in my current directory?” (filesystem)
- “Show my open GitHub PRs” (github)
- “What’s in the users table?” (database)
If these work, MCP is connected. You’re ready to build.