opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(tui): display dynamically registered MCP servers in status

Open altendky opened this issue 1 week ago • 2 comments

fixes https://github.com/anomalyco/opencode/issues/7482

MCP servers registered via POST /mcp were working (tools available) but not appearing in the TUI /status dialog. This was because MCP.status() only returned config-based servers, and the TUI didn't refresh after dynamic registration.

Changes:

  • MCP.status() now includes dynamically registered MCPs from state
  • Added TuiEvent.McpRefresh event to signal MCP status changes
  • MCP.add() publishes McpRefresh when a new server is added
  • TUI sync context listens for McpRefresh and refetches status

altendky avatar Jan 06 '26 20:01 altendky