Grounded reference244 words

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

ScopeLoads inSharedStored in
Local (the default)Current project onlyNo~/.claude.json, under the project's path
ProjectCurrent project onlyYes, via version control.mcp.json at the project root
UserAll your projectsNo~/.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.

SyntaxBehaviour
${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

TransportUse for
httpRemote servers — the recommended choice
stdioLocal processes
sseDeprecated
wsPersistent 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

  1. 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

Ready to study Claude Certified Architect - Foundations (CCAR-F)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free