Ploba logo

Find the right AI tool for the job: apps, agents, APIs, MCP servers and datasets, explained plainly.

Get the AI Digest

Discover

  • Explore
  • Top Charts
  • Categories
  • Agents
  • MCP servers
  • Developer tools

Learn & community

  • Learn AI
  • AI Glossary
  • Blog
  • Hackathons
  • People
  • AI Digest

For makers

  • List your tool
  • Docs
  • Claim a listing
  • Advertise
  • Write for us

Company

  • About
  • Careers
  • Changelog
  • Trust
  • Security
  • Contact

© 2026 Ploba. All rights reserved.

  • Privacy
  • Terms
  • Cookies
  • Advertising
  • All policies
llms.txt
All articles
Technical Tutorials

How to Add an MCP Server to Claude, Cursor and VS Code

Step-by-step setup for MCP servers in Claude Desktop, Claude Code, Cursor and VS Code, with config examples, checks and fixes for common errors.

Stephen Gbolagade

Nov 6, 2026 · 7 min read

Ethernet cables plugged into the ports of a network switch
Image: Photo by Brett Sayles on Pexels

An MCP server gives an AI app new abilities: reading files in a folder, searching your company docs, opening a pull request or querying a database. Thanks to the Model Context Protocol, one server works in many apps. But each app has you add it in a slightly different place, using a slightly different settings file.

This guide covers the four places most people want to use MCP: Claude (the desktop and web apps), Claude Code, Cursor and VS Code. For each, you'll see where the setting lives, a copy-ready example and how to check that it worked. If you're new to MCP itself, start with MCP 101.

Before you start: local or remote?

Every MCP server you add is one of two kinds, and the kind decides how you add it.

  • Local (stdio) servers run as a program on your computer. You add them with a command, such as npx -y @modelcontextprotocol/server-filesystem, and the app starts the program for you. Most need Node.js (opens in a new tab) or Python installed. They can reach your files, so you choose exactly which folders or resources they get.
  • Remote (HTTP) servers run on someone else's infrastructure. You add them with a URL, such as https://mcp.notion.com/mcp, and usually sign in with your account in a browser window. Nothing is installed on your machine.

The server's own documentation tells you which kind it is and gives the command or URL. Use that, not a version copied from a forum: package names and URLs change, and a lookalike package is an easy way to install something malicious.

The examples below use two servers:

  • the official Filesystem server (local), which lets the AI read and write files in folders you name;
  • Notion's remote server, which needs a Notion sign-in.

Swap in the server you actually want.

Claude Desktop and Claude on the web

Claude supports both kinds, in different places.

Add a remote server as a custom connector

  1. Open Settings (on desktop, Ctrl+, on Windows or the app menu; on the web, your profile icon, then Settings).
  2. Click Connectors in the sidebar.
  3. Click Add, then Add custom connector.
  4. Paste the server URL, for example https://mcp.notion.com/mcp, and click Add.
  5. Complete the sign-in the server asks for.

Back in a chat, open the + ("Add files, connectors, and more") menu under the message box and hover over Connectors to see what you've connected. In the connector's settings you can turn individual tools on or off. Which plans include custom connectors can change, so check Anthropic's connector guide (opens in a new tab) for your plan.

Add a local server in the desktop app

Local servers only work in the desktop app, because the browser can't start programs on your computer.

  1. Open the Claude menu and choose Settings, then the Developer tab.
  2. Click Edit Config. This opens (or creates) claude_desktop_config.json:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  3. Add the server under mcpServers:
JSON
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:\\Users\\yourname\\Documents\\notes"
      ]
    }
  }
}

On macOS, the folder looks like /Users/yourname/Documents/notes. Write out the full folder path, not ~ or a shortened one. List only the folders you want the AI to touch, because the server can do anything you could do to those files.

  1. Quit Claude completely (not just close the window) and open it again.
  2. Open the + menu, then Connectors, then Manage connectors, and check that "filesystem" is listed with its tools.

Claude asks for your approval before a tool runs, so you see each file action before it happens.

Claude Code

Claude Code adds servers from the terminal with claude mcp add. For a remote server:

Shell
claude mcp add --transport http notion https://mcp.notion.com/mcp

For a local server, put the server's command after --, so Claude Code doesn't mistake the server's flags for its own:

Shell
claude mcp add --transport stdio filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/folder

If a server needs an API key, pass it with --env NAME=value before the server name, rather than writing it into a file you'll commit.

By default a server is added for the current project only, just for you. Add --scope user to use it in all your projects, or --scope project to save it in a .mcp.json file at the project root that your team can commit and share. Claude Code asks each person to approve project servers before they run.

To check, run claude mcp list, which shows each server as connected, needing authentication or failing. Inside a session, type /mcp to see status and to sign in to remote servers that use OAuth.

Cursor

Cursor reads servers from a JSON file:

  • .cursor/mcp.json in a project, for that project only;
  • ~/.cursor/mcp.json in your home folder, for every project.

A local server:

JSON
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/folder"]
    }
  }
}

A remote server uses url instead of command:

JSON
{
  "mcpServers": {
    "notion": {
      "url": "https://mcp.notion.com/mcp"
    }
  }
}

