[BUG] MCP tools completely inaccessible from `--agent` main thread — breaks orchestrator pattern

Resolved 💬 4 comments Opened Mar 6, 2026 by Mationetap Closed Apr 4, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When running Claude Code with claude --agent <name>, the main thread agent has zero access to MCP tools. Tools from configured MCP servers don't appear as available, even though:

  • The agent's mcpServers field explicitly lists the servers
  • The same MCP servers work perfectly in a normal claude session (without --agent)
  • The same MCP servers work correctly in subagents spawned via Task() from this main thread

Tested matrix:

| Scenario | MCP Access |
|----------|-----------|
| Normal claude session | Works |
| claude --agent conductor (main thread) | BROKEN — no MCP tools visible |
| Subagent via Task(), user-scoped server (~/.claude.json) | Works |
| Subagent via Task(), project-scoped server (.mcp.json) | BROKEN |

This has been reported multiple times (#13898, #13605, #7296, #13254, #13890, #14496) since at least September 2025 and remains unfixed as of March 2026.

What Should Happen?

When an agent file specifies mcpServers: [memory, linear] and those servers are configured in ~/.claude.json, the agent should have access to those MCP tools regardless of whether it's running as:

  • A normal session
  • A main thread via --agent
  • A subagent via Task()

Error Messages/Logs

No error is produced. The MCP tools simply don't appear in the available tools list. The agent behaves as if no MCP servers are configured.

Steps to Reproduce

  1. Configure an MCP server in user scope (~/.claude.json), e.g.:

``json
{
"mcpServers": {
"memory": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-memory-service"]
}
}
}
``

  1. Create an agent file ~/.claude/agents/test-mcp.md:

```yaml
---
name: test-mcp
description: Test MCP access
mcpServers:

  • memory

---
List all your available tools, including MCP tools. Then try to call memory_search with query "test".
```

  1. Run: claude --agent test-mcp
  1. Observe: MCP memory tools are not listed as available. The agent cannot call memory_search.
  1. Compare: Run claude (normal session, no --agent). Ask the same. MCP tools appear and work.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.69 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Impact: This is a hard blocker for the orchestrator/conductor pattern. I built a 10-agent pipeline where the conductor (main thread via --agent) needs to coordinate Linear tasks (MCP), store knowledge in MCP Memory Service, and manage workflow. None of this works directly.

Workarounds I had to build:

  1. A dedicated linear-manager subagent that runs curl + GraphQL via Bash (adds 2-3 turns per Linear operation)
  2. A Python wrapper (mcs-wrapper.py) that imports the MCS library directly and is called via Bash
  3. Conductor delegates ALL MCP operations to subagents, adding complexity and latency

Additional finding: Project-scoped MCP servers (.mcp.json) also don't work in subagents — only user-scoped servers (~/.claude.json) are visible to Task() subagents.

Related issues: #13898, #13605, #7296, #13254, #13890, #14496

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