adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

MCP Resources in addition to Tools

Open jimmycfa opened this issue 1 year ago • 10 comments

** Please make sure you read the contribution guide and file the issues in the right place. ** Contribution guide.

Is your feature request related to a problem? Please describe. In using the MCPToolset and adding MCP Servers (SSE,STDIO, or HTTPStreamable) for any tool with MCP Resources, there is no way to access those resources that I am aware of. An example is an MCP server to access data from a database. If the data sources are in an MCP Resource and the access method is via a tool, there is no easy way to provide the resource information.

Describe the solution you'd like When creating an Agent or LLMAgent an input that includes passing in those resources as well as an easy to way access those resources. Looking at the mcp package there is a list_tools() which is being used but there is also a list_resources(). When using the MCPToolset you could potentially just change it to MCPServer that returns the resources, tools, prompts, etc. Then pass in that object to the Agent or LLMAgent constructor.

Describe alternatives you've considered Getting the resources directly from the mcp package and passing those in as part of the LLMAgent instructions, e.g. f"You are an agent and have access to the following resources in addition to the tools you are provided {resources}. This works but is not as modular or intuative.

Additional context NA

jimmycfa avatar Jul 03 '25 17:07 jimmycfa

yes i was searching for it too. currently, can't get resouces and resouces template.

auroradanier avatar Jul 14 '25 09:07 auroradanier

I'm also hitting this limitation.

My use case: I'm building an ADK agent that needs to access contextual data (documentation, schemas, configuration files) exposed as MCP resources from our custom MCP server. The agent should be able to read these resources to provide context-aware responses, but currently can only access the server's tools via MCPToolset.

Current workaround:

  1. Creating wrapper tools on the MCP server that return resource content as tool responses
  2. OR manually implementing a separate MCP client using the mcp library alongside MCPToolset to handle resources

Why it's insufficient:

  • Violates MCP semantics: Resources and tools have different purposes - resources provide context, tools perform actions
  • Duplicate implementation: Having both MCPToolset AND a custom MCP client creates unnecessary complexity
  • Loses MCP resource features: No access to resource templates, real-time updates, or resource-specific metadata
  • Architectural inconsistency: ADK agents can't be pure MCP clients when they need both tools and resources from the same server
  • Maintenance burden: Custom resource client needs separate connection management, error handling, and lifecycle management

This limitation prevents ADK from being a complete MCP client implementation and forces awkward architectural compromises. Having unified access to both tools and resources through MCPToolset (or a successor like the proposed MCPServer) would enable much cleaner, more maintainable agent implementations.

juliafu avatar Jul 15 '25 14:07 juliafu

Any updates on this?

glyphiglyphi avatar Sep 24 '25 06:09 glyphiglyphi

Any updates on this please? This is MUST need feature for ADK as most MCPs are created with 'resources' to provide the additional context that the LLM can fetch while calling tools.

murtaza-motorwala avatar Oct 24 '25 12:10 murtaza-motorwala

Same issue being reported in - https://github.com/google/adk-python/issues/3030 and https://github.com/google/adk-python/issues/684

murtaza-motorwala avatar Oct 24 '25 12:10 murtaza-motorwala

@jimmycfa Thanks for the detailed request and everyone who's participating in. You're absolutely right - ADK currently only exposes MCP tools via McpToolset, not resources. The good news is the MCP SDK already has list_resources() and read_resource() methods, so the infrastructure is there. Adding a McpResourceProvider class and resources parameter to LlmAgent (similar to how tools work) - this would let you pass both tools and resources from the same MCP server. Really appreciate the clear use cases you've all shared.

surajksharma07 avatar Nov 03 '25 10:11 surajksharma07

@hangfei Please have a look into it.

surajksharma07 avatar Nov 03 '25 10:11 surajksharma07

Thanks all for your patience here! As mentioned in our last community call, we are working on some updates to come. Stay tuned!

jwiejulie avatar Nov 03 '25 13:11 jwiejulie

Please use the main thread to track. Closing this for now.

hangfei avatar Nov 08 '25 04:11 hangfei

@jimmycfa @auroradanier @murtaza-motorwala Thanks for reporting! We are working on a MCP prompts implementation in ADK. A few questions about your use-cases:

  1. How large are the resources you are storing, and how many are there?
  2. What type of resource is it (json, txt, etc)?
  3. Do you hope to have it automatically loaded on startup?
  4. Are the resources static, or can they change over time?
  5. Will multiple agents share the same resource?

wukath avatar Jan 28 '26 22:01 wukath