Feature Request: Allow MCP tool access for Task subagents
Problem
Subagents launched via the Task tool only have access to standard tools (Read, Edit, Write, Bash, Glob, Grep) — they cannot use MCP tools (mcp__postgres__query, mcp__linear__*, etc.). This means any workflow that requires database queries or external service integration via MCP must run entirely in the main conversation context.
Real-world impact
We have slash commands (e.g., /elementary-sync) that need to:
- Query a Postgres database via
mcp__postgres__query - Create/update Linear issues via
mcp__linear__*
When the assistant delegates to a Task subagent, the agent silently falls back to psql via Bash (which fails due to auth/network issues), requiring user intervention to course-correct. We investigated this across 6+ conversation transcripts and confirmed the pattern is consistent:
- User invokes
/elementary-sync - Assistant delegates to
elementary-syncTask subagent - Subagent has no MCP tools → falls back to
psqlvia Bash → fails - User intervenes: "Why aren't you using the Postgres MCP?"
- Assistant then runs directly in main context with MCP tools → works
Current workaround
We had to:
- Delete the dedicated agent definition (
.claude/agents/elementary-sync.md) - Add explicit warnings in every slash command: "IMPORTANT: Do NOT delegate this to a subagent via the Task tool. Subagents do not have access to MCP tools."
- Run all MCP-dependent workflows inline in the main conversation
This defeats the purpose of having specialized agents for complex workflows.
Requested feature
Allow MCP server connections to be inherited by or passed to Task subagents, so they can use the same MCP tools available in the main conversation. This would enable proper separation of concerns — specialized agents handling complex workflows that require external service integration.
Environment
- Claude Code CLI (VSCode extension)
- MCP servers: Postgres (
@anthropic/mcp-postgres), Linear (linear-mcp) - OS: macOS
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