Claude Code MCP Servers
What Claude Code MCP servers do, when to use them, how to add them safely, and how to avoid permission and context bloat.
MCP servers let Claude Code connect to external tools through the Model Context Protocol. A server can expose tools, prompts, and resources that Claude Code can call during a session.
Last checked on May 24, 2026. MCP behavior is evolving quickly. Treat third-party MCP servers as code you are giving tool access to, not as harmless plugins.
Short Answer
Use MCP when Claude Code needs an external system, not because it is fashionable. Good MCP use cases include GitHub operations, browser automation, documentation lookup, databases, ticketing systems, internal APIs, and custom developer tools.
When MCP Is Worth It
| Need | MCP can help | Better alternative |
|---|---|---|
| Read or update GitHub issues and PRs | GitHub MCP or a curated integration. | Paste a single issue link for one-off work. |
| Test a website in a real browser | Playwright or browser MCP. | Static code review if no real browser state is needed. |
| Query internal docs | Docs/search MCP. | Put a short, stable summary in CLAUDE.md. |
| Inspect a database schema | Database MCP with read-only credentials. | Export schema to a local file for a one-time review. |
| Repeat a team workflow | MCP prompt or skill. | A simple slash command if no external tool is needed. |
Basic Add Pattern
For a local stdio server, the command shape is:
claude mcp add --transport stdio <name> -- <command> [args...]The -- separator matters. Options such as --transport, --env, --scope, and --header belong before the server name. Everything after -- is passed to the MCP server process.
Safety Checklist
- Prefer read-only credentials for the first setup.
- Add one server at a time.
- Do not give broad file, database, or browser access unless the workflow needs it.
- Keep secrets in environment variables or a credential store, not in committed config.
- Test with a small task before using MCP in a production repository.
- Remove unused servers from project config.
- Watch output size; large MCP results can flood context.
Output and Context Limits
MCP output can consume a lot of context. Claude Code displays warnings for large outputs and has default output limits. For rare workflows that genuinely need more, you can raise MAX_MCP_OUTPUT_TOKENS, but the better fix is usually to narrow the MCP query.
Good prompt:
Use the GitHub MCP server to inspect issue #42 only.
Summarize the acceptance criteria and list the files likely involved.
Do not modify anything yet.Risky prompt:
Read the whole repo, all open issues, and all recent PRs, then fix everything.