Repository navigation
Description
Motivation
Agent Code cannot add, configure, or switch off third-party MCP servers. To use one (for example Beeper Desktop's MCP server), a user has to hand-edit ~/.claude.json / ~/.codex/config.toml or run claude mcp add / codex mcp add outside the app. The server then attaches to every agent of that provider, cannot be turned off for one agent, and never appears in Agent Code.
This is the configuration layer that #244 (Agent Code-hosted extension MCP servers) also needs. It complements provider enablement (#1126): that feature chooses which providers exist, and this one chooses which user MCP servers each provider gets.
Intended behavior
- Any MCP server: stdio, Streamable HTTP, or SSE (SSE is Claude-only). Configs are entered by pasting the standard
mcpServerssnippet that server READMEs publish; the VS Codeservers/inputsform is also accepted. - Secrets: stored with Electron safeStorage and referenced as
${input:id}. They never appear in argv, the renderer, or the stored JSON. - Three toggle levels:
- a master on/off switch per server;
- a default attachment per provider (Claude, Codex);
- a per-agent override, which applies on reload.
- Delivery at launch only: servers are added through the same path as Agent Code's built-in MCP. For Claude that is the private
--mcp-configfile; for Codex it is-c mcp_servers.*with secrets passed through env. Provider config files are never written. - A bad or unready server never fails an agent launch. It is dropped for that launch, and the agent shows a notice.
- UI:
- a new Settings → MCP page, which also takes over the existing built-in MCP rows;
- commands
MCP Servers…,Add MCP Server…andAgent MCP Servers….
- OAuth is handled by each CLI:
codex mcp loginfor Codex,/mcpfor Claude.
Design: docs/superpowers/specs/2026-09-22-user-mcp-servers-design.md
Plan: docs/superpowers/plans/2026-09-22-user-mcp-servers.md
(branch feat/user-mcp-servers)
Acceptance criteria
- Pasting Beeper's official token snippet creates the http server
beeperwith a secret input. No token is written to disk in plaintext. - A new Claude agent's private MCP config contains
beeperwith a generated-env header, and a new Codex agent's argv containsmcp_servers.beeper.urlplusenv_http_headers. The token appears in neither argv. - A per-agent off override plus a reload removes the server from that agent. The master switch off wins over any per-agent on.
- A stdio server (
npx -y @beeper/mcp-remote) works on both providers. An SSE server offers Claude only, with the reason shown. - Reserved names (
agent_code,agent-code-control) are rejected. - A name that collides with the user's native Codex config is skipped for Codex, with a visible reason.
- A missing secret, or an invalid server, never blocks an agent from launching.
- Settings → MCP shows provider columns only for providers enabled in Settings → Providers.
Out of scope (follow-ups)
- A read-only list of servers loaded natively by the CLIs.
- Add from MCP Registry.
- OpenCode and Grok.
- Workflow subagents.
- Host user-authored MCP servers as Agent Code extensions #244 hosted servers.
Activity
feat(mcp): let agents manage the user's MCP servers
fix(mcp): address first review round findings
fix(mcp): harden secret delivery and editing after review round 1
fix(mcp): require user approval for agent MCP changes after review ro…
fix(mcp): keep capability reloads synchronous when no pre-reload hook…
Merge origin/main into feat/lane-browser-pocket
Merge origin/main into feat/pi-terminal-harness; point at merged Pi p…