EN

Language

Our editions

Written for each audience, not translated word for word.

How to add an MCP server to Claude, Claude Code, VS Code and ChatGPT

How-toBy Lucas Matías García TorresUpdated Data checked 4 min read

Reviewed by Lucas Matías García Torres on . How we work.

Leer en español

An industrial robotic arm placing small metal cubes connected by glowing orange cables

Short answer

To add an MCP server on October 23, 2026, give the app a remote server's HTTPS address or the command that starts a local one. In Claude, use Settings, Connectors, Add custom connector; in Claude Desktop, edit claude_desktop_config.json; in Claude Code, run claude mcp add; in VS Code, run MCP: Add Server; in ChatGPT Business, Enterprise and Edu, use Plugins, Add custom MCP server. Check the publisher, pin the version and grant the narrowest access.

Prices and limits change often: check the vendor's page before you pay. How we make money.

To add an MCP server you tell an app, such as Claude, Claude Code, VS Code or ChatGPT, either the web address of a remote server or the command that starts a local one. On October 23, 2026 the steps differ by app but the choice is always the same: remote over HTTPS or local on your machine. This guide shows how to connect one in each app and which safety checks to make first, based on the official documentation of MCP, Anthropic, Microsoft and OpenAI read on October 23, 2026. If you are new to the protocol, start with our explainer on what MCP is.

Remote or local

Remote servers run on the internet and you connect with a URL. They work from any MCP client with an internet connection, need nothing installed and usually ask you to sign in, commonly with OAuth. Claude Code calls HTTP the recommended transport for remote servers; the older SSE transport is deprecated.

Local servers run as a program on your computer that the app starts for you, usually with npx, uvx or Docker. They can reach your files and local tools, which is why the MCP project's security guide asks a first question before any install: does this need to run locally at all? If a remote version exists and the server does not need your files, prefer the remote one.

Claude and Claude Desktop

Remote server: open Settings, then Connectors, click Add and choose Add custom connector. Paste the server URL, including https://, click Add and complete the sign-in the server asks for. Afterwards, the connector's settings let you turn individual tools on or off.

Local server in Claude Desktop: open Settings from the Claude menu, go to the Developer tab and click Edit Config. That opens claude_desktop_config.json, which on Windows lives in %APPDATA%\Claude\ and on macOS in ~/Library/Application Support/Claude/. The official example adds the Filesystem server, which needs Node.js:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "C:\\Users\\you\\Documents\\project"]
    }
  }
}

Each folder in args is a folder the server may read and change, with your account's permissions. Save, quit Claude Desktop completely and open it again. Claude asks for your approval before each file action.

Claude Code

In Claude Code you add servers from the terminal:

claude mcp add --transport http notion https://mcp.notion.com/mcp
claude mcp add --transport stdio airtable -- npx -y airtable-mcp-server

The first line adds a remote server, the second a local one: everything after -- is the command that starts it. Use claude mcp list to see your servers and /mcp inside a session to check their status. The scope decides where a server loads:

  • Local (default): only in the current project and only for you, stored in ~/.claude.json.
  • Project: in a .mcp.json file at the project root that you commit so the whole team gets it.
  • User: in every project on your machine, still private to you.

A cloned repository cannot approve its own servers: a project's .mcp.json waits for your approval until you trust the folder. Our guide on how to use Claude Code covers the rest of the setup.

VS Code

Open the Command Palette and run MCP: Add Server. You can browse the MCP server gallery, which is in preview, paste a publisher's URL or command, or install from an NPM package, a Pip package or a Docker image. VS Code shows the package name, version and publisher before you click Allow. Microsoft's warning applies to every app: servers can run code on your machine and tools can reach external services with your permissions, so review the publisher, command or endpoint and requested access first, and never paste credentials into chat or commit them to your project.

ChatGPT

OpenAI's help page lists custom MCP servers for ChatGPT Business, Enterprise and Edu on the web. Go to Plugins, select the plus button and choose Add custom MCP server, enter a name and your server's public HTTPS endpoint or a Secure MCP Tunnel, set up authentication, accept the risk warning and select Create as a plugin. On Business, only admins and owners can create and publish them for the workspace; on Enterprise and Edu, admins can grant the permission to selected members. ChatGPT asks for confirmation before actions based on the app's permissions.

Checks before you connect anything

The MCP project's local server security guide and Anthropic's documentation agree on the basics:

  • Know the publisher. Tie the package to a source repository and check the exact name, because typosquatting is the cheapest attack.
  • Pin the version instead of installing latest.
  • Read the tool list. Tool descriptions are untrusted input, and a server that fetches external content exposes you to prompt injection.
  • Keep the roster small, because all connected servers share the same conversation.
  • Narrow the access: one project folder, read-only where possible, and a separate narrowly scoped token for each server instead of a global one.
  • Isolate third-party local servers, for example in a container with nothing mounted beyond what they need.

An MCP server is the easiest way to give a model tools, but each one is code you are choosing to trust. Our guides to function calling and building an agent explain how the model decides when to use them.

