Skip to content

fix: propagate parent workspace MCP server config to spawned agents#645

Merged
nikrich merged 1 commit into
mainfrom
fix/mcp-config-inheritance
Mar 26, 2026
Merged

fix: propagate parent workspace MCP server config to spawned agents#645
nikrich merged 1 commit into
mainfrom
fix/mcp-config-inheritance

Conversation

@nikrich
Copy link
Copy Markdown
Owner

@nikrich nikrich commented Mar 26, 2026

Summary

  • Add getParentMcpConfig() utility that reads MCP server config from the parent workspace's .claude/settings.json and .claude/settings.local.json
  • Pass MCP config via --mcp-config CLI flag when spawning all agent types (seniors, QA, tech lead, chat agents, resumed agents)
  • Agents in submodule worktrees now inherit MCP tools (e.g., Stitch) configured at the workspace level

Test plan

  • 10 unit tests for getParentMcpConfig (missing files, merge behavior, malformed JSON, etc.)
  • 4 tests verifying --mcp-config flag in Claude runtime builder
  • All 2234 tests pass, TypeScript compiles clean

Closes #643

🤖 Generated with Claude Code

Read MCP server configuration from the parent workspace's
.claude/settings.json and pass it via --mcp-config flag when spawning
agent Claude CLI sessions, so agents in submodule worktrees can access
MCP tools configured at the workspace level.

Closes #643

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nikrich nikrich force-pushed the fix/mcp-config-inheritance branch from 30278d8 to ba13c3d Compare March 26, 2026 09:54
@nikrich nikrich merged commit 34bbdaf into main Mar 26, 2026
2 checks passed
@nikrich nikrich deleted the fix/mcp-config-inheritance branch March 26, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spawned agents don't inherit parent workspace MCP server configuration

1 participant