Put both inside the same mcpServers object if you want more than one. Some servers can also be installed in one click from Cursor's marketplace.

Open Customize in the sidebar to see your servers, with a toggle to turn each on or off. In chat, Cursor's agent uses the tools when they're relevant, or you can ask for one by name. By default it asks you to approve each tool call; click the arrow next to the tool name to see exactly what it's about to send.

VS Code (GitHub Copilot)

In VS Code, MCP tools are used by GitHub Copilot chat in agent mode.

The easiest way is the guided flow:

  1. Open the Command Palette (Ctrl+Shift+P, or Cmd+Shift+P on macOS) and run MCP: Add Server.
  2. Choose Command (stdio) for a local server or HTTP for a remote one.
  3. Enter the command or URL, give the server a name and choose where to save it.

To write the file yourself, create .vscode/mcp.json in your project. Note the key: VS Code uses servers, not mcpServers, and each entry states its type:

JSON
{
  "servers": {
    "filesystem": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "${workspaceFolder}"]
    },
    "notion": {
      "type": "http",
      "url": "https://mcp.notion.com/mcp"
    }
  }
}

That one-word difference is the most common reason a config copied from Cursor or Claude silently does nothing in VS Code. (VS Code can also read a shared .mcp.json file in the mcpServers format, but only in newer versions with that option turned on.)

For secrets, VS Code can prompt you instead of storing the value in the file: add an inputs list and refer to it as ${input:api-key}. See the VS Code MCP configuration reference (opens in a new tab) for the format.

To check, open Copilot chat in agent mode and ask for a small, harmless action that names the server, such as "use the filesystem server to list the files in this folder". Approve the call, then expand it to confirm it came from your server.

The same server in each app

Scroll sideways to see the whole table.

AppWhereTop-level keyRemote servers
Claude (web and desktop)Settings → Connectors(no file)Custom connector URL
Claude Desktop, localclaude_desktop_config.jsonmcpServersUse Connectors instead
Claude Codeclaude mcp add, or .mcp.jsonmcpServers--transport http
Cursor.cursor/mcp.json or ~/.cursor/mcp.jsonmcpServers"url"
VS Code.vscode/mcp.jsonservers"type": "http"

If the server doesn't show up

Work through these in order; the first two fix most problems.

  1. Restart properly. Claude Desktop only reads its config at startup, so quit it fully. In Cursor and VS Code, check the server's status in the MCP settings and restart it from there.
  2. Check the JSON. A missing comma or an extra bracket stops the whole file loading. Paste it into any JSON validator.
  3. Check the key. servers for VS Code, mcpServers for the others.
  4. Run the command yourself. Paste the command and its arguments into a terminal. If it fails there, with "npx not found" or a package error, it will fail in the app too. Install Node.js if needed.
  5. Use full paths. Folder paths and commands should be absolute. On Windows, escape backslashes in JSON (C:\\Users\\...).
  6. Read the logs. Claude Desktop writes MCP logs to ~/Library/Logs/Claude on macOS and %APPDATA%\Claude\logs on Windows; look for mcp.log and a file named after your server. In Cursor and VS Code, the server's entry in the MCP settings shows whether it started and any error.
  7. Sign in again. For remote servers, an expired login looks like a broken server. In Claude Code, run /mcp.

Before you connect anything

An MCP server can act with your access, so treat adding one like installing an app with permissions.

  • Use servers from sources you trust: the service's own documentation, the official MCP servers repository (opens in a new tab) or your app's marketplace.
  • Give the least access that works: one project folder, not your whole drive; a read-only database user; a token limited to what the task needs.
  • Keep approvals on for anything that writes, sends or deletes, at least until you trust the server. Approving each call keeps a human in the loop.
  • Watch for prompt injection. A web page, email or document a server reads can contain hidden instructions aimed at the AI. Be wary of combining a server that reads untrusted content with one that can send or delete things.
  • Keep keys out of shared files. Don't commit a config with a real key in it. Use environment variables or your app's secret prompts.

What to try next

Start with one server that saves you a real step, such as your docs, your issue tracker or a database you check by hand. Use it for a week before adding more. Each server adds tool descriptions the model has to read, and a long list makes it more likely to pick the wrong one.

If you find yourself pasting the same instructions into every chat instead, an MCP server may not be what you need; agent skills package instructions rather than connections. Our MCP vs agent skills guide explains when to use which, and the best AI agents for software development compares the coding tools that use MCP most heavily.

About the author

Stephen Gbolagade

Software Engineer and Technical Writer at Ploba

Writes Ploba's guides to AI tools, agents and protocols, explaining how they work in plain language.

More from Stephen

Keep learning

Plain-language explanations, technical guides and practical comparisons.

More articlesAI terms glossary

On this page

  • Before you start: local or remote?
  • Claude Desktop and Claude on the web
  • Add a remote server as a custom connector
  • Add a local server in the desktop app
  • Claude Code
  • Cursor
  • VS Code (GitHub Copilot)
  • The same server in each app
  • If the server doesn't show up
  • Before you connect anything
  • What to try next