Feature Request: Allow MCP tools to be available in subagents (Task tool)

Resolved 💬 2 comments Opened Jan 20, 2026 by mateuscarrijo Closed Feb 28, 2026

Summary

Currently, when using the Task tool to spawn subagents (Explore, Plan, feature-dev, etc.), these subagents do not have access to MCP server tools like Serena. This limits their effectiveness for code navigation and editing tasks.

Problem

MCP servers like Serena provide powerful semantic code navigation through Language Server Protocol (LSP):

  • find_symbol - Find symbols by name with semantic understanding
  • find_referencing_symbols - Find all references to a symbol across the codebase
  • get_symbols_overview - Get structured overview of a file's symbols
  • replace_symbol_body - Precisely edit function/class bodies
  • rename_symbol - Rename symbols across the entire codebase

However, when I delegate tasks to subagents via the Task tool, they fall back to basic tools (Glob, Grep, Read) and lose all the semantic navigation capabilities.

Current behavior:

Main Claude (has MCP tools) 
    └── spawns Subagent (NO MCP tools) ❌

Desired behavior:

Main Claude (has MCP tools) 
    └── spawns Subagent (inherits MCP tools) ✅

Use Cases

  1. Large refactoring tasks - Subagent could use find_referencing_symbols to find all usages before refactoring
  2. Code exploration - Explore agent could use get_symbols_overview for better understanding
  3. Parallel code reviews - Multiple subagents could analyze different parts with semantic understanding
  4. Feature development - feature-dev agents could make precise edits with replace_symbol_body

Current Workaround

I've added instructions to my CLAUDE.md to use MCP tools directly instead of delegating to subagents for code tasks. This works but defeats the purpose of parallelization.

Implementation Considerations

I understand there are technical challenges:

| Challenge | Possible Solution |
|-----------|-------------------|
| State conflicts (multiple agents accessing LSP) | File-level locking or isolated LSP connections per agent |
| Resource consumption | Lazy connection initialization, connection pooling |
| Latency | Optional flag to enable/disable MCP in subagents |

Proposed Solution

  1. Option A (Simple): Allow MCP tools to be passed to subagents that have "All tools" access (Explore, Plan, general-purpose)
  1. Option B (Configurable): Add a parameter to Task tool like include_mcp_tools: true to opt-in
  1. Option C (Selective): Allow specifying which MCP tools to pass: mcp_tools: ["serena"]

Environment

  • Claude Code CLI
  • MCP Server: Serena (LSP-based code navigation)
  • OS: Windows 11

---

Thank you for considering this feature! MCP servers significantly enhance code understanding, and having them available in subagents would make Claude Code even more powerful for large codebases.

View original on GitHub ↗

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