What we checked

  • MCP, connect to local servers: Claude Desktop Settings, Developer, Edit Config opens claude_desktop_config.json (macOS ~/Library/Application Support/Claude/, Windows %APPDATA%\Claude\); Filesystem Server example with npx -y @modelcontextprotocol/server-filesystem and allowed directories; requires Node.js; the server runs with your user permissions; restart Claude Desktop completely; actions require approval. (Model Context Protocol, )
  • MCP, connect to remote servers: Settings, Connectors, Add, Add custom connector; enter the full https URL; authentication commonly OAuth, API keys or username and password; enable or disable specific tools in the connector settings; only connect to servers from trusted sources. (Model Context Protocol, )
  • Claude Code MCP: HTTP is the recommended transport for remote servers and SSE is deprecated; claude mcp add --transport http name url; local stdio servers with -- before the command; claude mcp list and /mcp; scopes local (default, ~/.claude.json, current project), project (.mcp.json, shared) and user (all projects); a cloned repository cannot approve its own servers until the workspace is trusted; verify you trust each server, as servers that fetch external content can expose you to prompt injection. (Anthropic (Claude Code docs), )
  • VS Code MCP servers: MCP: Add Server from the Command Palette; MCP server gallery in preview; install from NPM, Pip or Docker with a confirmation showing package name, version and publisher; servers can run code on your machine and tools can access external services using your permissions; do not paste credentials into chat or commit them. (Microsoft (Visual Studio Code docs), )
  • Connecting custom MCP servers in ChatGPT (updated October 21, 2026): available for Business and Enterprise/Edu on ChatGPT web; Plugins, plus button, Add custom MCP server; public HTTPS endpoint or Secure MCP Tunnel; risk warning to acknowledge; Create as a plugin; on Business only admins and owners create and publish; Enterprise/Edu admins can grant permission with RBAC; ChatGPT asks for confirmation based on app permissions. (OpenAI Help Center, )
  • MCP local server security: ask whether it needs to run locally and prefer the remote version; identify the publisher, verify the exact package name against typosquatting, pin the version; treat tool definitions as untrusted input and keep the roster small; run third-party servers in a container; pass secrets per server and scope tokens narrowly; grant the narrowest filesystem root, read-only where possible. (Model Context Protocol, )

What may change

  • Menu names, plan availability and configuration formats change often as MCP support evolves. This page is reviewed quarterly.
  • The order and grouping of the safety checks are ours, built from the MCP project's and the vendors' guidance.

Frequently asked questions

How do I add an MCP server to Claude?

For a remote server, open Settings, Connectors, click Add and choose Add custom connector, then paste the HTTPS URL and sign in. For a local server in Claude Desktop, open Settings, Developer, Edit Config, add it under mcpServers in claude_desktop_config.json and restart the app.

How do I add an MCP server to Claude Code?

Run claude mcp add --transport http with a name and URL for a remote server, or claude mcp add with a name, two dashes and the start command for a local one. Add --scope project to share it through .mcp.json or --scope user to load it in every project.

Can I use MCP servers in ChatGPT?

OpenAI's help page lists custom MCP servers for ChatGPT Business, Enterprise and Edu on the web. You add them under Plugins with a public HTTPS endpoint or a Secure MCP Tunnel, and only admins and owners can publish them for the workspace.

Should I use a remote or a local MCP server?

Prefer remote when one exists and the server does not need your files, as the MCP project's security guide recommends. Use a local server only for things that need your files or local tools, and give it the narrowest folder access, read-only where possible.

Are MCP servers safe?

Only as safe as the code and the publisher behind them. Servers can run code with your permissions and tool descriptions are untrusted input, so check the publisher and exact package name, pin the version, read the tool list and give each server its own narrowly scoped token.

Sources

  1. Connect to local MCP servers: Claude Desktop configuration, Filesystem server and approvals, Model Context Protocol. Accessed October 23, 2026.
  2. Connect to remote MCP servers: custom connectors, authentication and tool permissions, Model Context Protocol. Accessed October 23, 2026.
  3. Connect Claude Code to tools via MCP: transports, scopes and project approvals, Anthropic (Claude Code docs). Accessed October 23, 2026.
  4. Add and manage MCP servers in VS Code: gallery, packages and trust, Microsoft (Visual Studio Code docs). Accessed October 23, 2026.
  5. Connecting custom MCP servers in ChatGPT: availability, permissions and setup, OpenAI Help Center. Accessed October 23, 2026.
  6. Local Server Security: provenance, untrusted tool definitions, isolation and credentials, Model Context Protocol. Accessed October 23, 2026.

Spotted an error or an outdated price? Tell us and we will fix it.

Change history

  • : First published. Checked on October 23, 2026 against the MCP documentation on local servers, remote servers and local server security, Claude Code's MCP guide, VS Code's MCP servers documentation and OpenAI's help page on custom MCP servers.

Next review: .

Part of our Agents & Automation guide.

Other topics