Note on selection
Integrate MCP servers into Claude Code and agent workflows
What you need to know
- Project-scoped .mcp.json is for shared team tooling; user-scoped ~/.claude.json is for personal or experimental servers. Those two are the graded contrast; the CLI also has a project-private
localscope, which is what it uses by default. - Use environment variable expansion in .mcp.json (for example ${GITHUB_TOKEN}) so the config can be committed without the secret.
- Tools from all configured MCP servers are discovered at connection time and are available to the agent simultaneously.
- Write detailed MCP tool descriptions covering capabilities and outputs, or the agent will prefer built-in tools like Grep over a more capable MCP tool.
- Prefer an existing community MCP server for standard integrations such as Jira; build custom servers only for team-specific workflows.
- Expose content catalogs (issue summaries, documentation hierarchies, database schemas) as MCP resources to eliminate exploratory tool calls.
Where the config lives decides who gets the tools
MCP servers are registered by scope, and the scope is a collaboration decision. Two of them are what the certification grades:
- Project-level
.mcp.json— checked into the repository. Use it for shared team tooling, so every engineer who clones the repo picks up the same servers. - User-level
~/.claude.json— per-developer. Use it for personal or experimental servers that should not be imposed on the team.
Claude Code itself has a third scope, local, which is what claude mcp add writes when you pass no --scope flag. It also lives in ~/.claude.json, but scoped to one project rather than all of them. The exam contrasts shared versus personal, and those are the two above. So if a stem's options include a scope the guide never names, that is not the credited answer. Knowing it exists is what saves you the "I added the server and it vanished in my other repo" afternoon.27
Because project config is committed, it must never contain secrets. .mcp.json supports environment variable expansion — write ${GITHUB_TOKEN} in the config and let each developer or CI runner supply the value from their own environment. The config is shareable; the credential is not.27
Discovery is at connection time, and it is cumulative
Tools from all configured MCP servers are discovered when the client connects, and they are all available to the agent simultaneously. Two consequences follow. First, you do not select a server per request — everything configured is in play, which is exactly why 2.3's tool-count discipline matters when you add servers. Second, a server that fails to start simply contributes no tools, so a "missing tool" symptom is usually a connection or credential problem rather than a selection problem.29
Competing with the built-in tools
An MCP tool sits alongside the built-ins (Read, Grep, Glob, and the rest), and the model picks between them on description alone. A thin description loses: the agent falls back to Grep even when a purpose-built MCP tool would answer the question in one call with better structure. Enhance MCP tool descriptions to explain capabilities and outputs in detail — say what the tool indexes, what it returns, and why it beats a raw text search — or the more capable tool goes unused.
Buy before you build, and publish a catalog
For standard integrations, choose an existing community MCP server — Jira is the guide's example — and reserve custom servers for team-specific workflows the community cannot know about. Custom servers are maintenance you own forever.
Finally, expose content catalogs as MCP resources: issue summaries, documentation hierarchies, database schemas. A resource gives the agent visibility into what data exists without a sequence of exploratory tool calls to find out — it replaces search-to-discover with read-the-index.28
Show which config file serves which audience, where environment variable expansion injects credentials, and that tools and resources from every configured server are discovered at connection time into one list the agent sees.
Trace one tool call from the agent through the MCP client and server to the backend and back, so the learner sees where description-based selection happens, where credentials are applied, and where the isError payload originates. Every hop stays on an adjacent layer — the agent never talks to the server directly.
Worked examples
Shared team server in .mcp.json with a token from the environment
Scenario 4 · Developer Productivity with ClaudeThe productivity team wants every engineer to have the GitHub MCP server available the moment they clone the repo, without anyone pasting a personal access token into version control.
Register the server in project-scoped .mcp.json and reference the credential through environment variable expansion. The file is committed; each developer exports GITHUB_TOKEN locally and CI injects it from its secret store. A developer who additionally wants to try an unreleased server puts that one in ~/.claude.json so it stays personal.
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}" }
},
"jira": {
"command": "npx",
"args": ["-y", "mcp-server-jira"],
"env": { "JIRA_API_TOKEN": "${JIRA_API_TOKEN}", "JIRA_SITE": "${JIRA_SITE}" }
}
}
}The agent keeps using Grep instead of the code-index MCP tool
Scenario 4 · Developer Productivity with ClaudeThe team ships a custom MCP server exposing find_symbol_references, which walks a pre-built symbol index and returns callers with file, line, and enclosing function. The agent ignores it and runs Grep instead, then wades through comments and string literals.
The cause is the description: "Finds references." That gives the model no reason to prefer it over a text search it already trusts. Rewriting the description to spell out the capability and the output shape — index-backed, resolves re-exports, returns structured call sites — is what shifts selection. This is the same mechanism as 2.1, applied specifically to MCP tools competing against built-ins.
{
name: 'find_symbol_references',
description:
'Finds every call site of an exported symbol using a pre-built symbol index, ' +
'not text matching. Resolves re-exports and wrapper modules, so it finds ' +
'callers that reference the symbol under an aliased name — which Grep cannot. ' +
'Ignores comments, strings and generated files. ' +
'Input: symbol name plus optional package scope. ' +
'Output: array of {file, line, enclosingFunction, isTest}. ' +
'Prefer this over Grep for "who calls X" questions across the repo.',
}A resource catalog instead of exploratory tool calls
Scenario 4 · Developer Productivity with ClaudeBefore answering a question about the payments service, the agent used to issue five or six speculative calls just to learn which schemas and docs existed. Each call cost a turn and filled context with dead ends.
Exposing the catalog as MCP resources — the database schema list, the documentation hierarchy, open issue summaries — lets the agent read one index and go straight to the right target. This is the guide's stated purpose for resources: give agents visibility into available data without requiring exploratory tool calls.
{
"resources": [
{ "uri": "repo://schemas/index",
"name": "Database schemas",
"description": "All table and column definitions for payments, orders and accounts." },
{ "uri": "repo://docs/tree",
"name": "Documentation hierarchy",
"description": "Titles and paths of every ADR and runbook, grouped by service." },
{ "uri": "jira://issues/open/summary",
"name": "Open issue summaries",
"description": "Key, title and component for every open issue in the PAY project." }
]
}Anti-patterns
- Putting a literal API token — or an experimental personal server — in project-scoped .mcp.json instead of using environment variable expansion and user-scoped ~/.claude.json because the project file is committed and shared, so the secret leaks and the unstable dependency is imposed on the whole team.
- Writing a thin MCP tool description instead of detailing capabilities and outputs because the agent will keep preferring built-in tools like Grep over the more capable MCP tool.
- Building a custom MCP server for a standard integration such as Jira instead of adopting an existing community server because you take on permanent maintenance for no differentiated capability.
- Letting the agent discover available data through exploratory tool calls instead of exposing content catalogs as MCP resources because every probe costs a turn and pollutes context.
How it is examined
- Expect a direct scoping item: shared team tooling goes in project-level .mcp.json, personal or experimental servers in user-level ~/.claude.json. Memorize both file names exactly.
- When a stem says a custom MCP tool exists but the agent still uses Grep, the answer is to enhance the MCP tool description — not to remove or disable the built-in tool. Options that strip built-ins are distractors.
- A stem describing many exploratory calls before real work begins is pointing at MCP resources as content catalogs. Distractors usually propose more tools or a bigger system prompt instead of exposing the catalog.
Beyond the exam — what the API does that this does not grade
The guide names two scopes. Claude Code has three, and the third is the one you get by default.27
| Scope | Loads in | Shared | Stored in |
|---|---|---|---|
| Local | Current project only | No | ~/.claude.json |
| Project | Current project only | Yes | .mcp.json |
| User | All your projects | No | ~/.claude.json |
claude mcp add writes local scope unless you pass --scope. The docs give local the purpose the guide gives user scope. That is personal development servers, experimental configurations, and servers with credentials you do not want in version control.
When one server name appears in more than one scope, precedence runs local → project → user → plugin servers → claude.ai connectors. The winning entry is used whole; fields are not merged across scopes.
References — 3 sources
- Connect Claude Code to tools via MCP Anthropic Documents three MCP installation scopes, not two, with a precedence order — local, then project, then user, then plugin servers, then claude.ai connectors — where local is the default and "the entire server entry from that source is used; fields are not merged across scopes". Local scope's stated purpose, "personal development servers, experimental configurations, or servers with credentials you don't want in version control", is what the guide assigns to user scope.
- Resources Model Context Protocol The normative resource model — URI-identified, listable, subscribable — which is what makes "read-the-index instead of search-to-discover" mechanically true rather than a metaphor.
- Connect to MCP servers Anthropic The shortest path from "a tool is missing" to a fix: add a server, verify the connection with `/mcp`, and find the configuration on disk.
Live product docs — where they differ from the exam guide, answer from the guide. All references
Exam guide, verbatim — what is measured
Knowledge of
- MCP server scoping: project-level (.mcp.json) for shared team tooling vs user-level (~/.claude.json) for personal/experimental servers
- Environment variable expansion in .mcp.json (e.g., ${GITHUB_TOKEN}) for credential management without committing secrets
- That tools from all configured MCP servers are discovered at connection time and available simultaneously to the agent
- MCP resources as a mechanism for exposing content catalogs (e.g., issue summaries, documentation hierarchies, database schemas) to reduce exploratory tool calls
Skills in
- Configuring shared MCP servers in project-scoped .mcp.json with environment variable expansion for authentication tokens
- Configuring personal/experimental MCP servers in user-scoped ~/.claude.json
- Enhancing MCP tool descriptions to explain capabilities and outputs in detail, preventing the agent from preferring built-in tools (like Grep) over more capable MCP tools
- Choosing existing community MCP servers over custom implementations for standard integrations (e.g., Jira), reserving custom servers for team-specific workflows
- Exposing content catalogs as MCP resources to give agents visibility into available data without requiring exploratory tool calls