Mindket

Connect an MCP server to Claude Desktop, Cursor and VS Code

A black banner titled "MCP course". Its line reads "Build an MCP server in Python or TypeScript, test it, connect it".

These three apps connect to a local MCP server the same way: a command and its arguments in a JSON config file. Claude Desktop reads claude_desktop_config.json and Cursor reads .cursor/mcp.json, both under mcpServers. VS Code reads .vscode/mcp.json under servers. Use absolute paths, then reload the app so it picks up the file.

In this lesson

  • You will register one local server in Claude Desktop, Cursor and VS Code, and know where each app keeps its config.
  • The launch command and its arguments are the same in all three. Only the file, the top-level key and the reload step change.
  • Claude Desktop and Cursor use mcpServers. VS Code's own format uses servers and asks for a type on every entry.
  • Remote servers are different. Claude Desktop takes them as custom connectors.
All courses
On this page
  1. One launch command, three config files
  2. Claude Desktop: claude_desktop_config.json
  3. Cursor: mcp.json
  4. VS Code: .vscode/mcp.json
  5. Local and remote servers are set up differently
  6. Before you connect a server you did not write
  7. VS Code's Agent Plugins and Kenton Varda on MCP auth
  8. Common mistakes
  9. Try it yourself
  10. Next: the Claude API
  11. Check yourself
  12. Frequently asked questions
  13. Sources

One launch command, three config files

A host needs one thing from you: a command it can start as a child process and talk to over stdin and stdout. The servers from lesson 1 and lesson 2 already have one. The TypeScript server starts with npx tsx src/index.ts from its project folder, and the Python one with uv --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/weather run weather.py. Each app wants that split into a command and an args list, in a file of its own.

Claude Code takes the same command through claude mcp add, which this post covers, so this lesson leaves it out.

  1. Run the launch command in a terminal first. A healthy stdio server prints nothing, or one line to stderr, and waits. A traceback or an immediate exit is a bug to fix before you touch any app.
  2. Open the app's config file from the table below, and create it if it does not exist.
  3. Add the server under the app's top-level key with a command and args. Use absolute paths everywhere except where the app resolves a variable for you.
  4. Reload the app. Claude Desktop needs a full quit and restart. In VS Code, restart the server from MCP: List Servers. In Cursor, the server and its toggle are under Customize in the sidebar.
  5. Ask for something only the server knows, such as the active weather alerts in Texas, and approve the tool call when the app asks.
Where each app keeps its MCP servers
AppConfig fileTop-level key
Claude DesktopmacOS ~/Library/Application Support/Claude/claude_desktop_config.json, Windows %APPDATA%\Claude\claude_desktop_config.json, Linux ~/.config/Claude/claude_desktop_config.jsonmcpServers
Cursor.cursor/mcp.json in a project, or ~/.cursor/mcp.json for every projectmcpServers
VS Code.vscode/mcp.json in a workspace, or mcp.json in your user profileservers

Claude Desktop: claude_desktop_config.json

Open Settings from the Claude menu in your system's menu bar, not the settings inside the chat window. In the Developer tab, press Edit Config. That creates the file if it is missing and opens it. Add the server under mcpServers, save, then quit Claude Desktop completely and open it again.

The block below is the MCP documentation's first example, the filesystem server, written for macOS. Windows paths take double backslashes in JSON. Swap in your own server's launch command to connect the weather server. A server that needs a key takes it in an env object next to args.

If you only want to use a server rather than build one, Anthropic's help center describes desktop extensions, single-click installable packages for local servers.

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop",
        "/Users/username/Downloads"
      ]
    }
  }
}

Cursor: mcp.json

Cursor reads .cursor/mcp.json in a project and ~/.cursor/mcp.json in your home folder, and both hold the same mcpServers object. The block below is the weather server from lesson 2, using the entry the TypeScript SDK's guide gives for Cursor.

Cursor resolves variables in command, args, env, url and headers. ${workspaceFolder} is the project root and ${env:NAME} reads an environment variable, so a project file can avoid absolute paths and keep keys out of the file. One oddity in the docs: the field table marks type as required for stdio servers, but the JSON examples leave it out. Copy the examples, and check that field first if an entry does not load.

Cursor asks before it runs an MCP tool, and the arrow beside the tool name shows its arguments. To see why a server failed, open the Output panel and choose MCP Logs from the dropdown.

{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": ["tsx", "src/index.ts"]
    }
  }
}

VS Code: .vscode/mcp.json

VS Code's own format uses servers, not mcpServers, and every stdio entry names its type. The reference describes only the VS Code format, not a shared schema for all MCP clients, so a Cursor snippet pasted in unchanged will not match. Below is the weather server entry as the TypeScript SDK's guide writes it.

MCP: Add Server in the Command Palette is the newer guided route, and its user-level destination is ~/.copilot/mcp-config.json unless COPILOT_HOME is set, in a second, portable format that uses mcpServers. The .vscode/mcp.json destination stays available for compatibility, and that guided flow labels it deprecated. The reference page still documents it, and it is the format that supports inputs, which prompt you for a secret.

