Skip to content

Conversation

@paoloricciuti
Copy link
Contributor

Closes #806

This adds the ability to add MCP resources in the opencode prompt. It works just like files, when you do @ it shows you the list of resources and you can select them...the resource is only fetched once the prompt is actually sent.

Here's an example of the behaviour.

Screen.Recording.2025-12-31.at.19.52.09.mov

I had to create a new endpoint on the server (as we couldn't re-use one like with Command in prompts).

@kziemski
Copy link

kziemski commented Jan 1, 2026

@paoloricciuti @rekram1-node , tested this works great so far. this and prompts completes the loop on mcp servers.

@paoloricciuti
Copy link
Contributor Author

Uhm, just realized there might be a problem in case an MCP server exposes a resource as file: or data:...unusual but better be safe than sorry...let me change that

@paoloricciuti
Copy link
Contributor Author

Done! 😄

@rekram1-node
Copy link
Collaborator

im gonna make a generic experimental endpoint so plugins can do this kinda thing too, and then merge those changes into here and integrate it

@paoloricciuti
Copy link
Contributor Author

im gonna make a generic experimental endpoint so plugins can do this kinda thing too, and then merge those changes into here and integrate it

Uh that's interesting and very cool! Let me know if I can do something.

@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2026

lgtm

@rekram1-node rekram1-node merged commit 21dc3c2 into anomalyco:dev Jan 4, 2026
2 checks passed
ruuxi pushed a commit to ruuxi/ngmicode that referenced this pull request Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP Resources and Prompts

3 participants