Summary
Add an `allagents mcp` subcommand surface for managing MCP servers independently of full plugin installs, mirroring the `claude mcp` command surface.
Motivation
Currently, MCP servers are synced as part of plugin install/update. Users may want to:
- Install only MCP servers from a plugin without syncing skills/agents/hooks
- List which MCP servers AllAgents has synced across clients
- Remove specific MCP servers
- Update MCP configs without running a full workspace update
AllAgents already syncs MCP servers during `plugin install` — this issue adds a dedicated subcommand for MCP-only workflows.
Proposed Commands
| Command |
Description |
| `allagents mcp add [args...]` |
Add an MCP server across configured clients |
| `allagents mcp list` |
List MCP servers managed by AllAgents (with per-client status) |
| `allagents mcp remove ` |
Remove a synced MCP server from all clients |
| `allagents mcp update` |
Sync MCP servers from plugins without syncing other artifacts |
| `allagents mcp get ` |
Show details of a specific MCP server (config, which clients have it) |
Consistency Notes
- `mcp update` is consistent with `workspace update` (which supersedes the old sync command)
- Command surface mirrors `claude mcp` (`add`, `list`, `remove`, `get`) for familiarity
- Respects existing ownership tracking — only manages servers AllAgents added, never touches user-managed servers
Implementation Notes
Key source files
- MCP sync per client:
- `src/core/claude-mcp.ts` — syncs to `.mcp.json`, tracks owned servers via `trackedServers`
- `src/core/vscode-mcp.ts` — syncs to `.vscode/settings.json` MCP section
- `src/core/codex-mcp.ts` — project-scoped MCP config
- Sync state: `src/core/sync-state.ts` — `getPreviouslySyncedMcpServers()` returns what AllAgents owns
- CLI commands: `src/cli/commands/` — add new `mcp.ts` command file
- Sync output formatting: `src/cli/format-sync.ts` — reuse for `mcp list` display
Ownership model
AllAgents tracks which MCP servers it installed via `trackedServers` in sync state. This is critical:
- `mcp add` must add the server to `trackedServers` so AllAgents owns it
- `mcp remove` must only remove servers in `trackedServers`, never user-managed ones
- `mcp list` should show ownership status (AllAgents-managed vs user-managed)
- See CLAUDE.md "MCP Server Sync" section for the ownership rule
`mcp add` behavior
Should mirror `claude mcp add` flags where applicable:
- `--transport http|stdio` (default: infer from URL vs command)
- `-e KEY=VALUE` for environment variables
- `--client claude,copilot` to target specific clients (default: all configured)
- Writes to each client's MCP config file using existing per-client sync logic
`mcp update` behavior
Runs only the MCP portion of the sync pipeline:
- Collect `.mcp.json` configs from all plugins in workspace
- Sync to each client's MCP config (using existing `claude-mcp.ts`, `vscode-mcp.ts`, etc.)
- Purge servers no longer provided by plugins
- Skip skill/agent/hook/command sync entirely
Acceptance Criteria
Context
From analysis of enterprise adoption — some teams primarily need MCP server distribution (e.g., connecting AI assistants to internal APIs) and don't need full plugin artifact sync. An MCP-focused entry point lowers the barrier.
Summary
Add an `allagents mcp` subcommand surface for managing MCP servers independently of full plugin installs, mirroring the `claude mcp` command surface.
Motivation
Currently, MCP servers are synced as part of plugin install/update. Users may want to:
AllAgents already syncs MCP servers during `plugin install` — this issue adds a dedicated subcommand for MCP-only workflows.
Proposed Commands
Consistency Notes
Implementation Notes
Key source files
Ownership model
AllAgents tracks which MCP servers it installed via `trackedServers` in sync state. This is critical:
`mcp add` behavior
Should mirror `claude mcp add` flags where applicable:
`mcp update` behavior
Runs only the MCP portion of the sync pipeline:
Acceptance Criteria
Context
From analysis of enterprise adoption — some teams primarily need MCP server distribution (e.g., connecting AI assistants to internal APIs) and don't need full plugin artifact sync. An MCP-focused entry point lowers the barrier.