How to Connect MCP Servers to Claude Desktop and Cursor

Step-by-step setup for both MCP clients. Covers claude_desktop_config.json, Cursor MCP settings, and what each client supports.

8 min read
connect MCP server Claude Desktop MCP Cursor setup claude_desktop_config.json MCP client

--- title: How to connect MCP servers to Claude Desktop and Cursor description: You built an MCP server. Now it needs a client. This guide walks through connecting your server to both Claude Desktop and Cursor, including the config files, setup steps, and feature differences between each client. author: FractionalSkill ---

How to connect MCP servers to Claude Desktop and Cursor

An MCP server sitting on your machine does nothing by itself. It needs a client to talk to. The server exposes tools, resources, and prompts. The client is the application that actually calls them on behalf of an AI model.

Claude Desktop and Cursor are the two most widely adopted MCP clients right now. Both support the protocol, but they handle setup differently and they don't support the exact same feature set. This guide covers the full connection process for each, so you can get your server running in whichever tool fits your workflow, or both.

If you followed along with building a weather MCP server in an earlier guide, that's the server we'll connect here. The same steps apply to any MCP server you build or install.

Connect your server to Claude Desktop

Claude Desktop was one of the first MCP clients. It supports the full protocol spec: tools, resources, and prompts. Configuration happens through a single JSON file on your machine.

Step 1: Open Claude Desktop settings.

On Mac, click the Claude menu in the top menu bar, then select "Settings." On Windows, go to File then Settings. Once the settings panel is open, click Developer, then click Edit Config.

This opens your claudedesktopconfig.json file in your default editor. If it's your first time, the file will contain an empty JSON object or a minimal structure.

Step 2: Add your server entry.

Inside the mcpServers object, add an entry for your server. The key becomes the display name inside Claude Desktop. Here's what the weather server config looks like:

{
  "mcpServers": {
    "weather": {
      "command": "node",
      "args": [
        "/Users/yourname/weather-server/build/index.js"
      ]
    }
  }
}

Two fields do all the work. command tells Claude Desktop what runtime to use (Node in this case). args takes an array where the first value is the absolute file path to your compiled server code.

If you already have other servers configured, add weather as a sibling key inside the existing mcpServers object. Don't create a second mcpServers block.

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/yourname/Documents"]
    },
    "weather": {
      "command": "node",
      "args": ["/Users/yourname/weather-server/build/index.js"]
    }
  }
}

Step 3: Save the file and restart Claude Desktop.

This step trips people up more than anything else. Claude Desktop reads the config file at launch. If you save your changes while the app is running, nothing happens until you quit and reopen it. Close Claude Desktop completely, then reopen it.

Step 4: Verify the connection.

Once Claude restarts, open a new conversation. You should see your MCP tools listed in the tools area below the input field. For the weather server, that means "get-alerts" and "get-forecast" both appear, with the label "Attached from MCP."

You can also check the MCP section in settings. Your server name, version number, and the count of available tools, resources, and prompts all display there.

Test it with a real prompt: "Get the weather for New York, New York." Claude will request permission to call the tool, make the API request through your server, and return the forecast.

> Restart is mandatory. Any time you change claudedesktopconfig.json or recompile your server code, you need to restart Claude Desktop. The client loads server connections at launch and doesn't watch the config file for changes. If a tool isn't showing up, restart first before debugging anything else.

Connect your server to Cursor

Cursor's MCP setup is faster than Claude Desktop because it uses a built-in settings panel instead of a raw JSON file. The trade-off is that Cursor currently only supports MCP tools. Resources and prompts aren't available yet.

Step 1: Open Cursor settings.

Click the gear icon in the top-right corner of Cursor, or use the keyboard shortcut to open settings. Navigate to the MCP tab in the left sidebar.

Step 2: Add a new MCP server.

Click Add new MCP server. You'll see three fields:

  • Name: Whatever you want to call the server. Use "weather" to match what we configured in Claude Desktop.
  • Type: Select "command" from the dropdown. This tells Cursor your server runs as a local process.
  • Command: Enter the full command as a single string: node /Users/yourname/weather-server/build/index.js

