MCP Integration in Claude Code: Scopes, Resources and Built-in Tools

The Model Context Protocol (MCP) connects Claude to your systems. The exam checks that you can configure servers at the right scope, keep secrets out of git, use resources to cut wasted calls, and pick the right built-in tool (Task Statements 2.4 and 2.5).

Advertisement
📖 What You’ll Learn: You will be able to configure MCP servers at the right scope, keep secrets out of git, and pick the right built-in tool for each job.

🔌 Project scope vs user scope

ScopeFileUse for
Project.mcp.json in the repo (committed)Shared team servers (GitHub, Jira, internal docs)
User~/.claude.jsonPersonal or experimental servers
{
  "mcpServers": {
    "github": {
      "command": "github-mcp-server",
      "env": { "GITHUB_TOKEN": "${GITHUB_TOKEN}" }
    }
  }
}

Environment-variable expansion (${GITHUB_TOKEN}) keeps credentials out of version control. Tools from all configured servers are discovered when Claude Code connects and are available at the same time.

🛠️ Tools vs resources

  • Tools perform actions (search tickets, create an issue).
  • Resources expose content catalogues — issue summaries, documentation trees, database schemas — so the agent can see what exists without exploratory tool calls.

If the agent keeps choosing built-in Grep over your more capable MCP search tool, improve the MCP tool’s description. For standard systems like Jira, prefer a maintained community server; build custom servers for team-specific workflows.

MCP architecture in Claude CodeClaude Code (host)built-in: Read · Write · EditBash · Grep · GlobMCP clientdiscovers tools fromall servers at startGitHub server (team).mcp.json in the repotoken via ${GITHUB_TOKEN}Notes server (personal)~/.claude.jsononly on your machineRemote docs serverStreamable HTTPtools + resources (catalogues)stdiostdioHTTPTools = actionsResources = what existsPrompts = user templates
Figure: Claude Code's MCP client connects to team, personal and remote servers at the same time.
Advertisement

🛠️ Choosing built-in tools

NeedTool
Search file contents (callers, error strings, imports)Grep
Find files by name or path pattern (**/*.test.tsx)Glob
Load a whole fileRead
Create or overwrite a fileWrite
Targeted change via unique anchor textEdit (fallback: Read + Write when the anchor isn’t unique)
Run commands and testsBash

Explore incrementally: Grep for entry points, then Read along imports. To trace usage through wrapper modules, list all exported names first, then Grep for each.

🧪 Exam-Style Practice Questions

Try these before opening the answers. They use the same scenario style as the real exam.

Question 1. Where should a shared team GitHub MCP server be configured, and how is its token handled?

  • A. `.mcp.json` with the token inline, but git-ignored
  • B. `~/.claude.json` with the token inline
  • C. CLAUDE.md
  • D. Project `.mcp.json` committed, using `${GITHUB_TOKEN}` env expansion
Show answer

Answer: D. Project scope makes it shared, and env expansion keeps secrets out of git. B is personal scope and the token is inline. C isn't where servers are configured. A is no longer shared, and it's a fragile secret-handling pattern.

Question 2. You need to find every file named `*.spec.ts`, then find which of them call `createUser(`. Which tools, in order?

  • A. Grep, then Glob
  • B. Bash `ls` only
  • C. Glob, then Grep
  • D. Read all files
Show answer

Answer: C. Glob matches path patterns, and Grep searches contents. A reverses their roles. D is wasteful. B can't search contents well.

Question 3. The agent makes 12 exploratory calls to discover which database tables exist. What's the better design?

  • A. Increase `max_tokens`
  • B. Put the full DB dump in the prompt
  • C. Add a `list_everything` tool
  • D. Expose the schema catalogue as an MCP **resource**
Show answer

Answer: D. Resources expose catalogues without needing exploratory calls. C is a blunt tool that may be huge. B wastes context and goes stale. A is unrelated.

Advertisement

📝 Assignment

Do these tasks in order. Each one has a Done when check, so you know when it is complete. The stretch task is optional but close to what the exam expects from an architect. Keep your answers in one notes file or Git repository, and revisit them in your final week of revision together with the cheat sheet in the last lesson of this course.

  1. Task 1: Create a project .mcp.json that uses ${GITHUB_TOKEN} and a personal server in user scope. Confirm both appear with /mcp.
    ✅ Done when: /mcp lists both servers, and your committed .mcp.json contains no real token.
  2. Task 2: Find all callers of one function with Grep and all test files with Glob in a repo you know.
    ✅ Done when: You recorded the exact Grep and Glob patterns you used and how many matches each returned.
  3. Stretch: expose a list of documents as an MCP resource and compare the number of tool calls before and after.
    ✅ Done when: You counted tool calls before and after adding the resource, and the count went down.
Advertisement

❓ Frequently Asked Questions

🤔 Where do shared MCP servers go?

In the project's .mcp.json, committed to the repository, with secrets supplied through environment-variable expansion.

🤔 What is an MCP resource?

Read-only content the server exposes, such as a catalogue or schema, so the agent can see what exists without exploratory calls.

🤔 What is the difference between Grep and Glob?

Grep searches inside files for text. Glob finds files whose names or paths match a pattern.

🤔 What if Edit cannot find a unique match?

Read the whole file, then Write the corrected content.

🏁 Summary

  • Team servers in .mcp.json with ${ENV}; personal servers in ~/.claude.json.
  • Resources for catalogues, tools for actions.
  • Grep = contents, Glob = paths, Edit needs unique anchors.
📝 Test yourself: Mock Test 2 · Mock Test 3 (30 scenario-based questions in 60 minutes, with explanations).

Next, continue with CLAUDE.md Configuration Guide: Hierarchy, @import and Path-Specific Rules.

🎬 Prefer video? Watch QA, automation and AI testing tutorials on the SQA Tools YouTube channel.

Independent study material by SQA Tools. Not affiliated with, endorsed by or sponsored by Anthropic. Claude is a trademark of Anthropic. Mock questions are original practice items, not real exam content. Exam facts checked against Anthropic's official exam guides and certification FAQ on 11 November 2026.