opencode
opencode copied to clipboard
fix(tui): display dynamically registered MCP servers in status
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