Connecting MCP to Claude Code: From Setup to Removal
claude-code

Connecting MCP to Claude Code: From Setup to Removal

(updated 2026-08-31) · 15 min read · Habni

Say you ask Claude to clean up your meeting notes. First you open the notes page in Notion. You drag-select the body and copy it. You paste it into the Claude window. Once the cleaned-up version comes back, you copy that too and paste it back into Notion.

Fine, once. But meetings happen every week.

MCP is what removes that round trip. Connect it once, and Claude opens Notion directly, reads it, and writes the cleaned-up result straight back in. The copying and pasting disappears.

This post is current as of August 2026 and written for anyone who has never connected an MCP server before. We'll start with what MCP actually is, then walk through turning it on at claude.ai and attaching one from the terminal, before ending on managing servers and fixing what goes wrong.

Start with what MCP actually is

MCP is a channel between Claude and some other service. Without the channel, a person has to carry the content back and forth. With it, Claude goes back and forth on its own.

The name sounds intimidating, but it's simple once you break it down. In Model Context Protocol, "Protocol" just means a shared standard. Think of USB. Back when every device used its own cable, you had to hunt down the right one every time you connected something. Once USB became a common standard, anything plugs into any port. MCP is the same idea: a shared standard that lets an AI tool and outside services recognize each other.

That's why services built by completely different companies, Notion, Slack, Google Drive, can all connect the same way. Claude's side doesn't need a custom build for each one.

Each thing you connect to is called an MCP server. "Server" sounds like a big deal, but here it just means a small program that lets Claude operate that service. Most of the time, the company behind the service has already built one and put it online, and all you do is point Claude at the address.

MCP (Model Context Protocol)

MCP (Model Context Protocol) is an open standard that connects AI tools to outside services. Connect an MCP server, and Claude Code can use that service's data and features directly.

ServiceCopyClaudeBefore connectingYou do the transferring every timeServiceClaudeAfter connecting via MCPClaude reads and writes directly

Here's a real example. I connected the Notion MCP server and cut down meeting notes cleanup by a lot.

Before connecting, handing Claude the meeting notes link did nothing, since it couldn't open it, so I ended up opening the page and scraping the body text over by hand. Once the cleaned-up version came back, I'd copy it again and paste it back into Notion. Sometimes I even had to export and re-import just to force a markdown document into Notion's own formatting.

After connecting, "clean up this week's meeting notes" is the whole request. Claude opens the page itself, reads it, and writes the cleaned-up version straight back in. I stopped switching between windows entirely.

Turn it on for the web and it follows you into the terminal

Start with the easiest route. Open claude.ai's connector settings in your browser and turn on whatever service you want. No terminal required.

Whatever you turn on there automatically shows up in Claude Code too. The official documentation states plainly that "MCP servers you add from claude.ai are automatically available in Claude Code." Type /mcp in the terminal and you'll see it in the list, tagged as coming from claude.ai.

Where you turn it on decides how far it follows

Since Claude shows up in more than one place, it's easy to get confused. How far a connection follows depends on where you switched it on.

Where you turn it onDoes it reach Claude Code?How
Web (claude.ai) connector settingsFollows automaticallyJust turn it on, it shows up in the /mcp list
Claude desktop appNot automatic, needs importingRun claude mcp add-from-claude-desktop in the terminal and pick which servers to bring over
Terminal (Claude Code)This is its native homeAttach it directly with claude mcp add

Only the web version is automatic. If you already have a server attached in the desktop app, you'll need to import it once, and after that it belongs to Claude Code. Importing only works on Mac and on Windows through WSL.

Some services only work on the web

Gmail, Google Calendar, and Microsoft 365 don't attach in the terminal at all. It comes down to how their sign-in works. Try to attach them in Claude Code and it just tells you to connect from claude.ai instead. For these, you have to use the web.

Turned it on but don't see it? Check your sign-in method

