MCP servers from plugins fail to start in agent team split panes
Bug Description
When using agent teams with iTerm2 split panes, plugin-provided MCP servers fail to start in spawned teammate panes. The status line shows 1 MCP server failed · /mcp.
Environment
- Claude Code with
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 - iTerm2 with
it2CLI (v0.2.0) - macOS Darwin 25.2.0
- Plugin:
claude-mem@thedotmack(providesmcp-searchMCP server)
Steps to Reproduce
- Have a plugin installed that provides an MCP server (e.g., claude-mem with
mcp-search) - Enable agent teams:
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"in settings - Spawn a team with teammates using
TeamCreate+Tasktool - Teammates spawn in iTerm2 split panes
- Each pane shows
1 MCP server failedin the status line
Root Cause
The plugin's MCP server is configured with a path using ${CLAUDE_PLUGIN_ROOT}:
{
"mcpServers": {
"mcp-search": {
"type": "stdio",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/mcp-server.cjs"
}
}
}
The CLAUDE_PLUGIN_ROOT environment variable does not appear to be propagated correctly to the child agent processes spawned in split panes, causing the MCP server command to fail.
Expected Behavior
Plugin MCP servers should start successfully in agent teammate panes, with CLAUDE_PLUGIN_ROOT (and any other required env vars) properly propagated to child processes.
Actual Behavior
MCP server fails silently in each agent pane. The agents still function for built-in tools (Read, Edit, Grep, etc.) but cannot access plugin-provided MCP tools.
Impact
Low — agents can complete most tasks without plugin MCP servers. But plugins that provide critical MCP tools (e.g., memory search, specialized APIs) would be unavailable to teammates.
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