How to Connect Claude, Cursor, and Windsurf to Your MCP Server
A practical guide to configuring Claude Desktop, Cursor, Windsurf, Cline, and VS Code Copilot to connect to a custom MCP server — with working config examples for each client.
You've built an MCP server. Now you need to tell your AI tools where to find it. The configuration format varies between clients — Claude Desktop uses one JSON structure, Cursor uses another, VS Code uses a third. This guide gives you the exact config for each, so you can stop hunting through documentation.
Before You Start
You'll need your MCP server's endpoint URL. If you built and deployed the server yourself, that's the URL of your running HTTP service (e.g., https://your-server.com/mcp). If you're using a managed platform like MCPCore, it looks like https://your-subdomain.mcpcore.io/mcp.
Most production servers also require authentication. The most common pattern is an Authorization: Bearer <token> header. We'll cover both authenticated and unauthenticated setups below.
Claude Desktop
Claude Desktop reads its MCP configuration from a JSON file at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Public server (no auth)
{ "mcpServers": { "my-server": { "command": "npx", "args": [ "-y", "mcp-remote@latest", "https://your-subdomain.mcpcore.io/mcp" ] } } }
Claude Desktop uses stdio transport natively, so connecting to a remote Streamable HTTP server requires the mcp-remote bridge package — it acts as a local proxy between Claude and your remote HTTP endpoint.
With API key authentication
{ "mcpServers": { "my-server": { "command": "npx", "args": [ "-y", "mcp-remote@latest", "https://your-subdomain.mcpcore.io/mcp", "--header", "Authorization: Bearer YOUR_API_KEY" ] } } }
After saving the file, restart Claude Desktop. Your server's tools will appear in the tools panel (the hammer icon in the input bar).
Cursor
Cursor supports native HTTP transport for MCP servers — no bridge package needed. Open Settings → MCP or edit your ~/.cursor/mcp.json file directly.
Public server
{ "mcpServers": { "my-server": { "url": "https://your-subdomain.mcpcore.io/mcp" } } }
With API key authentication
{ "mcpServers": { "my-server": { "url": "https://your-subdomain.mcpcore.io/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } }
Cursor uses Agent mode for MCP tool calls. In a chat session, switch to Agent mode using the dropdown next to the model selector. The AI will automatically discover and call your tools as needed.
Windsurf (Codeium)
Windsurf's configuration lives at ~/.codeium/windsurf/mcp_config.json.
With API key authentication
{ "mcpServers": { "my-server": { "command": "npx", "args": [ "-y", "mcp-remote@latest", "https://your-subdomain.mcpcore.io/mcp", "--header", "Authorization: Bearer YOUR_API_KEY" ] } } }
Like Claude Desktop, Windsurf uses the mcp-remote bridge for HTTP servers. After saving, reload the Windsurf window. Your tools appear in the Cascade sidebar under Available Tools.
VS Code (GitHub Copilot)
VS Code supports MCP through GitHub Copilot Chat with native HTTP transport. Note the key difference from other clients: VS Code uses servers (not mcpServers) as the top-level key.
Workspace-level configuration (.vscode/mcp.json)
{ "servers": { "my-server": { "type": "http", "url": "https://your-subdomain.mcpcore.io/mcp" } } }
With API key authentication
{ "servers": { "my-server": { "type": "http", "url": "https://your-subdomain.mcpcore.io/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } }
You can also configure MCP servers in your user-level settings at ~/.vscode/mcp.json for servers that should be available across all workspaces.
Cline (VS Code Extension)
Cline has its own MCP configuration separate from VS Code's built-in one. In VS Code, open the Cline sidebar and click MCP Servers → Configure MCP Servers. This opens a JSON file — add your server there:
{ "mcpServers": { "my-server": { "command": "npx", "args": [ "-y", "mcp-remote@latest", "https://your-subdomain.mcpcore.io/mcp", "--header", "Authorization: Bearer YOUR_API_KEY" ] } } }
Troubleshooting Common Issues
Tools don't appear after saving the config. Make sure you restarted the client fully (not just reloaded). Claude Desktop in particular requires a full quit and relaunch after config changes.
"Connection refused" or "fetch failed". Your server URL is incorrect, or the server isn't running. Check that you can reach the URL from a browser or curl before adding it to the client config.
Authentication error (401 Unauthorized). Your API key is wrong or expired. If you're using MCPCore, regenerate the key from the server's Settings tab and update the config.
Tools are discovered but calls fail. Check the error logs. If you're self-hosting, look at your server's stdout/stderr. If you're on MCPCore, the Error Logs tab shows the full stack trace, input parameters, and runtime output for every failed call — which usually makes the root cause obvious within seconds.
The AI doesn't call my tools when I expect it to. The AI decides when to use a tool based on the tool's description. If the description is vague, the AI won't know when it's relevant. Rewrite the description to be specific about what the tool does and in what situations it's useful.
One Config, Many Clients
The main practical difference between clients comes down to transport:
| Client | Transport | Bridge needed? |
|---|---|---|
| Claude Desktop | stdio (via mcp-remote) | Yes — mcp-remote |
| Cursor | Native HTTP | No |
| Windsurf | stdio (via mcp-remote) | Yes — mcp-remote |
| VS Code Copilot | Native HTTP | No |
| Cline | stdio (via mcp-remote) | Yes — mcp-remote |
For clients that need mcp-remote, the package is maintained by Anthropic and works with any spec-compliant Streamable HTTP server. No installation needed — npx -y mcp-remote@latest downloads and runs it on demand.
If you want to expose a single MCP server to multiple clients and teams without managing separate credentials, MCPCore lets you issue per-client API keys from one dashboard, see which client is making which calls, and revoke individual keys without affecting others.
Config file paths and feature availability may change as clients update. Check the official documentation for each client for the most current information.