Skip to content

[BUG] MCP resources not available for subagents #2169

Closed as not planned
Closed as not planned

Description

@qusma

Environment

  • Platform (select one):
    • Anthropic API (Claude Code)
  • Claude CLI version: 1.0.22 (Claude Code)
  • Operating System: Ubuntu 24.04.2 LTS (WSL)
  • Terminal: xterm

Bug Description

Subagents spawned by Claude Code do not have access to the same MCP resources, although MCP tools seem to work fine.

My .claude.json has the following:

  "mcpServers": {
    "tmdb": {
      "command": "/Code/mcp-server-tmdb/dist/index.js",
      "env": {
        "TMDB_API_KEY": "..."
      }
    }
  },

When I ask Claude to spawn a subagent to look up a resource, this happens:

Task(Task: Get Armageddon movie info
  Prompt: I want to get some info on the movie Armageddon. Search TMDB with your tool to find the film id, then
   use the tmdb resource tmdb:///movie/ to get the info.)
 ⎿  tmdb:search_movies (MCP)(query: "Armageddon")
  ⎿  Found 20 movies:
  ⎿  readMcpResource(Read resource "tmdb:///movie/95" from server "tmdb")
  ⎿  Error: Server "tmdb" not found. Available servers:
  ⎿  listMcpResources(List all MCP resources)
  ⎿  ⎿  (No resources found)

But when Claude Code accesses it directly, it works:

readMcpResource(Read resource "tmdb:///movie/95" from server "tmdb")
  ⎿ {
      "contents": [
        {
          "uri": "tmdb:///movie/95",
          "mimeType": "application/json",
          "text": "{\n  \"title\": \"Armageddon\",\n  \"releaseDate\": \"1998-07-01\",\n  \"rating\": 6.838,\n
    \"overview\": [...] }\n  ]\n}"
        }
      ]
    }

Steps to Reproduce

  • Configure MCP server with resources
  • Ask Claude Code to spawn subagent that uses a resource. It will fail.

Expected Behavior

MCP resources should be available to subagents in the same way as they are to the top-level Claude Code.

Actual Behavior

Subagent could not access resources.

Activity

  1. added
    bug
    on Jun 16, 2025
  2. added
    platform:linux
    on Jun 16, 2025
  3. ChristophRauch commented on Jul 25, 2025

    @ChristophRauch

    I just stumbled upon the same problem.

    This is preventing me from implementing a main-agent token preserving work-flow.

    Explanation: I just pass the issue number to the Task() which then is required to pull the full issue definition itself (can be a bit large) and start working on it, but in a Task() resources are apparently blocked, so it can't continue. Flow stops.

    It would be nice if we would have a "subagent_type" which could actually access resources, if you don't want to change the behaviour of the standard agent.

    Also I didn't find any rationale why this limitation is in place, as resources are supposed to be concurrently executable and coordination free, I don't see why this should be the case. Could you shed some light on that matter?

  4. ChristophRauch commented on Jul 25, 2025

    @ChristophRauch

    As a workaround I added a _resource_lookup tool, which looks up my own MCP server's resources by exposing it via a tool call. This works, but only for resources of my own making, not from other MCP servers.

  5. zach-lm commented on Jul 29, 2025

    @zach-lm

    Also encountering this issue

  6. github-actions commented on Dec 3, 2025

    @github-actions

    This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

  7. added
    autoclose
    on Dec 3, 2025
  8. github-actions commented on Jan 5, 2026

    @github-actions

    This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

  9. github-actions commented on Jan 12, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  10. locked as resolved and limited conversation to collaborators on Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:mcparea:toolsautoclosebugplatform:linux

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions