Claude Code MCP: add servers, scopes, Notion, Jira and Drive
Updated 14 min read
Claude Code connects to MCP servers with claude mcp add: --transport http and a URL for a remote server, or a command after -- for a local stdio server. Servers save at local scope by default (you, this project only). --scope user adds one for every project, and --scope project writes a .mcp.json your team can commit. Check them with /mcp inside a session and remove them with claude mcp remove <name>.
The flags below come from the --help output of Claude Code 2.1.274, the version on the machine we wrote this on, checked against Anthropic’s MCP docs on 1 October 2026.
What does MCP do in Claude Code?
MCP (Model Context Protocol) is the standard way for an agent to use outside tools. Claude Code is the client, and each server you add gives Claude a set of tools: a database, Sentry errors, a browser, a wiki. Files in the folder you start Claude Code from need no server, so an Obsidian vault works as it is; the Obsidian MCP guide covers when Obsidian’s CLI or an MCP server is worth adding.
Anthropic’s features overview splits the work this way: CLAUDE.md is context that loads every session, skills are knowledge loaded on demand, and MCP connects Claude to external services. A skill or a line in CLAUDE.md can tell Claude how to use a server well.
Idle servers cost little context: with tool search, on by default, only tool names and server instructions load at session start.
How do I add an MCP server to Claude Code?
Run claude mcp add in your terminal, not inside a session. The name is yours to choose, and Claude Code labels the server’s tools with it.
A remote MCP server over HTTP, the transport the docs recommend for hosted services:
claude mcp add --transport http notion https://mcp.notion.com/mcp
The same, with a static token instead of OAuth:
claude mcp add --transport http secure-api https://api.example.com/mcp \
--header "Authorization: Bearer your-token"
A local stdio server, which Claude Code starts as a process on your machine. Everything after -- is the command that runs the server, passed through untouched:
claude mcp add playwright -- npx -y @playwright/mcp@latest
claude mcp add --env AIRTABLE_API_KEY=your-key --transport stdio airtable \
-- npx -y airtable-mcp-server
Without --, Claude Code parses the server’s flags as its own. And --env takes several KEY=value pairs, so a server name straight after it is read as another pair and rejected; put another option, such as --transport stdio, in between.
If a server’s instructions only give an mcpServers JSON block written for another client, pass the object inside it to add-json:
claude mcp add-json example '{"type":"http","url":"https://mcp.example.com/mcp"}'
An entry with a url but no type fails, because Claude Code reads a missing type as stdio. streamable-http is accepted as an alias for http.
A successful add prints Added .... That means the configuration was written, not that the server works, so check it next.
Which flags does claude mcp add take?
From claude mcp add --help on 2.1.274:
| Flag | What it does |
|---|---|
-t, --transport <transport> |
stdio, sse or http. Stdio if not specified |
-s, --scope <scope> |
local, user or project. Default local |
-e, --env <env...> |
Environment variables, -e KEY=value |
-H, --header <header...> |
Headers for HTTP and SSE servers |
--client-id <clientId> |
OAuth client ID for HTTP and SSE servers |
--client-secret |
Prompts for the OAuth client secret, or reads MCP_CLIENT_SECRET |
--callback-port <port> |
Fixed OAuth callback port, for servers that need a pre-registered redirect URI |
The other subcommands are add-json, add-from-claude-desktop (macOS and WSL), list, get, remove, login, logout, reset-project-choices and serve. WebSocket servers need add-json with "type": "ws". SSE is deprecated; from v2.1.265 an http server that only speaks SSE is switched over automatically.
For scripts and CI, claude itself takes --mcp-config <configs...> to load servers from JSON files or strings, and --strict-mcp-config to use only those and ignore every other MCP configuration.
Local, project or user scope: which should I use?
| Scope | Stored in | Loads in | Shared |
|---|---|---|---|
local (default) |
~/.claude.json, under this project’s path |
This project | No |
project |
.mcp.json in the project root |
This project | Yes, through git |
user |
~/.claude.json, top-level mcpServers |
All your projects | No |
Use local for experiments and your own credentials, user for tools you want everywhere, and project for servers the whole team should get.
When one name is defined in several places, Claude Code connects once, in this order of precedence: local, project, user, plugin servers, then claude.ai connectors. The whole entry comes from the winner; fields are not merged. To change a server’s scope, remove it and add it again.
How do I share MCP servers with my team in .mcp.json?
claude mcp add --scope project creates or updates .mcp.json, or you can write it by hand:
{
"mcpServers": {
"claude-code-docs": {
"type": "http",
"url": "https://code.claude.com/docs/mcp"
},
"api-server": {
"type": "http",
"url": "${API_BASE_URL:-https://api.example.com}/mcp",
"headers": { "Authorization": "Bearer ${API_KEY}" }
}
}
}
${VAR} and ${VAR:-default} expand in command, args, env, url and headers, so each person keeps their key in their own environment and nothing secret goes into git. In a remote server’s url and headers, Claude Code’s own credentials, such as ANTHROPIC_API_KEY, read as empty, so a repository cannot send them to a server it names.
In an interactive session, Claude Code asks you to approve each project server the first time, so a cloned repository cannot start processes without your consent. claude mcp reset-project-choices clears your answers. In claude -p runs there is no prompt and project servers load without asking; --strict-mcp-config or the disabledMcpjsonServers setting keeps them out.
How should a team manage MCP servers in Claude Code?
To give everyone the same servers, commit .mcp.json with a ${VAR} reference wherever a key or a machine-specific path goes. If a teammate has not set a variable that has no default, the file still loads: claude mcp list warns about the missing variable and Claude Code uses the literal ${VAR} text. List the variables each server needs in the README.
Each developer still approves the servers. A committed .claude/settings.json that sets enableAllProjectMcpServers or enabledMcpjsonServers is ignored until you trust the folder (by running claude there and accepting the trust dialog), so a cloned repository cannot approve its own servers. Approvals in your own ~/.claude/settings.json, in managed settings or in a file passed with --settings apply even in an untrusted folder. To drop one shared server without editing the team’s file, add its name to disabledMcpjsonServers in your own settings, which blocks it in every permission mode.
An admin can also set MCP servers for the whole organization through managed configuration (from Anthropic’s managed MCP docs; we have not deployed it).
managed-mcp.jsondeploys a fixed set. Device management usually installs it in/Library/Application Support/ClaudeCode/on macOS,/etc/claude-code/on Linux and WSL,C:\Program Files\ClaudeCode\on Windows. Users then cannot add or use any other server, including plugin servers and anything passed with--mcp-config. An empty server map disables MCP except in-process servers and those inmanagedMcpServers.managedMcpServersin managed settings gives everyone remote servers on top of their own (v2.1.259 or later). Each entry must be anhttps://HTTP or SSE server with no command and no${VAR}references. Users can read any header value set there, so use OAuth or a key issued for the whole organization.allowedMcpServersanddeniedMcpServersfilter the servers people add, matching by name, command or URL pattern. Unless managed settings also setallowManagedMcpServersOnly: true, a user’s own settings can widen the allowlist. Denylists merge from every scope.
Claude Code has no built-in server registry to browse. The docs suggest publishing the approved list and its claude mcp add commands somewhere like an internal company wiki, or shipping the servers as plugins through a managed plugin marketplace. The Claude Code team setup guide covers the rest of a team’s shared configuration, and the Claude Team plan guide lists seat prices. In Cursor, admins on the Cursor Teams plan add Team MCP servers to the team marketplace, and teammates install them from there. On the ChatGPT Business plan, only admins and owners can create and publish custom MCP servers for the workspace.
How do I check which MCP servers are connected?
Inside a session, /mcp lists every server with its status and tool count, and lets you authenticate, reconnect or disable one. From the shell, claude mcp list health-checks each server and claude mcp get <name> shows one, including its scope (we describe these two from the docs and did not run them for this guide).
The statuses you will see:
✔ Connected: ready to use.! Needs authentication: reachable, but needs a browser sign-in or a token.✘ Failed to connect: the server did not start or did not answer.claude mcp get <name>shows the HTTP status and the server’s error on anIssue:line.⏸ Pending approval: a.mcp.jsonserver you have not approved yet.⊘ Disabled for this project: switched off in/mcp, still configured.
Claude Code reads MCP configuration when a session starts, so start a new session after adding a server or editing .mcp.json. To see how much context each server’s tools take, run /context all; the context window section of our Claude Code memory guide covers the rest of that budget.
How do I sign in to an MCP server that uses OAuth?
Add the server without a header, then run /mcp, select it and choose Authenticate, and approve in your browser. From a shell, claude mcp login <name> runs the same flow; --no-browser prints the URL instead, for SSH sessions, and you paste the redirect URL back. claude mcp logout <name> clears the stored credentials. The Google Drive MCP server does not let Claude Code register itself, so you create an OAuth client in Google Cloud and pass the client ID, the secret and its redirect port to claude mcp add.
If a server rejects a header you configured, Claude Code reports a failed connection rather than falling back to OAuth, so fix the token or remove the header.
claude -p has no /mcp panel, so it cannot run an OAuth flow. Sign in from an interactive session first, or use a server that takes a token in a header.
How do I remove or disable an MCP server?
claude mcp remove notion
claude mcp remove notion --scope local
Without --scope, remove deletes the server from whichever scope holds it; if the name is in several, it says so and you pass --scope. Removing a remote server also deletes the OAuth tokens Claude Code stored for it. To pause a server without losing its configuration, toggle it off in /mcp. The choice is recorded per project.
Why is my MCP server not working in Claude Code?
/mcpshows no servers. You added it from another project (local scope is tied to the repository root, or the exact directory outside git), or you edited the wrong file. Claude Code reads~/.claude.jsonand<project>/.mcp.json, not~/.claude/mcp.jsonor~/.claude/.mcp.json.- Failed to connect. Read the
Issue:line. Runcurl -I <url>: a 404 or 405 still means the server is up (many endpoints only answer POST), a 401 or 403 means you need to authenticate, and no response means a URL or network problem. For stdio, run the command yourself; ifclaude mcp getshows a different command, you probably left out--. - A whitespace warning. Usually a pasted token with a trailing newline. Claude Code uses values as written, so edit them.
- Startup timeout. The default is 30 seconds, and a first
npxdownload can take longer.MCP_TIMEOUT=60000 clauderaises it (milliseconds). - Connected, but no tools. Usually a missing environment variable such as an API key. Pass it with
--env. - Tool output cut off. Claude Code warns above 10,000 tokens and caps MCP output at 25,000 by default.
MAX_MCP_OUTPUT_TOKENS=50000raises the cap.
What is a remote MCP server, and when does it need more setup?
A remote MCP server runs on a host somewhere else, and Claude Code reaches it at a URL over Streamable HTTP, the http transport. A local server is a process Claude Code starts on your machine and talks to over stdio. Notion, Atlassian and Google host remote servers, so each teammate adds one URL instead of installing a package and signs in with their own account.
Most hosted servers let Claude Code register itself as an OAuth client, through dynamic client registration or a Client ID Metadata Document, and the /mcp sign-in is the only step. A server that supports neither fails with an error like “Incompatible auth server: does not support dynamic client registration”. Register an OAuth app in that vendor’s developer portal and pass it in with --client-id, --client-secret and --callback-port, as in the Google Drive section below.
Some Anthropic-hosted connectors, including Microsoft 365, Gmail and Google Calendar, do not support local OAuth from Claude Code, because their identity provider accepts only the redirect URL claude.ai registered. Signing in from /mcp shows is Anthropic-hosted and doesn't support local OAuth. Remove your entry with claude mcp remove <name>, connect the service at claude.ai/customize/connectors, and it appears in Claude Code automatically.
How do I add Notion’s MCP server to Claude Code?
claude mcp add --transport http notion https://mcp.notion.com/mcp
Then run /mcp, pick Notion and finish the OAuth flow in your browser. This is the command in Notion’s connect guide, and it adds Notion’s hosted server, which Notion maintains; its older open-source server, which runs locally with an integration token, is no longer actively maintained. The agent can read and update what you can already access in the workspace you pick, so a --scope project entry in .mcp.json shares the address and each teammate still signs in as themselves.
For CI or a scheduled agent with no browser, Business and Enterprise workspaces have MCP tokens. A workspace owner creates one with New MCP token in Notion’s Developer portal, and the client sends it as a bearer token:
claude mcp add --transport http notion https://mcp.notion.com/mcp \
--header "Authorization: Bearer your-mcp-token"
Notion retires its SSE endpoint, https://mcp.notion.com/sse, on 23 February 2027, so an older entry pointing there needs the URL above.
How do I add Atlassian’s MCP server for Jira and Confluence?
claude mcp add --transport http atlassian https://mcp.atlassian.com/v2/mcp
Run /mcp in a session to sign in with your Atlassian account. Atlassian’s server connects to an Atlassian Cloud site and covers Jira, Confluence, Jira Service Management, Bitbucket Cloud, Compass and Loom. Search and cross-product context calls, such as search, searchAtlassian and getTeamworkGraphContext, consume your organization’s Rovo credits.
An agent that cannot open a browser needs an organization admin to enable API token sign-in first. The client then sends Authorization: Basic with a base64 email:api_token, or Authorization: Bearer with a service account API key, in a --header. On Server or Data Center, use mcp-atlassian instead: an open-source Jira and Confluence server (MIT, not an Atlassian product) that you run with uvx mcp-atlassian and a Personal Access Token.
How do I add the Google Drive MCP server to Claude Code?
Google’s Drive server is at https://drivemcp.googleapis.com/mcp/v1 and is part of the Google Workspace Developer Preview Program. Its eight tools search and list files, read or download them, show metadata and sharing, and create or copy files; none of them edits, moves or deletes one.
Google’s authorization server publishes no dynamic registration endpoint, so you create the OAuth client yourself. From Google’s setup guide: in a Google Cloud project, enable drive.googleapis.com and drivemcp.googleapis.com, configure the consent screen, then create a Web application OAuth client with “Use this client for an AI-powered agent” ticked. Add http://localhost:8080/callback as its redirect URI so it matches Claude Code’s callback port:
claude mcp add --transport http \
--client-id YOUR_CLIENT_ID --client-secret --callback-port 8080 \
drive https://drivemcp.googleapis.com/mcp/v1
--client-secret asks for the secret with masked input. Run /mcp to sign in. We combined Google’s and Anthropic’s docs for this and have not run it against Google’s server. If Drive asks you to sign in every hour, the client is getting no refresh token, and Google’s fix is to request offline access with access_type=offline or the offline_access scope.
Do Claude connectors work in Claude Code?
Yes. A Claude connector is a remote MCP server added in Claude under Customize > Connectors, and when you sign in to Claude Code with your Claude account, those connectors are available in the terminal and in cloud sessions. They come last in precedence, and a server you added yourself with the same URL or command wins. To keep them out of Claude Code, set "disableClaudeAiConnectors": true in any settings file, or ENABLE_CLAUDEAI_MCP_SERVERS=false.
Every Claude plan can add custom connectors, and Free is limited to one. On Team, only Owners and Primary Owners add one for the organization; Enterprise also lets custom roles with Manage access to Libraries do it. Each member then finds the connector under Customize > Connectors and clicks Connect to sign in as themselves.
Claude reaches a connector from Anthropic’s cloud, in Claude Desktop and Cowork too, so the server has to be reachable from the public internet on port 443. A server behind your VPN fails as a connector, while Claude Code, which connects from your machine, can still add it with claude mcp add.
Where Claude Code can keep what it learns
A wiki server gives Claude Code somewhere to keep what it learns beyond one session and one machine, which is where CLAUDE.md and auto memory stop (the Claude Code memory guide explains both). The Claude apps keep a separate memory in your Claude account, described in the Claude memory guide.
Dexio is a hosted wiki for AI agents. Claude Code and your other agents read, search, write and link markdown pages over MCP, and you see what they know as a page graph at https://app.dexio.wiki. It is open source (AGPL-3.0) and free for one person. The server is remote Streamable HTTP at https://app.dexio.wiki/mcp and takes an API key in a header, so there is no OAuth step and it works headless:
claude mcp add --transport http --scope user dexio https://app.dexio.wiki/mcp \
--header "Authorization: Bearer dxk_..."
You do not need to fetch the key yourself. Send Claude Code this:
Connect yourself to my Dexio wiki. The steps are at https://dexio.wiki/agents.md: read the whole file, not a summary, and follow them.
It replies with a link and a code. You sign in (or create a free account) in your browser and click Allow access, and Claude Code adds the server itself. Every agent connects to the same address and names itself on each change, so page_history shows which agent wrote what. The same wiki works in Codex and Cursor, and the LLM wiki guide explains the pattern behind it.
FAQ
What is the difference between Claude Code and MCP? Claude Code is the agent. MCP is the protocol it uses to reach outside tools: Claude Code is the client, and each server is a source of tools.
Where does Claude Code store MCP servers? Local and user scope in ~/.claude.json (%USERPROFILE%\.claude.json on Windows, or inside CLAUDE_CONFIG_DIR if you set it). Project scope in .mcp.json at the project root.
Can Claude Code be an MCP server itself? Yes. claude mcp serve starts it as a stdio server that another client, such as Claude Desktop, can launch. It prints nothing when it starts, which is normal.
Sources
- https://code.claude.com/docs/en/mcp
- https://code.claude.com/docs/en/managed-mcp
- https://code.claude.com/docs/en/mcp-quickstart
- https://code.claude.com/docs/en/features-overview
- https://developers.notion.com/guides/mcp/get-started-with-mcp
- https://support.atlassian.com/atlassian-ai-gateway/docs/get-started-with-the-atlassian-remote-mcp-server/
- https://support.atlassian.com/atlassian-ai-gateway/docs/configure-authentication-via-api-token/
- https://github.com/atlassian/atlassian-mcp-server
- https://github.com/sooperset/mcp-atlassian
- https://developers.google.com/workspace/drive/api/guides/configure-mcp-server
- https://developers.google.com/workspace/drive/api/reference/mcp
- https://accounts.google.com/.well-known/openid-configuration
- https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp
- https://claude.com/docs/connectors/getting-started
- https://dexio.wiki/agents.md
- https://dexio.wiki/docs/