You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that only MCP resources with mimeType text/plain are supported.
E.g. take a basic MCP server with a singe resource:
import{McpServer}from"@modelcontextprotocol/sdk/server/mcp.js"constserver=newMcpServer(...)constname="my-file.md"consturi="file:///docs/my-file.md"constmimeType="text/markdown"server.registerResource(name,uri,{ mimeType,description: ""},// <-- this results in opencode error if mimeType !== "text/plain"async()=>{return{contents: [{ uri,text: "# Some Markdown Content", mimeType }],// <-- this mimeType seems to be ignored by opencode}})
After connecting to the server in opencode and selecting the resource with @file:///docs/my-file.md we get:
AI_DownloadError: Failed to download file:///docs/my-file.md: Error: ENOENT: no such file or directory, open '/docs/my-file.md'
And the same error with mimeType inode/directory. But it works if the server has mimeType text/plain.
Plugins
None
OpenCode version
1.1.23
Steps to reproduce
Run a minimal MCP server which exposes a resource with mimeType text/markdown, as above
Activity
github-actions commentedon Mar 26, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.