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

📚 Exam guide v1.0 (July 2026)🔄 Checked against official sources: 11 Nov 2026✏️ Updated: 12 Nov 2026⏱️ 8 min read🎯 Official objectives 2.4 and 2.5

👋 In plain words: MCP lets Claude Code plug into your team's systems, such as GitHub, Jira or a database, the same way for everyone. This lesson covers where to configure those connections, how to keep passwords out of Git, and which built-in tool to use for searching code.

Advertisement

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

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

🔑 Key terms

  • MCP (Model Context Protocol): A standard that connects Claude to tools and data, like USB for AI.
  • .mcp.json: A file in your repository listing the MCP servers your whole team shares.
  • Environment variable: A secret or setting stored on your machine, for example GITHUB_TOKEN, not in the code.
  • Resource: Read-only content an MCP server offers, such as a list of database tables.
  • Grep / Glob: Built-in tools. Grep searches inside files; Glob finds files by name.

📖 The story in this lesson

Ravi wants every ShopNest developer's Claude Code to reach the team's GitHub and Jira, without anyone committing a password to the repository.

💡 Think of it like this

MCP is like a universal power socket. Any appliance (server) with the standard plug works in any room (Claude client). .mcp.json is the house wiring plan everyone shares. Your personal desk lamp stays in your own room, ~/.claude.json.

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

🌍 Real-world example: Sharing GitHub without sharing the token

Ravi commits .mcp.json with the GitHub server, and the token written as a variable. Each developer sets their own GITHUB_TOKEN locally. Ravi's experimental weather server stays in his personal ~/.claude.json.

{"mcpServers": {"github": {"command": "github-mcp-server",
  "env": {"GITHUB_TOKEN": "${GITHUB_TOKEN}"}}}}
Advertisement

🛠️ 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.

🌍 Real-world example: 12 calls to find the tables

Claude made 12 exploratory calls just to learn which database tables exist. Ravi exposes the table list as an MCP resource instead. Claude can now see it straight away and goes straight to the right table.

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. Swipe sideways to see the whole diagram.

🛠️ 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.

🌍 Real-world example: Finding every test that creates a user

Ravi needs every *.spec.ts file that calls createUser(. First Glob, to find files by name pattern. Then Grep, to search inside those files for the text. Reading every file one by one would waste time and context.

🚫 Common beginner mistake: Writing an API token directly in .mcp.json. Use environment-variable expansion, so the committed file contains no secrets.

🛠️ Try it yourself (about 10 minutes)

  1. In a test repository, create .mcp.json with one server that uses ${MY_TOKEN}.
  2. Set MY_TOKEN in your terminal, not in the file.
  3. Start Claude Code and run /mcp to see the server.
  4. Check with git diff that no real token appears.

✅ You are done when: /mcp lists the server and the committed file contains only the variable name.

Advertisement

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