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! 😄

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

2 participants