gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Support MCP resources

Open brianhuster opened this issue 1 year ago • 9 comments

As I can see, right now, gemini-cli only supports MCP tools. I would love to see it support MCP resources and prompt as well

brianhuster avatar Jun 25 '25 15:06 brianhuster

I'd like to work on this issue! 🚀

Proposed Approach

After reviewing other MCP implementations (Roo Code, Claude Desktop), I noticed they focus solely on MCP resources without prompts. I propose following the same approach - implementing only MCP resources support for now.

Technical Details

  • Add ResourceRegistry to manage resources from multiple MCP servers
  • Implement ReadResourceTool and ListResourcesTool
  • Extend MCP client to discover resources via listResources() and listResourceTemplates()
  • Resources will be available through Gemini's existing tool system

This keeps the implementation focused and aligns with established patterns in the ecosystem.

Expected timeline: 1 day

Let me know if this approach looks good or if you have any suggestions!

heartyguy avatar Jun 26 '25 00:06 heartyguy

Hey @heartyguy! Have you had a chance to do this? If not, someone on our team was going to grab it!

chrstnb avatar Jul 09 '25 15:07 chrstnb

Hey @heartyguy! Have you had a chance to do this? If not, someone on our team was going to grab it!

Looks like there is a PR out already :) https://github.com/google-gemini/gemini-cli/pull/1789

ashwinpvg avatar Jul 09 '25 18:07 ashwinpvg

This is great looking forward to this PR and new release. We need /resources for our MCP servers!

ryanbaumann avatar Jul 11 '25 16:07 ryanbaumann

I setup my own custom MCP server and was let down when I realized none of the prompts or resources are showing up.

Question: In most other IDE's (cluade code, vscode) you can simply type / and it auto shows all available MCP Prompts for you to execute by command (or load in that prompt). Prompts then call the tools to build workflows. Will this MR allow for this / style discover of prompts? Or will that be a new issue we need to add in?

I see the MR is close, looks like testing is needed now.

requiem240sx avatar Jul 28 '25 21:07 requiem240sx

Gemini CLI now supports MCP prompts! They can be discovered and displayed using /mcp and the prompts can be directly called using /<prompt-name> --args=""

more info here: https://github.com/google-gemini/gemini-cli/pull/4828

haroldmciver-go avatar Jul 30 '25 19:07 haroldmciver-go

Looks like the resource PR got abandoned and closed - would be interested in seeing it get revived at some point in time...

toonetown avatar Sep 03 '25 21:09 toonetown

Indeed. Prompts are great! Any plan to support MCP Resources pending?

Closed PR: https://github.com/google-gemini/gemini-cli/pull/1789

nsheff avatar Sep 17 '25 18:09 nsheff

updated title to reflect resources as prompt are supported.

jackwotherspoon avatar Nov 05 '25 18:11 jackwotherspoon