AITraining2U

Programs

Resources

Case Studies

Quick Links

Enquire Now
Domain 2 · 20%% of exam

MCP config and CI/CD workflows

Sharing servers with a team, and running Claude Code without a human.

4 min read · Lesson 7 of 11 in this domain

Two practical concerns close out this domain. First, sharing: .mcp.json is the committed, project-scoped MCP configuration, so a teammate cloning the repo gets the same servers — as against ~/.claude.json, which is personal and holds your OAuth session and per-project state. Second, automation: CI has no terminal and nobody to answer a prompt, so Claude Code runs non-interactively and emits machine-readable output the pipeline parses to decide pass or fail. The temptation there is to disable permissions so nothing can block; resist it, because CI is precisely where no human is watching.

Key points
  • .mcp.json at the project root is the shared, committed MCP server config for the team.
  • ~/.claude.json holds user-scope MCP config alongside OAuth session and per-project state — personal, not shared.
  • enableAllProjectMcpServers auto-approves everything in the project .mcp.json; enabledMcpjsonServers / disabledMcpjsonServers give per-server control.
  • For CI, run non-interactive print mode with a machine-readable JSON output format the pipeline can parse. CI runners have no TTY, so scripting keystrokes is brittle.
  • Do not blanket-bypass permissions in automation — that removes the safety boundary exactly where no human is watching.
  • Subagents live in .claude/agents/ (project) and ~/.claude/agents/ (user).
  • Debugging: /context shows which instruction files actually loaded this session; /memory lists and opens memory file locations.
Exam trap

In a CI review job, "instruct the model to only report high-severity issues" depresses measured recall — it still finds the bugs, then declines to report them. Ask for coverage with confidence and severity, and filter downstream.

Check your understanding

Which file shares MCP servers with the whole team?

Correct answer: A — .mcp.json at the project root
~/.claude.json is personal; local settings are gitignored.

How should Claude Code run in CI?

Correct answer: B — Non-interactive print mode with JSON output
CI has no TTY, and bypassing permissions removes the safety boundary exactly where nobody is watching.

Practise this domain with 20%%-weighted questions in the study app.

Open in study app

Source: Claude Code Docs — Settings · Independent study aid, not affiliated with or endorsed by Anthropic.