2.4 — MCP Server Integration
CCAR-F Domain 2 · Task 2.4
What You Need to Know
An MCP server extends Claude by connecting it to an external system (database, API, development tool, issue tracker).
The Scoping Hierarchy
| Level | File | Scope |
|---|---|---|
| Project | .mcp.json (repo root) |
Version-controlled, shared with whole team |
| User | ~/.claude.json |
Personal, not shared |
All tools from all configured servers (project + user) are discovered at connection time and available simultaneously.
Environment Variable Expansion
.mcp.json supports ${VARIABLE_NAME} syntax so credentials stay out of version control:
{
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}",
"DATABASE_URL": "${DATABASE_URL}"
}
}
Also supports ${VAR:-default} fallback form.
MCP Resources
Resources expose a content catalogue to an agent upfront (issue lists, documentation hierarchies, database schemas). This reduces exploratory tool calls. Resources show agents what data is available; tools let them act on it.
The Build-vs-Use Decision
- Use community servers for standard integrations (Jira, GitHub, Slack, Linear, Notion).
- Build custom only for team-specific workflows, custom business logic, or proprietary internal systems with no community server.
Detailed MCP Tool Descriptions
When an MCP tool has a sparse description, the agent may prefer a built-in tool even when the MCP tool is more capable. Write detailed descriptions that explain capabilities and outputs.
Exam Traps
- Building a custom MCP server for a standard integration like Jira
- Putting team-wide MCP configuration in ~/.claude.json
- Pasting a token into .mcp.json
- Adding a system prompt rule or removing built-in tools to force use of an MCP tool
Check your understanding
Practice Scenario
🔒 This practice scenario is part of Skillmarked Pro
The lessons stay free. Pro unlocks the other 23 CCAR-F practice scenarios and the 60-question timed mock exam, plus everything for every other exam.
Cancel anytime. Or €199 a year, which saves 17%.
Not sure yet? Try 10 free mock exam questions.
Already Pro? Log in.
Sources
- Connect Claude Code to tools via MCP, Claude Code Docs
- Understanding MCP servers, Model Context Protocol
- Resources, Model Context Protocol
- Introduction to Model Context Protocol, Anthropic Academy