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.
.mcp.jsonat the project root is the shared, committed MCP server config for the team.~/.claude.jsonholds user-scope MCP config alongside OAuth session and per-project state — personal, not shared.enableAllProjectMcpServersauto-approves everything in the project.mcp.json;enabledMcpjsonServers/disabledMcpjsonServersgive 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:
/contextshows which instruction files actually loaded this session;/memorylists and opens memory file locations.
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.
Which file shares MCP servers with the whole team?
~/.claude.json is personal; local settings are gitignored.
How should Claude Code run in CI?
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 appSource: Claude Code Docs — Settings · Independent study aid, not affiliated with or endorsed by Anthropic.