[{"data":1,"prerenderedAt":53},["ShallowReactive",2],{"blog-claude-code-mcp-servers":3,"blog-related-claude-code-mcp-servers":36},{"slug":4,"title":5,"description":6,"category":7,"categoryId":8,"keyword":9,"date":10,"minutes":11,"body":12,"html":13,"headings":14},"claude-code-mcp-servers","MCP servers in Claude Code: what to connect and what to skip","How to add MCP servers to Claude Code, which scope to pick, how to keep them from eating your context, and which ones are worth connecting at all.","Getting started","getting-started","claude code mcp servers","2026-11-17",5,"An MCP server gives Claude Code tools it does not have out of the box: read an error from your monitoring service, query an issue tracker, drive a browser. You add one with `claude mcp add`, check it with `\u002Fmcp`, and its tools show up as `mcp__\u003Cserver>__\u003Ctool>`. The skill is not in adding servers but in connecting few of them, because each one costs context and widens what a prompt injection can reach.\n\n## How do you add an MCP server to Claude Code?\n\nThere are three transports, and the command depends on where the server lives.\n\n```sh\n# A remote server over HTTP (the recommended kind)\nclaude mcp add --transport http notion https:\u002F\u002Fmcp.notion.com\u002Fmcp\n\n# The same, with a token in a header\nclaude mcp add --transport http secure-api https:\u002F\u002Fapi.example.com\u002Fmcp \\\n  --header \"Authorization: Bearer your-token\"\n\n# A local server that Claude Code starts itself (stdio). The -- separates\n# Claude's options from the server's command.\nclaude mcp add --env AIRTABLE_API_KEY=YOUR_KEY airtable -- npx -y airtable-mcp-server\n```\n\nSSE (`--transport sse`) still works but is deprecated in favour of HTTP. Stdio is the default when you give no transport. Check the result:\n\n```sh\nclaude mcp list          # every server and its health\nclaude mcp get notion    # details of one\nclaude mcp remove notion # remove it, and its stored OAuth tokens\n```\n\nInside a session, `\u002Fmcp` shows the status of each server, lets you authenticate, reconnect or switch one off without deleting its configuration.\n\n## Which scope should a server live in?\n\nPass `--scope` (or `-s`) to choose where the configuration is stored.\n\n| Scope | Loads in | Shared | Stored in |\n| --- | --- | --- | --- |\n| `local` (the default) | This project only | No | `~\u002F.claude.json` |\n| `project` | This project only | Yes, through git | `.mcp.json` at the project root |\n| `user` | All your projects | No | `~\u002F.claude.json` |\n\nA good rule: `project` for servers the whole team needs (the issue tracker, the staging database tool), `user` for your personal ones, `local` for experiments. If the same name exists in several scopes, the most specific one wins, whole, with no merging of fields.\n\nA project-scoped `.mcp.json` looks like this:\n\n```json\n{\n  \"mcpServers\": {\n    \"api-server\": {\n      \"type\": \"http\",\n      \"url\": \"${API_BASE_URL:-https:\u002F\u002Fapi.example.com}\u002Fmcp\",\n      \"headers\": { \"Authorization\": \"Bearer ${API_KEY}\" }\n    }\n  }\n}\n```\n\n`${VAR}` and `${VAR:-default}` are expanded in the command, args, env, url and headers, so the file can be committed while the secrets stay in each person's environment. An entry with a `url` but no `type` is skipped as a configuration error. In an interactive session, Claude Code asks you to approve a project server the first time; `claude mcp reset-project-choices` resets those answers.\n\n## How do you sign in to a remote server?\n\nRemote HTTP servers use OAuth. Add the server, run `\u002Fmcp` in a session, and complete the browser flow. From a shell, `claude mcp login \u003Cname>` does the same, and `claude mcp logout \u003Cname>` clears the credentials. A few servers need a pre-registered client: `claude mcp add` takes `--client-id`, `--client-secret` and `--callback-port` for that, and the secret goes to your keychain rather than the config file.\n\n## What does an MCP server cost you?\n\nThis is the part people overlook. Connected servers put their tool names and instructions into the context on every turn, even when you are not using them. Say five servers with thirty tools each: that is a lot of text Claude carries for nothing,. The [context window article](\u002Fblog\u002Fclaude-code-context-window) explains why that budget matters.\n\nSo:\n\n- Connect a server for a job, then switch it off in `\u002Fmcp` when the job is done. Disabling does not delete the configuration.\n- Prefer a project scope for the few that really belong to a project, so they are absent elsewhere.\n- Big results hurt too. Claude Code warns when a tool returns a lot of output, and caps it; the `MAX_MCP_OUTPUT_TOKENS` environment variable raises the cap. Better to ask the tool for less than to raise it.\n\n## What is worth connecting, and what can you skip?\n\nAsk first whether a command-line tool does the job. Claude Code is very good with CLIs it already knows. With `gh` installed and signed in, it opens pull requests and reads review comments with no server at all, and for an unfamiliar CLI, pointing it at `--help` is enough. Anthropic's best-practices page gives the same order: CLI first, MCP for systems that have none.\n\nWorth a server:\n\n- **Issue tracker or project tool** (Linear, Jira, Notion and similar), when you want \"implement the ticket\" to read the ticket.\n- **Error monitoring** (Sentry is the example in the Claude Code help), to pull a real stack trace instead of pasting one.\n- **A database or an analytics tool**, read-only, so Claude can check data while it debugs.\n- **A browser automation server**, to look at a running page and check a UI change.\n\nProbably skip:\n\n- A server that duplicates a CLI you already have.\n- Anything you connected once to try it and never used again.\n- A server with write access to a system where a wrong action is expensive, unless you gate it with permission rules.\n\n## How do you keep MCP tools under control?\n\nEach tool is named `mcp__\u003Cserver>__\u003Ctool>`, and that name works in permission rules and hook matchers. A bare `mcp__memory` matches nothing; `mcp__memory__.*` in a [hook matcher](\u002Fblog\u002Fclaude-code-hooks) matches the whole server. Allow the read tools, leave the write tools on \"ask\".\n\nOn security, the docs are blunt: only connect servers you trust, because any server that fetches outside content can carry instructions aimed at the model. A web page returned by a search tool is untrusted input, and it arrives next to your own prompt. Keep tokens scoped to the least they need, and keep write tools behind a prompt. For [subagents](\u002Fblog\u002Fclaude-code-subagents), the `mcpServers` frontmatter field scopes a server to one subagent instead of the whole session.\n\n## What about headless runs?\n\n`claude -p` loads project-scoped servers without asking, since nobody is there to approve. In CI, pass only what you want with `--mcp-config` and add `--strict-mcp-config` to ignore every other source. The `system\u002Finit` event in the JSON stream lists each server and its status, so a script can fail if one did not connect. More in the [headless mode article](\u002Fblog\u002Fclaude-code-headless-mode).","\u003Cp>An MCP server gives Claude Code tools it does not have out of the box: read an error from your monitoring service, query an issue tracker, drive a browser. You add one with \u003Ccode>claude mcp add\u003C\u002Fcode>, check it with \u003Ccode>\u002Fmcp\u003C\u002Fcode>, and its tools show up as \u003Ccode>mcp__&lt;server&gt;__&lt;tool&gt;\u003C\u002Fcode>. The skill is not in adding servers but in connecting few of them, because each one costs context and widens what a prompt injection can reach.\u003C\u002Fp>\n\u003Ch2 id=\"how-do-you-add-an-mcp-server-to-claude-code\">\u003Ca class=\"anchor\" href=\"#how-do-you-add-an-mcp-server-to-claude-code\" aria-label=\"Link to this section\">#\u003C\u002Fa>How do you add an MCP server to Claude Code?\u003C\u002Fh2>\n\u003Cp>There are three transports, and the command depends on where the server lives.\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"sh\">\u003Ccode># A remote server over HTTP (the recommended kind)\nclaude mcp add --transport http notion https:\u002F\u002Fmcp.notion.com\u002Fmcp\n\n# The same, with a token in a header\nclaude mcp add --transport http secure-api https:\u002F\u002Fapi.example.com\u002Fmcp \\\n  --header &quot;Authorization: Bearer your-token&quot;\n\n# A local server that Claude Code starts itself (stdio). The -- separates\n# Claude's options from the server's command.\nclaude mcp add --env AIRTABLE_API_KEY=YOUR_KEY airtable -- npx -y airtable-mcp-server\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>SSE (\u003Ccode>--transport sse\u003C\u002Fcode>) still works but is deprecated in favour of HTTP. Stdio is the default when you give no transport. Check the result:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"sh\">\u003Ccode>claude mcp list          # every server and its health\nclaude mcp get notion    # details of one\nclaude mcp remove notion # remove it, and its stored OAuth tokens\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Inside a session, \u003Ccode>\u002Fmcp\u003C\u002Fcode> shows the status of each server, lets you authenticate, reconnect or switch one off without deleting its configuration.\u003C\u002Fp>\n\u003Ch2 id=\"which-scope-should-a-server-live-in\">\u003Ca class=\"anchor\" href=\"#which-scope-should-a-server-live-in\" aria-label=\"Link to this section\">#\u003C\u002Fa>Which scope should a server live in?\u003C\u002Fh2>\n\u003Cp>Pass \u003Ccode>--scope\u003C\u002Fcode> (or \u003Ccode>-s\u003C\u002Fcode>) to choose where the configuration is stored.\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Scope\u003C\u002Fth>\u003Cth>Loads in\u003C\u002Fth>\u003Cth>Shared\u003C\u002Fth>\u003Cth>Stored in\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>local\u003C\u002Fcode> (the default)\u003C\u002Ftd>\u003Ctd>This project only\u003C\u002Ftd>\u003Ctd>No\u003C\u002Ftd>\u003Ctd>\u003Ccode>~\u002F.claude.json\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>project\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>This project only\u003C\u002Ftd>\u003Ctd>Yes, through git\u003C\u002Ftd>\u003Ctd>\u003Ccode>.mcp.json\u003C\u002Fcode> at the project root\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>user\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>All your projects\u003C\u002Ftd>\u003Ctd>No\u003C\u002Ftd>\u003Ctd>\u003Ccode>~\u002F.claude.json\u003C\u002Fcode>\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>A good rule: \u003Ccode>project\u003C\u002Fcode> for servers the whole team needs (the issue tracker, the staging database tool), \u003Ccode>user\u003C\u002Fcode> for your personal ones, \u003Ccode>local\u003C\u002Fcode> for experiments. If the same name exists in several scopes, the most specific one wins, whole, with no merging of fields.\u003C\u002Fp>\n\u003Cp>A project-scoped \u003Ccode>.mcp.json\u003C\u002Fcode> looks like this:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"json\">\u003Ccode>{\n  \u003Cspan class=\"hljs-string\">\"mcpServers\"\u003C\u002Fspan>: {\n    \u003Cspan class=\"hljs-string\">\"api-server\"\u003C\u002Fspan>: {\n      \u003Cspan class=\"hljs-string\">\"type\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"http\"\u003C\u002Fspan>,\n      \u003Cspan class=\"hljs-string\">\"url\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"${API_BASE_URL:-https:\u002F\u002Fapi.example.com}\u002Fmcp\"\u003C\u002Fspan>,\n      \u003Cspan class=\"hljs-string\">\"headers\"\u003C\u002Fspan>: { \u003Cspan class=\"hljs-string\">\"Authorization\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"Bearer ${API_KEY}\"\u003C\u002Fspan> }\n    }\n  }\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Ccode>${VAR}\u003C\u002Fcode> and \u003Ccode>${VAR:-default}\u003C\u002Fcode> are expanded in the command, args, env, url and headers, so the file can be committed while the secrets stay in each person&#39;s environment. An entry with a \u003Ccode>url\u003C\u002Fcode> but no \u003Ccode>type\u003C\u002Fcode> is skipped as a configuration error. In an interactive session, Claude Code asks you to approve a project server the first time; \u003Ccode>claude mcp reset-project-choices\u003C\u002Fcode> resets those answers.\u003C\u002Fp>\n\u003Ch2 id=\"how-do-you-sign-in-to-a-remote-server\">\u003Ca class=\"anchor\" href=\"#how-do-you-sign-in-to-a-remote-server\" aria-label=\"Link to this section\">#\u003C\u002Fa>How do you sign in to a remote server?\u003C\u002Fh2>\n\u003Cp>Remote HTTP servers use OAuth. Add the server, run \u003Ccode>\u002Fmcp\u003C\u002Fcode> in a session, and complete the browser flow. From a shell, \u003Ccode>claude mcp login &lt;name&gt;\u003C\u002Fcode> does the same, and \u003Ccode>claude mcp logout &lt;name&gt;\u003C\u002Fcode> clears the credentials. A few servers need a pre-registered client: \u003Ccode>claude mcp add\u003C\u002Fcode> takes \u003Ccode>--client-id\u003C\u002Fcode>, \u003Ccode>--client-secret\u003C\u002Fcode> and \u003Ccode>--callback-port\u003C\u002Fcode> for that, and the secret goes to your keychain rather than the config file.\u003C\u002Fp>\n\u003Ch2 id=\"what-does-an-mcp-server-cost-you\">\u003Ca class=\"anchor\" href=\"#what-does-an-mcp-server-cost-you\" aria-label=\"Link to this section\">#\u003C\u002Fa>What does an MCP server cost you?\u003C\u002Fh2>\n\u003Cp>This is the part people overlook. Connected servers put their tool names and instructions into the context on every turn, even when you are not using them. Say five servers with thirty tools each: that is a lot of text Claude carries for nothing,. The \u003Ca href=\"\u002Fblog\u002Fclaude-code-context-window\">context window article\u003C\u002Fa> explains why that budget matters.\u003C\u002Fp>\n\u003Cp>So:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Connect a server for a job, then switch it off in \u003Ccode>\u002Fmcp\u003C\u002Fcode> when the job is done. Disabling does not delete the configuration.\u003C\u002Fli>\n\u003Cli>Prefer a project scope for the few that really belong to a project, so they are absent elsewhere.\u003C\u002Fli>\n\u003Cli>Big results hurt too. Claude Code warns when a tool returns a lot of output, and caps it; the \u003Ccode>MAX_MCP_OUTPUT_TOKENS\u003C\u002Fcode> environment variable raises the cap. Better to ask the tool for less than to raise it.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"what-is-worth-connecting-and-what-can-you-skip\">\u003Ca class=\"anchor\" href=\"#what-is-worth-connecting-and-what-can-you-skip\" aria-label=\"Link to this section\">#\u003C\u002Fa>What is worth connecting, and what can you skip?\u003C\u002Fh2>\n\u003Cp>Ask first whether a command-line tool does the job. Claude Code is very good with CLIs it already knows. With \u003Ccode>gh\u003C\u002Fcode> installed and signed in, it opens pull requests and reads review comments with no server at all, and for an unfamiliar CLI, pointing it at \u003Ccode>--help\u003C\u002Fcode> is enough. Anthropic&#39;s best-practices page gives the same order: CLI first, MCP for systems that have none.\u003C\u002Fp>\n\u003Cp>Worth a server:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Issue tracker or project tool\u003C\u002Fstrong> (Linear, Jira, Notion and similar), when you want &quot;implement the ticket&quot; to read the ticket.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Error monitoring\u003C\u002Fstrong> (Sentry is the example in the Claude Code help), to pull a real stack trace instead of pasting one.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A database or an analytics tool\u003C\u002Fstrong>, read-only, so Claude can check data while it debugs.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A browser automation server\u003C\u002Fstrong>, to look at a running page and check a UI change.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Probably skip:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>A server that duplicates a CLI you already have.\u003C\u002Fli>\n\u003Cli>Anything you connected once to try it and never used again.\u003C\u002Fli>\n\u003Cli>A server with write access to a system where a wrong action is expensive, unless you gate it with permission rules.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"how-do-you-keep-mcp-tools-under-control\">\u003Ca class=\"anchor\" href=\"#how-do-you-keep-mcp-tools-under-control\" aria-label=\"Link to this section\">#\u003C\u002Fa>How do you keep MCP tools under control?\u003C\u002Fh2>\n\u003Cp>Each tool is named \u003Ccode>mcp__&lt;server&gt;__&lt;tool&gt;\u003C\u002Fcode>, and that name works in permission rules and hook matchers. A bare \u003Ccode>mcp__memory\u003C\u002Fcode> matches nothing; \u003Ccode>mcp__memory__.*\u003C\u002Fcode> in a \u003Ca href=\"\u002Fblog\u002Fclaude-code-hooks\">hook matcher\u003C\u002Fa> matches the whole server. Allow the read tools, leave the write tools on &quot;ask&quot;.\u003C\u002Fp>\n\u003Cp>On security, the docs are blunt: only connect servers you trust, because any server that fetches outside content can carry instructions aimed at the model. A web page returned by a search tool is untrusted input, and it arrives next to your own prompt. Keep tokens scoped to the least they need, and keep write tools behind a prompt. For \u003Ca href=\"\u002Fblog\u002Fclaude-code-subagents\">subagents\u003C\u002Fa>, the \u003Ccode>mcpServers\u003C\u002Fcode> frontmatter field scopes a server to one subagent instead of the whole session.\u003C\u002Fp>\n\u003Ch2 id=\"what-about-headless-runs\">\u003Ca class=\"anchor\" href=\"#what-about-headless-runs\" aria-label=\"Link to this section\">#\u003C\u002Fa>What about headless runs?\u003C\u002Fh2>\n\u003Cp>\u003Ccode>claude -p\u003C\u002Fcode> loads project-scoped servers without asking, since nobody is there to approve. In CI, pass only what you want with \u003Ccode>--mcp-config\u003C\u002Fcode> and add \u003Ccode>--strict-mcp-config\u003C\u002Fcode> to ignore every other source. The \u003Ccode>system\u002Finit\u003C\u002Fcode> event in the JSON stream lists each server and its status, so a script can fail if one did not connect. More in the \u003Ca href=\"\u002Fblog\u002Fclaude-code-headless-mode\">headless mode article\u003C\u002Fa>.\u003C\u002Fp>\n",[15,18,21,24,27,30,33],{"id":16,"text":17},"how-do-you-add-an-mcp-server-to-claude-code","How do you add an MCP server to Claude Code?",{"id":19,"text":20},"which-scope-should-a-server-live-in","Which scope should a server live in?",{"id":22,"text":23},"how-do-you-sign-in-to-a-remote-server","How do you sign in to a remote server?",{"id":25,"text":26},"what-does-an-mcp-server-cost-you","What does an MCP server cost you?",{"id":28,"text":29},"what-is-worth-connecting-and-what-can-you-skip","What is worth connecting, and what can you skip?",{"id":31,"text":32},"how-do-you-keep-mcp-tools-under-control","How do you keep MCP tools under control?",{"id":34,"text":35},"what-about-headless-runs","What about headless runs?",[37,42,48],{"slug":38,"title":39,"description":40,"category":7,"categoryId":8,"keyword":41,"date":10,"minutes":11},"claude-code-beginners-guide","Claude Code for beginners: install, first session, habits","Install Claude Code, run your first session and learn the habits that matter: specific prompts, plan before edit, CLAUDE.md, small commits, a clean context.","claude code for beginners",{"slug":43,"title":44,"description":45,"category":7,"categoryId":8,"keyword":46,"date":10,"minutes":47},"claude-code-hooks","Claude Code hooks: run a script on every tool call","Claude Code hooks run your own script before or after a tool call. Learn the config format, exit codes and three working examples you can paste today.","claude code hooks",6,{"slug":49,"title":50,"description":51,"category":7,"categoryId":8,"keyword":52,"date":10,"minutes":11},"claude-code-permission-modes","Claude Code permission modes explained (and when to use each)","Default, acceptEdits, plan, auto, dontAsk and bypassPermissions: what each Claude Code permission mode allows, how to switch, and which one fits which job.","claude code permission modes",1794931098788]