Notice the difference from Claude Desktop. Instead of splitting command and args into separate fields, Cursor takes the entire command as one string.

Step 3: Click Add and check the status indicator.

After clicking Add, look for a green dot next to your server name. Green means Cursor connected to your MCP server successfully. If you see a red dot or no indicator, the connection failed. Double-check the file path and make sure your server compiles without errors.

Step 4: Verify your tools.

Click on the server name in the MCP settings panel. Cursor shows you every tool the server exposes, along with descriptions and parameter details. For the weather server, you'll see get-alerts and get-forecast listed with their input schemas.

To test, open Cursor's AI chat (Cmd+I on Mac, Ctrl+I on Windows) and start a new conversation. Type "Get the weather for Miami, Florida." Cursor will call the get-forecast tool through your MCP server and return the results.

> No restart needed (usually). Unlike Claude Desktop, Cursor picks up new MCP servers without a full app restart in most cases. If the green dot appears, you're connected. If it doesn't, try toggling the server off and back on in the MCP settings panel before restarting.

What each client supports

Claude Desktop and Cursor both implement the MCP protocol, but they don't implement the same parts of it. This matters when you're deciding where to deploy your servers and what features to build into them.

FeatureClaude DesktopCursor
MCP toolsYesYes
MCP resourcesYesNo (not yet)
MCP promptsYesNo (not yet)
Setup methodEdit JSON config fileBuilt-in settings UI
Config locationclaudedesktopconfig.jsonSettings > MCP tab
Restart requiredYes, after every config changeUsually not
Server status indicatorCheck in Developer settingsGreen/red dot in MCP tab
Multiple serversAdd entries to mcpServers objectAdd each through the UI

The practical takeaway: if your MCP server only exposes tools, both clients work identically from a functionality standpoint. If you're building a server that also provides resources (data the model can pull in as context) or prompts (pre-written prompt templates), only Claude Desktop will surface those features today.

Cursor's MCP support is actively developing. Tool support landed first because tools are the most immediately useful primitive. Resources and prompts will likely follow, but there's no published timeline for either.

What to do when the connection fails

Most connection issues come down to three things. Checking them in order will resolve the problem nine times out of ten.

The file path is wrong. The most common failure. Your config points to a file that doesn't exist or points to the TypeScript source instead of the compiled JavaScript. Make sure you're referencing the build/index.js file (or wherever your compiled output lives), not src/index.ts.

You forgot to compile. If you made changes to your TypeScript server code, you need to run npm run build before the client can pick them up. The client runs the compiled JavaScript, not your source TypeScript.

npm run build

You didn't restart the client. For Claude Desktop, this is always required. Close the app completely and reopen it. For Cursor, try toggling the server off and on. If that doesn't work, restart the app.

Quick diagnostic checklist:

  • Can you run node build/index.js from the terminal without errors? If not, the server itself has a problem.
  • Does the file path in your config match exactly what you see when you right-click the file and copy its path?
  • Did you run npm run build after your last code change?
  • Did you restart the client after editing the config?

If the server runs fine from the terminal but won't connect through a client, the issue is almost always the file path in your config. Copy the absolute path directly from your file manager rather than typing it out.

> Build once, connect everywhere. This is the core promise of MCP. You write the server one time. You compile it once. Then you plug that same compiled code into Claude Desktop, Cursor, or any other MCP client that comes along. The config format differs slightly between clients, but the server itself stays identical. That's the whole point of a standard protocol.

Keep Going

Ready to Start Building?

Pick the next step that matches where you are right now.

Tutorial
Claude Code Basics

Start with the terminal basics. A hands-on, step-by-step guide to your first 10 minutes with Claude Code.

Start the Tutorial
Guide
AI-Powered Workflows

Automate your client work. Learn how to connect AI tools into workflows that handle repetitive tasks for you.

Read the Guide
Community
Join the Community

Connect with other fractional leaders building with AI. Share workflows, get feedback, and learn from operators who are ahead of you.

Apply to Join