In a trusted workspace, workspace servers can start without a separate MCP trust prompt. Run MCP: List Servers to see a server's status and pick Show Output for its log.

{
  "servers": {
    "weather": {
      "type": "stdio",
      "command": "npx",
      "args": ["tsx", "src/index.ts"]
    }
  }
}

Local and remote servers are set up differently

A remote server is one at a web address rather than a program on your machine. Cursor takes it as a url with a headers object, and VS Code as a type of http with a url. Claude Desktop takes remote servers as custom connectors. Anthropic's help article calls local servers configured in claude_desktop_config.json a separate mechanism, and the connector flow is Connectors, then Add custom connector, where you enter a name and the server's URL. The MCP guide puts Connectors under Settings, and Anthropic's help article puts it under Customize.

What each app takes from its config
Claude DesktopCursorVS Code
A local server from the JSON fileYesYesYes
A remote server as a url entry in the JSON fileUse ConnectorsYesYes
A config file per projectOne user-level fileYesYes
Where a key goesAn env object${env:NAME}${env:NAME} or a prompt

Sources: MCP docs: Connect to remote MCP servers (read November 4, 2026), Cursor docs: Model Context Protocol (read November 4, 2026), VS Code docs: MCP configuration reference (read November 4, 2026)

Before you connect a server you did not write

A local server runs with your user account's permissions, so it can do anything you can do by hand. Claude's help center says custom connectors can reach services Anthropic has not verified, and Cursor's docs say to install servers only from sources you trust and to use restricted API keys. VS Code's docs say to review a repository's MCP configuration before trusting it, because stdio servers can run code.

Are MCP servers safe? covers what to check first.

VS Code's Agent Plugins and Kenton Varda on MCP auth

The Visual Studio Code team posted on X on 12 August 2026 that Agent Plugins 1.0 work in VS Code: skills, MCP servers and AI extensions packed into one installable plugin. GitHub's changelog names the parts, a plugin.json, a skills/ folder and an mcp.json, installed from a marketplace. Once your server runs from a config file, a plugin hands it to teammates without each of them editing JSON.

Kenton Varda, tech lead for Cloudflare Workers, posted on X on 8 November 2025 that MCP's big advantage over OpenAPI is how clear it is about auth. OpenAPI allows too many auth mechanisms, and its schema may not give a robot enough to finish the sign-in. When a service offers a remote server with OAuth and a local one that wants a key, the remote one keeps long-lived keys out of your JSON files.

OpenAPI supports too many different auth mechanisms, and the schema doesn't necessarily have enough information for a robot to be able to complete the auth flow.

Kenton Varda, Tech lead for Cloudflare Workers · X (read November 5, 2026)
Visual Studio Code (@code) on X, 12 August 2026. Agent Plugins 1.0 are now supported in VS Code. Package your skills, MCP servers, and AI extensions into one installable plugin.
Visual Studio Code on X, 12 August 2026
Kenton Varda (@KentonVarda) on X, 8 November 2025, quoting a post by Steve Krouse about the code mode Anthropic and Cloudflare announced. He names the big advantage of MCP over OpenAPI: it is clear about auth. OpenAPI supports too many different auth mechanisms, and the schema doesn't necessarily have enough information for a robot to be able to complete the auth flow.
Kenton Varda on X, 8 November 2025

Screenshots of X's own embeds of the posts, taken on 5 November 2026, with the time in UTC. X cuts the VS Code post short with Show more. Select one to open the post on X.

Common mistakes

  • A relative path. Hosts start servers from their own working directory, which may be undefined, so ./data or weather.py alone fails. Use absolute paths.
  • A syntax error in the JSON. The MCP troubleshooting list starts with the file's syntax.
  • Pasting one app's snippet into another unchanged. The top-level key differs, and VS Code's own format also wants type.
  • Closing the Claude Desktop window instead of quitting the app. The debugging guide says to fully quit and reopen, and that closing the window is not enough.
  • A command the app cannot find. The guide says you may need the full path to uv in the command field, and which uv or where uv prints it.
  • On Windows, an ENOENT error that mentions ${APPDATA} in a server's log. The MCP docs' fix is to add the expanded APPDATA path to the entry's env key, and to install npm globally.
Where to read a server's log
AppWhere the log is
Claude Desktopmcp.log and one mcp-server-NAME.log per server in ~/Library/Logs/Claude on macOS, %APPDATA%\Claude\logs on Windows, ~/.config/Claude/logs on Linux
CursorThe Output panel, with MCP Logs chosen in the dropdown
VS CodeMCP: List Servers, pick the server, then Show Output

Try it yourself

  • Register the weather server from lesson 1 or 2 in one app, then ask about alerts in a state other than Texas.
  • Open that app's log and find the line where the server starts.
  • Move the same entry to a second app and write down each change you had to make.

