Skip to content

[FEATURE]:model-invoked MCP resources #8928

Closed

Description

@dan-kwiat

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

It's great to see MCP resources added (#6542). This means users can now pull resources from connected servers into context by tagging them with @ (human-invoked).

However, to get the most out of MCP resources, the model needs the ability to read resources itself (model-invoked). It's like the difference between a user attaching a couple of handpicked files to their prompt vs them connecting the model to a Skill directory and giving the model free rein to list and read files in that directory. Other agents including claude code already have model-invoked resources.

The implementation is simple, the LLM just needs two global tools: readMcpResource and listMcpResources. These trigger the corresponding methods already defined in https://github.com/anomalyco/opencode/blob/dev/packages/opencode/src/mcp/index.ts

In my experience this implementation alone leads to very good performance without additional system instruction. Ideally it should be user configurable whether or not the results of listMcpResources goes into the system instruction upfront or not.

The next stage would be to think about list changed notifications, subscriptions and resource templates, but the first steps above would go a long way to improving the developer experience without much investment.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 16, 2026
  2. github-actions commented on Jan 16, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of or related to existing issues. Please check:

    This feature request specifically seeks model-invoked capabilities for MCP resources, which appears to be distinct from the human-invoked resources added in #6542. The proposed implementation would give the model automatic access to readMcpResource and listMcpResources tools to independently discover and retrieve resources, similar to how Claude Code and other agents handle model-invoked resources.

    Feel free to ignore if you've already reviewed these related issues.

  3. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions