Reference: configuring MCP servers
Claude Certified Architect - Foundations (CCAR-F) › Domain 2: Tool Design & MCP Integration
Configuring MCP servers, from the Claude Code documentation
Domain 2 examines where an MCP server is configured and who receives it. The exam guide names two scopes. The documentation describes three, and the one it adds is the default.
The three scopes
| Scope | Loads in | Shared | Stored in |
|---|---|---|---|
| Local (the default) | Current project only | No | ~/.claude.json, under the project's path |
| Project | Current project only | Yes, via version control | .mcp.json at the project root |
| User | All your projects | No | ~/.claude.json |
Precedence runs local, then project, then user, then plugin-provided servers, then claude.ai connectors.
Environment variable expansion
Project scope is committed, so a credential must be referenced rather than written.
| Syntax | Behaviour |
|---|---|
| ${VAR} | Expands to the environment variable |
| ${VAR:-default} | Expands to VAR if set, otherwise the default |
Expansion works in command, args, env, url and headers.
If a variable is not set the server still loads with the text unexpanded, and claude mcp list reports a missing-variable warning. The default form is how you avoid that.
Transports
| Transport | Use for |
|---|---|
http | Remote servers — the recommended choice |
stdio | Local processes |
sse | Deprecated |
ws | Persistent bidirectional connections |
For stdio the double-dash separator matters: everything after it passes to the server untouched.
claude mcp add --env KEY=value --transport stdio myserver -- python server.py --port 8080
A url with no type is a configuration error, not a default.
The commands
Working with configured servers
claude mcp add
Add a server. The scope flag chooses local, project or user; the transport flag picks the transport; the header flag supplies authentication.
Output limits
MCP output
- 10,000 tokens
- 25,000 tokens
- MAX_MCP_OUTPUT_TOKENS
- 500,000 characters
A server can annotate one tool with a larger character allowance in its tool listing, up to that hard ceiling.
Sources
- Connect Claude Code to tools via MCP — https://code.claude.com/docs/en/mcp (retrieved 2026-08-30)