If you turned it on at claude.ai but it's not showing up in /mcp, check how you're signed in. Connectors only carry over if you're signed in with a claude.ai account. If you're signed in with an API key, a separate token, or a company-provided route, they won't come through. Run /status in the terminal to check how you're currently signed in.

If you're on a business plan (Team, Enterprise), there's one more thing. Only admins can add connectors. If it's not in the list, you'll need to ask an admin.

My own habit is to check the web connector list first for whatever service I want. If it's there, I never even open the terminal.

Connecting from the terminal with a command

A service that isn't in the web connector list gets attached from the terminal. You don't need to memorize or hunt down the command. The service's own documentation almost always has it written out in full, just copy and paste it. Can't find the docs? The Anthropic Directory has reviewed connectors you can search.

The command usually looks like this.

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

The notion slot is a name you're free to choose for referring to this server going forward. Leave everything else exactly as written in the service's docs.

Attaching a tool that runs on your own machine

A tool that isn't hosted online and instead runs on your own computer looks a bit different. Since there's no server already sitting somewhere, you also have to tell Claude the command that starts it up.

claude mcp add [options] <name> -- <command to run>

The two dashes in the middle are the whole trick. Think of it as a fence. Everything before it is addressed to Claude, everything after is addressed to the server. Drop it, and Claude mistakes the server's own options for its own and throws an error.

If a value like an API key is needed, pass it with --env.

claude mcp add --env AIRTABLE_API_KEY=your-key --transport stdio airtable -- npx -y airtable-mcp-server

⚠️ Don't put the server name right after --env. Claude reads that name as yet another key-value pair and rejects it. Slot a different option between --env and the name, like in the example above.

Scope: this folder only, or everywhere

Once it's attached, there's one more decision to make. Do you want this server available only in the current folder, or across all your work?

Where you save a server changes how far it reaches, even for the exact same server. What other tools call "global install" is what the table below calls user. It means it follows you no matter which folder you're working in.

Set it with --scope (or -s for short); leave it out and the default applies.

ScopeHow far it reachesWhen to use it
local (default)Just you, in this projectTesting something out on your own
projectEveryone on this projectA server the whole team shares
userAll of your projectsA personal tool you use everywhere
claude mcp add --scope user --transport http notion https://mcp.notion.com/mcp

Choose project scope and an .mcp.json file appears in your repository. Commit it, and teammates end up with the same server.

That said, a teammate pulling the repo doesn't get connected automatically. A server listed in the repo still requires each person to approve it individually. That's on purpose: a config someone else committed shouldn't be able to reach out to something external on your machine without your say-so. Before approval, it shows in the list as pending approval.

For a tool you use personally, user is the convenient choice. It follows you as you move between projects.

Managing connections: checking and removing

Once something's attached, it needs upkeep too. Four commands cover it.

claude mcp list          # see everything attached
claude mcp get notion    # inspect one server in detail
claude mcp remove notion # remove it

And inside Claude Code itself, run this.

/mcp

The /mcp screen is the one you'll actually reach for in practice. It shows, per server, whether it's currently connected and how many tools it exposes. If a server isn't offering any tools at all, it flags that too. This is also where you authenticate a server that requires sign-in.

Security: pick what you connect carefully

The official documentation puts a warning right here.

It explicitly says to confirm you trust a server before connecting it. Servers that pull in content from outside sources in particular carry a prompt injection risk.

Prompt injection is when a document Claude reads contains a hidden instruction along the lines of "from now on, do this." Claude can have trouble telling data from instructions. That means a server pulling in web pages, issue comments, or outside documents can carry a planted sentence right along with the legitimate content.

So two things are worth doing.

One is picking from a reviewed list. Anthropic runs a directory of reviewed connectors. Remote servers listed there can be added directly with claude mcp add.

The other is only connecting what you actually need. A server you attached but never use is better off removed. It's not just about security. More servers mean a longer tool list, and that eats into your context every time.

Fixing problems: MCP connections

Match the symptom to the cause and fix in the same row.

