Skip to content

[FEATURE]: expose a keybind field for the "Toggle MCPs" command (mcp.list) #24164

@m-spellchecker

Description

@m-spellchecker

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.
    edit: kinda, but issue was closed without result, see comment below

Describe the enhancement you want to request

Problem

The Toggle MCPs command is reachable from the command palette and via the /mcps slash command, but it is the only entry in that section of packages/opencode/src/cli/cmd/tui/app.tsx without a keybind property. Because tui.json only recognizes identifiers that opencode's source declares, there is currently no way for end users to bind Toggle MCPs to a shortcut.

Tested with opencode 1.14.22.

Evidence

From packages/opencode/src/cli/cmd/tui/app.tsx (dev branch):

{
  title: "Toggle MCPs",
  value: "mcp.list",
  category: "Agent",
  slash: { name: "mcps" },
  onSelect: () => { dialog.replace(() => <DialogMcp />) },
},

Its siblings all expose a keybind:

{ title: "Switch agent",         value: "agent.list",   keybind: "agent_list",   ... },
{ title: "Switch model",         value: "model.list",   keybind: "model_list",   ... },
{ title: "Switch session",       value: "session.list", keybind: "session_list", ... },
{ title: "Switch model variant", value: "variant.list", keybind: "variant_list", ... },

Proposed change

Add a keybind property to the mcp.list command so users can bind it via tui.json. A name like mcp_list would mirror the existing *_list pattern used by siblings. Default value "none" would avoid shadowing any current shortcut.

Also worth updating the public keybind reference (packages/web/src/content/docs/keybinds.mdx) so the new key appears in the documented sample tui.json at https://opencode.ai/docs/keybinds/.

Current workarounds

  • /mcps slash command
  • ctrl+p command palette -> Toggle MCPs

Prior art

This was previously reported as #12943 and an implementation was submitted as #12944 (added mcp_list to the TUI keybind schema with default <leader>;, wired the command, and updated docs). Both were auto-closed by the stale-bot without maintainer review, so this issue is a revival rather than a new report.

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions