Skip to content

[FEATURE]: MCP manager UX - per-server output links (web panel URLs), placeholder prompts with secure secret storage, a full config editor, and richer ask/mention inputs #58243

Closed as not planned

Description

@arin8513

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

OpenCode v2 (2.1.2) already has a solid MCP layer (opencode mcp auth/list/logout, OAuth auto-flow, {env:VAR} interpolation, per-server toggles), but six daily-use gaps remain. One theme: MCP servers are first-class config citizens in every way except the surfaces a human actually touches - the manager area, the permission UI, and the inputs an agent-driven session asks the user through.

1. Per-server output panel with clickable web links

Many MCP servers ship their own local web UI (a config / DB / browser panel on http://127.0.0.1:<port>). Today the only way a user sees that URL is inside the server's raw stderr stream, which OpenCode logs undifferentiated.

Real example from our setup - codebase-memory-mcp runs through a PowerShell wrapper whose ONLY extra job is printing the panel URL:

"codebase-memory-mcp": {
  "type": "stdio",
  "command": "powershell.exe",
  "args": [
    "-NoProfile", "-Command",
    "[Console]::Error.WriteLine(' Codebase Memory UI:\\n http://127.0.0.1:9749'); & codebase-memory-mcp --ui=true --port=9749"
  ]
}

Request: when OpenCode sees http://localhost / http://127.0.0.1 URLs in an MCP server's stdout/stderr (or when a user-declared links field sitting next to that server's config is present), render them as a per-server, clickable output section in the MCP manager area - filtered per server, not mixed into the global log.

2. Auto-detect config placeholder variables and prompt for them (with secure storage)

Config values today can only interpolate {env:VAR} from the process environment. That fails for anything typed interactively, and it has sharp edges we hit for real:

Request: at config parse/adopt time, scan mcp entries for placeholder-style variables; when one is not resolvable from the environment, prompt the user ONCE (named prompt per variable: e.g. "PENPOT_TOKEN - personal access token for penpot"). Store the answers OUTSIDE the plaintext config:

3. A full MCP config editor in the UI

opencode mcp list shows connection state and the manager can toggle servers, and the CLI has a one-shot opencode mcp add; but there is no surface to view, edit, validate or manage entries - that is still raw-JSON editing in one of several config locations. Request: an MCP config editor surface (TUI panel and/or web/desktop) that can add/remove/edit entries with the right shape per type (local: command/args/env; remote: url/headers/oauth), validates against the official schema (the non-deprecated mcp.servers.<name> shape; the deprecated flat mcp.<name> still accepted), and writes back through the placeholder-prompts + keystore flows from (2). While in there: the v2 web/desktop MCP permission prompt shows only * for the asked tool (#51519, still open) - surfacing the actual server/tool name would make least-privilege grants possible to express in the UI at all.

Our last stretch of real use (2026-10-20 -> 2026-10-23, Windows, several cooperating agents + one human) made the need concrete: the global config is JSONC (JSON with comments) but there is no schema-aware surface, so validating a hand edit meant stripping comments in a throwaway script and re-parsing; the deprecated flat mcp.<name> vs current mcp.servers.<name> split was discoverable only by reading the ~2.6k-line official schema (opencode.ai/config.json); a mis-edited Authorization header failed at connect time with HTTP 400 Authorization header is badly formatted; an OAuth toggle change drove the client into the auto-DCR flow, which dead-ends with Incompatible auth server: does not support dynamic client registration when the authorization server advertises no registration endpoint; and keyed remote vendors end up holding literal tokens in plaintext because there is nowhere else to put them (item 2). An editor surface that validates the entry shape + placeholders + auth mode BEFORE writing would have short-circuited every one of those.

4. The clarify-question answer input needs input parity with the main input

When an agent asks the user a question (the ask/clarify tool), the answer box is a weaker input than the main chat input:

  • Newlines: the main input inserts a newline with Ctrl+Enter; the answer box does not, so multi-line answers ("paste the whole log line") get mangled.
  • File mentions: the main input supports @-tagging files; the answer box does not, so answering with a file becomes copy-paste work.

Request: give the answer box the same input component - Ctrl+Enter newline and @ file tagging.

5. #-mention in the main input to tag a tool / an MCP server / one MCP tool

The inverse of the @ mention: typing # in the main input should offer the agent-visible tool space:

  • a specific tool (#read),
  • a whole MCP server (#context7 = all of its tools),
  • one tool of one server (#context7.resolve-library-id).

The mention should reach the agent as a scoped directive (e.g. an extra field on the user message: "the user pinned these tools for this request"), not just a UI chip the runtime consumed silently. Use cases: force a specific tool for a step ("now use #chrome-devtools.take_screenshot"), or pin a task to a server's toolbox in sessions where 200+ tools are in scope and name-similarity makes the agent pick wrong or waffle.

6. CLI/config-manager consistency and failure diagnosability

All measured on v2.1.2: a correctly shaped config-lane entry (mcp.servers.<name> in the global config), and one failing stdio server:

  • opencode mcp list does not list config-file (global) servers at all, only workspace-registry ones - while the running session discovers and serves that same server fine, so server discovery is session-level but missing at CLI level; the CLI even advertises mcp add --global for writing global entries it cannot then display or authenticate.
  • opencode mcp auth <name> for that server answers MCP server not found (and bare mcp auth list answers MCP server not found: list), even though auth/logout/list are the natural lifecycle commands over a central OAuth token store.
  • mcp debug <name>, documented in official install guides (github/github-mcp-server's OpenCode guide says "run opencode mcp debug github to see the exact connectivity and auth diagnostics" - github.com/github/github-mcp-server/blob/main/docs/installation-guides/install-opencode.md), does not exist in the binary (Unknown subcommand, re-verified 2026-10-23; mcp --help lists only list/add/auth/logout) - when a server misbehaves, no diagnostic route is left.
  • When a stdio server fails, mcp list truncates that server's stderr right after the first exception block, cutting off the chained original exception (Python prints it last) - the user sees only the mislabeled wrapper error, never the real cause.
  • A server that times out during mcp list keeps running: timed-out spawns stayed alive under the live service after the run, so the next probe hit the same hang again.

Request: make the mcp CLI subcommands config-file-aware (or explicitly scope-labelled), ship the documented debug subcommand, and keep a failing server's trailing stderr visible (e.g. the last N lines, chained cause intact) and its timed-out spawn reaped.

Why is this needed?

Three cooperating agents and one human share MCP registries on this machine (VS Code + OpenCode harnesses over a shared .mcp.json; keyed servers bind environment slots). In one week every gap above was hit for real:

  • a placeholder silently resolved to an empty string and produced a 401 that looked like a bad token;
  • one server had to be hand-moved from a workspace registry into the global config by JSON editing because no UI surface manages MCP entries;
  • per-server web-panel URLs had to be hand-wrapped into stderr just to become visible;
  • the configuration pain: a JSONC config validated only by stripping comments through throwaway parsers, a connect-time HTTP 400 Authorization header is badly formatted from one hand edit, the OAuth auto-flow dead-ending at Incompatible auth server: does not support dynamic client registration, and plaintext tokens parked in the config for lack of a keystore surface;
  • multi-line answers to agent questions broke on the answer box;
  • a correctly configured global-config server was invisible to the CLI (opencode mcp list omitted it, opencode mcp auth answered MCP server not found), while the running session discovered it fine.

The building blocks already exist (the OAuth token store with its protected mcp-auth.json, {env:} interpolation, the manager toggles) - this unifies them into the UX they already imply.

Related issues

Additional context


Activity

  1. opencode-agent commented on Oct 22, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed write-up! In short, you're asking for a set of improvements to how MCP servers are managed: per-server output with clickable local panel URLs, prompts for unresolved config placeholders with secrets stored outside the plaintext config, a schema-aware MCP config editor, input parity for the question answer box, #-mentions for tools and MCP servers, and more consistent and easier-to-debug mcp CLI subcommands. Maintainers will consider it.

    Several parts of this are already tracked on their own, which may help you follow progress on them:

    Most of this needs new UI surfaces and CLI subcommands, so it can't be built as a plugin today. Since the six items are fairly independent, separate issues for the ones not already tracked above (e.g. the per-server output/links panel, placeholder prompts with a keystore, the config editor, #-mentions) would make each one easier to discuss and pick up.

  2. arin8513 commented on Oct 22, 2026

    @arin8513
    Author

    Thanks for the quick mapping - matching the items to the existing trackers is exactly what we wanted to avoid duplicating.

    One clarification on #50710: we can't confirm the same root from our side. In our repro (v2.1.2, Windows 11) the global-config server was visible to the RUNNING session while opencode mcp list omitted it and opencode mcp auth answered "MCP server not found"; #50710 reports the opposite halves (opencode debug config correct, the running service registering zero) from v2.0.14. It reads like the same config-plane vs service-plane divergence - one bug with two repros, or two adjacent ones. We can add our repro details to #50710 for triage if that helps.

    And agreed on the split: we will file separate issues for the untracked asks (the per-server output/links panel, unresolved-placeholder prompts with a key store, the schema-aware MCP config editor, #-mentions for tools and MCP servers), each linked back here for the season context.

  3. arin8513 commented on Oct 24, 2026

    @arin8513
    Author

    Split of this request, as the triage bot suggested (the six items are independent):

    Item 4 is already tracked (#56895 with an open fix in #56911), item 5's design question is posted on #34847, and item 6's diagnosability observations are posted on #50710 - so no further issues are opened for those here.

  4. Tarquinen commented on Oct 27, 2026

    @Tarquinen
    Contributor

    Thanks for splitting this up! Each part now has its own home: #58652, #58653 and #58654 for the new requests, #56895 for item 4, and your notes on #34847 and #50710 for the rest. Closing this umbrella issue so the discussion stays in those.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions