π 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.
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).
π 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
| Scope | File | Use for |
|---|---|---|
| Project | .mcp.json in the repo (committed) | Shared team servers (GitHub, Jira, internal docs) |
| User | ~/.claude.json | Personal 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}"}}}}π οΈ 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.
π οΈ Choosing built-in tools
| Need | Tool |
|---|---|
| Search file contents (callers, error strings, imports) | Grep |
Find files by name or path pattern (**/*.test.tsx) | Glob |
| Load a whole file | Read |
| Create or overwrite a file | Write |
| Targeted change via unique anchor text | Edit (fallback: Read + Write when the anchor isn’t unique) |
| Run commands and tests | Bash |
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.
.mcp.json. Use environment-variable expansion, so the committed file contains no secrets.π οΈ Try it yourself (about 10 minutes)
- In a test repository, create
.mcp.jsonwith one server that uses${MY_TOKEN}. - Set
MY_TOKENin your terminal, not in the file. - Start Claude Code and run
/mcpto see the server. - Check with
git diffthat no real token appears.
β
You are done when: /mcp lists the server and the committed file contains only the variable name.
π§ͺ 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.jsonwith the token inline, but git-ignored - B.
~/.claude.jsonwith the token inline - C. CLAUDE.md
- D. Project
.mcp.jsoncommitted, 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
lsonly - 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_everythingtool - 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.
π 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.
- 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. - 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. - 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.
β 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.jsonwith${ENV}; personal servers in~/.claude.json. - Resources for catalogues, tools for actions.
- Grep = contents, Glob = paths, Edit needs unique anchors.
Next, continue with CLAUDE.md Configuration Guide: Hierarchy, @import and Path-Specific Rules.
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.