SymptomCauseFix
Server stuck on "pending approval"A project-scoped server listed in the repo needs each person to approve it individuallyRun claude in the terminal to enter interactive mode and approve it. Listing commands alone won't approve it
Wrote it into a config file directly, and the server gets skipped.mcp.json has the address but no type. Without a type, it's read as a local programAdd a type to the entry, like "type": "http"
A warning tells you to rename itSome names are reserved internally by Claude CodePick a different name
A remote server's connection dropsAuto-reconnect retries up to five times, doubling the wait each time starting at one secondIf all five attempts fail, it's marked as failed. Retry it yourself from /mcp
A local server's connection dropsA local server running on your own machine doesn't auto-reconnectReconnect from /mcp, or restart the server program yourself
A warning says the output is too largeA tool's response passed 10,000 tokens. It's truncated at 25,000 by defaultThis is a sign the request pulled in too much at once. Narrowing the scope and asking again also saves your usage limit. If you really need the ceiling raised, the MAX_MCP_OUTPUT_TOKENS environment variable does it. The threshold for the warning itself is fixed and doesn't change
In 30 seconds
  • Connect MCP and Claude reads and writes external systems like Notion, Slack, and databases directly. The point is eliminating the copy-and-paste round trip.
  • Connecting is claude mcp add. Remote servers use --transport http or sse; a program that runs on your own machine goes after --.
  • The -- separator is the boundary between Claude's own options and the server's command. Drop it and you get an error.
  • Scope is local for just you, project for team sharing via .mcp.json, and user for all of your own projects.
  • A server committed to the repo requires each person to approve it individually. Before approval, it shows as "pending approval."
  • Manage servers with claude mcp list, get, and remove, plus /mcp inside a session.
  • A server that pulls in outside content carries prompt injection risk. Pick from the reviewed directory and only connect what you need.
  • A warning appears once a tool's output passes 10,000 tokens. Narrowing your request is the better fix.

Frequently asked questions

How do I connect MCP to Claude Code?

Use the claude mcp add command in the terminal. A remote server takes the form claude mcp add --transport http name address, while a program running on your own machine takes the form claude mcp add name -- command-to-run. Every server is a little different, so the surest route is copying the exact command from that service's own documentation.

Where are MCP servers stored?

Set it with --scope. local is just you, in this project, and it's the default. project is saved to an .mcp.json file and shared with your team through the repo. user applies across all of your projects. For a personal tool, user is the convenient choice; for something the whole team shares, pick project.

How do I check which MCP servers I have attached?

In the terminal, claude mcp list shows the full list, and claude mcp get name shows one server in detail. Inside a Claude Code session, typing /mcp shows each server's connection status and how many tools it offers, and it's also where you authenticate a server that requires sign-in. To remove one, run claude mcp remove name.

If a teammate pulls the repo, does MCP connect automatically?

No. A project-scoped server committed to the repo still requires each person to approve it individually. That's intentional: a config someone else committed shouldn't be able to reach out to something external on your machine without your consent. Before approval it shows as pending approval in the list, and you approve it by running claude in interactive mode.

Is it fine to connect any MCP server?

No. The official documentation warns you to confirm a server is trustworthy before connecting it. Servers that pull in web pages or outside documents in particular carry prompt injection risk, meaning an instruction can be hidden inside the content they bring back. Pick from the reviewed connectors in Anthropic's directory, and remove servers you're not using.

Is there a downside to attaching a lot of MCP servers?

Yes. Every server you add lengthens the tool list Claude has to keep in view, which eats into your context. A single tool's output passing 10,000 tokens also triggers a warning, and it's truncated at 25,000 by default. The MAX_MCP_OUTPUT_TOKENS environment variable can raise that ceiling, but the warning threshold itself is fixed. Attach only what you need, and narrow your request when the output turns out large.

Sources (5)Expand to see all sources
#Claude Code#MCP#connectors#Notion#integration

Related Posts