-
Notifications
You must be signed in to change notification settings - Fork 20.7k
[FEATURE]: MCP resource support for LLM #19102
Copy link
Copy link
Closed
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)discussionUsed for feature requests, proposals, ideas, etc. Open discussionUsed for feature requests, proposals, ideas, etc. Open discussion
Metadata
Metadata
Assignees
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)discussionUsed for feature requests, proposals, ideas, etc. Open discussionUsed for feature requests, proposals, ideas, etc. Open discussion
Type
Fields
Give feedbackNo fields configured for issues without a type.
Feature hasn't been suggested before.
Describe the enhancement you want to request
OpenCode can connect to MCP servers and expose their tools to the LLM. #806 added MCP prompt support, but MCP resources are still not accessible to the LLM. Servers can expose resources (via URI) but the LLM has no way to discover or read them.
It would be useful if the LLM could list available resources/resource templates and read them by URI, similar to how MCP tools are already accessible.
One approach that I have successfully tested with minimal changes:
#7510 seems related, however it asks for resource template support and I guess it is meant as a prompt feature rather than a mechanism the LLM can use.
I am happy to provide a PR if this feature request is accepted.