Feature hasn't been suggested before.
Describe the enhancement you want to request
#37712 exposed runtime MCP controls (add, remove, connect, disconnect) over HTTP but explicitly left the TUI surface out of scope:
"No TUI surface for add/remove yet; those are for programmatic clients."
This issue adds that missing TUI surface and makes runtime changes durable by persisting them to the project config file.
Related:
#37308 — core runtime MCP controls (merged)
#37712 — HTTP routes for MCP controls (merged)
#36303 — MCP modal exploration (open, broader scope)
#9871 — /reload slash command (open, complements this)
Problem
Adding or removing MCP servers currently requires editing opencode.json/opencode.jsonc by hand and restarting OpenCode. This is disruptive mid-conversation, if you're deep into a session and realize you need a new MCP server (e.g., you just spun up a local tool server, or you want to connect to a remote endpoint), you have to:
- Exit or background OpenCode
- Edit the config file manually
- Restart OpenCode, losing your conversation flow and mental context
The TUI MCP dialog (accessed via /mcps slash command) currently only supports toggling existing servers on/off. There is no way to add a new server or remove a stale one without leaving the TUI.
Proposed Solution
Ctrl+a and Ctrl+d in the /mcps dialog will let users add and remove MCP servers. Add prompts for server type, name, and connection details. Persist changes to the project config file using jsonc-parser to preserve comments and formatting.
Acceptance Criteria
These changes are only for TUI
Feature hasn't been suggested before.
Describe the enhancement you want to request
#37712 exposed runtime MCP controls (add, remove, connect, disconnect) over HTTP but explicitly left the TUI surface out of scope:
"No TUI surface for add/remove yet; those are for programmatic clients."
This issue adds that missing TUI surface and makes runtime changes durable by persisting them to the project config file.
Related:
#37308 — core runtime MCP controls (merged)
#37712 — HTTP routes for MCP controls (merged)
#36303 — MCP modal exploration (open, broader scope)
#9871 — /reload slash command (open, complements this)
Problem
Adding or removing MCP servers currently requires editing opencode.json/opencode.jsonc by hand and restarting OpenCode. This is disruptive mid-conversation, if you're deep into a session and realize you need a new MCP server (e.g., you just spun up a local tool server, or you want to connect to a remote endpoint), you have to:
The TUI MCP dialog (accessed via /mcps slash command) currently only supports toggling existing servers on/off. There is no way to add a new server or remove a stale one without leaving the TUI.
Proposed Solution
Ctrl+a and Ctrl+d in the /mcps dialog will let users add and remove MCP servers. Add prompts for server type, name, and connection details. Persist changes to the project config file using jsonc-parser to preserve comments and formatting.
Acceptance Criteria
These changes are only for TUI