GeezerVison is showing github.com — Hot reload MCP server configuration · Issue #37421 · anomalyco/opencode
Hot reload MCP server configuration #37421
Labels
2.0coreAnything pertaining to core functionality of the application (opencode server stuff)enhancementNew feature or requestmcp Description
Parent
Related to #10899 and #6719.
What to build
Hot reload V2 MCP server configuration for a loaded Location. Editing mcp.servers, server commands or URLs, environment, headers, disabled state, OAuth settings, or timeouts should reconcile the running MCP runtime without restarting OpenCode.
Current V2 Config detects and publishes the file change, but MCP captures Config once while constructing its Location-scoped service and has no config.updated subscription or reload operation. Credential refresh and dynamic MCP tool/resource notifications are already live; this issue is specifically about server configuration.
Acceptance criteria
- Adding a configured MCP server starts it without restarting the service or TUI.
- Removing or disabling a server closes its connection and removes its tools, prompts, resources, and instructions.
- Changing connection settings replaces the old connection without leaking processes or subscriptions.
- An in-flight session Step remains stable while the following Step sees the reconciled MCP catalog.
- Integration tests cover add, change, disable, and remove through a real config update.
Blocked by
None - can start immediately.
Activity
added
coreAnything pertaining to core functionality of the application (opencode server stuff) on Jul 17, 2026opencode-agent commented on Aug 8, 2026
Addressed by #41204. Each Location-scoped MCP service now subscribes to config.updated, compares the previous and next effective server maps, and reconciles only entries that were added, removed, disabled, or materially changed. Replacement closes the old configured runtime without disturbing unrelated or API-registered servers; unchanged config does not restart connections, and startup reconciliation is installed after the live subscription so updates cannot be missed. Focused MCP tests cover the reconciliation behavior. Closing as resolved on the v2 branch.
Metadata
Metadata
2.0coreAnything pertaining to core functionality of the application (opencode server stuff)enhancementNew feature or requestmcp Development
No branches or pull requestsIssue actions