Problem
The MCP source detail page hides the Edit button for stdio servers because the plugin sets canEdit: sd.transport === "remote" (packages/plugins/mcp/src/sdk/plugin.ts:1382, :1524), and updateSource early-returns on non-remote (plugin.ts:1553). Users can only change command / args / env / cwd by hand-editing executor.jsonc and restarting.
The React side already has a StdioReadOnly view in packages/plugins/mcp/src/react/EditMcpSource.tsx:246 that explains this, but the canEdit gate prevents users from ever reaching it — the button simply doesn't render.
Proposal
Full edit support for stdio sources, parity with remote.
Backend
- Extend
McpUpdateSourceInput (plugin.ts:131) with optional command, args, env, cwd.
- Branch
updateSource on transport. For stdio:
- Persist updated
McpStdioSourceData.
- Re-run discovery — tools can change when
command / args change — mirroring refreshSource.
- Replace bindings accordingly.
- Set
canEdit: true for stdio at registration (both addSource and refreshSource).
- Extend the API handler and request schema in
packages/plugins/mcp/src/api/handlers.ts.
Config-file write-through already handles stdio via toMcpConfigEntry / inputFormFromStored (plugin.ts:1013, :1046), so no work needed there.
UI
- Replace
StdioReadOnly in EditMcpSource.tsx:246 with an editable form: command (text), args (string list), env (plain string key/value pairs — no secret references in v1), cwd (text).
Scope notes
- env values are plain strings in v1. Secret references like remote headers use are out of scope.
- Tool re-discovery on save is required: changing the command spawns a different process. Save should re-discover and surface failures inline; stale bindings would be a worse outcome than a failed save.
Open questions
- Cloud host: stdio is gated by
dangerouslyAllowStdioMCP. Should the Edit form be hidden on hosts that disallow stdio? Likely yes — same gate as add.
- Read-only fallback when stdio is disabled: still surface
command / args on the source detail header as info, or keep them hidden entirely?
Problem
The MCP source detail page hides the Edit button for stdio servers because the plugin sets
canEdit: sd.transport === "remote"(packages/plugins/mcp/src/sdk/plugin.ts:1382,:1524), andupdateSourceearly-returns on non-remote (plugin.ts:1553). Users can only changecommand/args/env/cwdby hand-editingexecutor.jsoncand restarting.The React side already has a
StdioReadOnlyview inpackages/plugins/mcp/src/react/EditMcpSource.tsx:246that explains this, but thecanEditgate prevents users from ever reaching it — the button simply doesn't render.Proposal
Full edit support for stdio sources, parity with remote.
Backend
McpUpdateSourceInput(plugin.ts:131) with optionalcommand,args,env,cwd.updateSourceon transport. For stdio:McpStdioSourceData.command/argschange — mirroringrefreshSource.canEdit: truefor stdio at registration (bothaddSourceandrefreshSource).packages/plugins/mcp/src/api/handlers.ts.Config-file write-through already handles stdio via
toMcpConfigEntry/inputFormFromStored(plugin.ts:1013,:1046), so no work needed there.UI
StdioReadOnlyinEditMcpSource.tsx:246with an editable form:command(text),args(string list),env(plain string key/value pairs — no secret references in v1),cwd(text).Scope notes
Open questions
dangerouslyAllowStdioMCP. Should the Edit form be hidden on hosts that disallow stdio? Likely yes — same gate as add.command/argson the source detail header as info, or keep them hidden entirely?