anomalyco / anomalyco/opencode
Desktop caches MCP tools at startup, never refreshes on reconnect
@Brendonovich is already working on this.
Since Aug 1, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
OpenCode Desktop (1.18.10) caches the MCP tools list at application startup and never refreshes it when the MCP server is restarted or its tool set changes. CLI opencode run (1.17.16) works correctly — it fetches the full tools list on every new session.
Steps to reproduce
- Configure a remote MCP server in
opencode.json:
{
"mcp": {
"omniroute": {
"type": "remote",
"url": "http://localhost:20128/api/mcp/stream",
"headers": { "Authorization": "Bearer <key>" },
"oauth": false
}
}
}
- The MCP server exposes 108 tools (verified via direct
tools/listJSON-RPC call). - Open Desktop — only ~17 MCP tools are visible in the request body.
- Restart the MCP server (or add new tools) — Desktop still shows the same cached subset.
- Run
opencode runfrom CLI — all 108 tools appear correctly.
Expected behavior
Desktop should fetch the full tools/list from the MCP server on each new session (or at least on reconnect), matching CLI behavior.
Actual behavior
Desktop appears to cache the tools list at first successful MCP connection and never invalidates it. The cached subset is missing tools that the server exposes (e.g., omniroute_memory_add, omniroute_memory_search, omniroute_memory_clear).
Evidence
Call logs from the OmniRoute gateway show:
- Desktop requests (1.18.10): consistently 25 total tools, 17 MCP tools — no memory tools
- CLI sessions (1.17.16): 108+ tools including all MCP tools with memory
Environment
- macOS (darwin)
- Desktop: OpenCode 1.18.10 (packaged)
- CLI: 1.17.16
- MCP transport: Streamable HTTP (
POST /api/mcp/stream) - MCP server: OmniRoute (custom,108 tools)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.