Next: the Claude API

That finishes the MCP course. You built a server in two languages, tested it with the Inspector and connected it to three apps. To compare your server with ready-made ones, browse the MCP servers on Mindket.

The Claude API course is the natural next step. It starts with your first API call, then covers tool use, prompt caching and an agent loop, so you write the model-side code that asks for a tool and runs it.

Check yourself

  1. Which top-level key does VS Code's .vscode/mcp.json use for MCP servers?

    Show answer

    B. servers VS Code's own format uses servers and every stdio entry names its type, while Claude Desktop and Cursor use mcpServers.

  2. You edited claude_desktop_config.json but the server does not show up. What should you do?

    Show answer

    D. Quit Claude Desktop completely and open it again Closing the window is not enough, so the app has to fully quit and reopen before it reads the file.

  3. A server entry points at weather.py with no folder in front of it. What goes wrong?

    Show answer

    A. The host starts it from its own working directory, so a relative path may not resolve The working directory a host starts servers from may be undefined, so use absolute paths.

  4. How do you add a remote MCP server in Claude Desktop?

    Show answer

    C. As a custom connector, through Connectors and then Add custom connector Claude Desktop takes remote servers as custom connectors, which is a separate mechanism from the local config file.

Frequently asked questions

How do I add a remote MCP server to Claude Desktop?

Add it as a custom connector instead of editing the JSON file. Open Connectors, press Add, then Add custom connector, and enter the server's name and URL. Free plans are limited to one custom connector.

Can VS Code use the servers I already set up in Claude Desktop or Cursor?

It can find them. The setting chat.mcp.discovery.enabled controls discovery from other apps, and VS Code's reference page says it is off by default for Claude Desktop and Cursor.

Can one MCP config file work in every app?

Not as one file, since the wrapper around each entry differs. Keep the server's command and args values in your project's README, and paste them into each app's own format when you add the server there.

Do I have to restart the app after I edit the config?

Claude Desktop does, since it reads the file only when it starts. VS Code has Restart Server in the MCP: List Servers menu, which its docs list for use after changing configuration. Cursor's docs describe a toggle for each server under Customize.

How do I give a local server an API key?

In Claude Desktop, add an env object to the server's entry and put the key inside. Cursor accepts ${env:API_KEY} references, which keep the key out of the file. VS Code can ask for it through an inputs entry with password set to true, referenced as ${input:id}.

Does Claude Code use the same config file?

No. Claude Code adds servers with the claude mcp add command, which the Mindket post on adding an MCP server to Claude Code walks through.

Sources

  1. MCP docs: Connect to local MCP servers (read November 4, 2026)https://modelcontextprotocol.io/docs/2026-07-28/develop/connect-local-servers
  2. MCP docs: Connect to remote MCP servers (read November 4, 2026)https://modelcontextprotocol.io/docs/2026-07-28/develop/connect-remote-servers
  3. MCP docs: Debugging (read November 4, 2026)https://modelcontextprotocol.io/docs/2026-07-28/tools/debugging
  4. Claude Help Center: Get started with custom connectors using remote MCP (read November 4, 2026)https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp
  5. Claude Help Center: Getting started with local MCP servers on Claude Desktop (read November 4, 2026)https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop
  6. Cursor docs: Model Context Protocol (read November 4, 2026)https://cursor.com/docs/mcp
  7. VS Code docs: MCP configuration reference (read November 4, 2026)https://code.visualstudio.com/docs/agents/reference/mcp-configuration
  8. VS Code docs: Manage and troubleshoot MCP servers (read November 4, 2026)https://code.visualstudio.com/docs/agents/run/manage-mcp-servers
  9. VS Code docs: Add and manage MCP servers (read November 4, 2026)https://code.visualstudio.com/docs/agent-customization/mcp-servers
  10. MCP TypeScript SDK docs: Plug into a real host (read November 4, 2026)https://github.com/modelcontextprotocol/typescript-sdk/blob/main/docs/get-started/real-host.md
  11. MCP Python SDK docs: Connect to a real host (read November 4, 2026)https://py.sdk.modelcontextprotocol.io/get-started/real-host/
  12. GitHub changelog: Agent Plugins 1.0 in VS Code, Copilot CLI and the Copilot app (read November 5, 2026)https://github.blog/changelog/2026-08-12-agent-plugins-1-0-in-vs-code-copilot-cli-and-the-copilot-app/
  13. Visual Studio Code on X: Agent Plugins 1.0 (read November 5, 2026)https://x.com/code/status/2087640853783232562
  14. Kenton Varda on X: MCP is very clear about auth (read November 5, 2026)https://x.com/KentonVarda/status/1987208904724652273

Share this lesson

Pick a server to connect

Browse the MCP servers on Mindket and connect one with the config you just wrote.

Browse MCP servers

This lesson as Markdown · MCP course: build, test and connect MCP servers · All courses