ReferenceCLI commands
BetaYou are reading docs for the beta channel (
2.4.1-beta.1) — updated automatically on every beta release.Switch to stable →CLI commands
ak mcp link
Mirror MCP servers into another adapter config
Plans or applies a conservative MCP mirror from discovered Claude-style MCP config into an adapter config.
Who it's for: Power devs, AI agents, and CI jobs validating MCP config parity.
When to use it: Use after ak mcp list to preview or apply cross-adapter MCP config.
What changes on disk: Dry-run by default. With --apply, writes the target adapter config after creating a backup.
Usage
ak mcp link --to <adapter> [flags]Examples
ak mcp link --to codex --json
ak mcp link --to codex --apply --json
ak mcp link --to codex --source .mcp.json --target ~/.codex/config.toml --jsonFlags
| Flag | Description |
|---|---|
--apply | Apply the planned link; default is dry-run |
--dry-run | Preview only; default behavior unless --apply is set (default true) |
-h, --help | help for link |
--json | Emit machine-readable JSON (implies --no-interactive) |
--no-interactive | Disable interactive prompts (CI-safe) |
-q, --quiet | Suppress non-error output on stderr |
--source string | Source MCP config path; defaults to merged Claude settings/user/project discovery |
--target string | Target adapter config path; defaults to adapter capability path |
--to string | Target adapter; currently supports codex |
-V, --verbose | Extra diagnostic output on stderr (loses to --quiet) |
-y, --yes | Assume yes for all prompts |
Inherited flags
| Flag | Description |
|---|---|
--claude-home string | Claude home override; defaults to AGENTKIT_CLAUDE_HOME or ~/.claude |
--cwd string | Project directory override; defaults to current working directory |
Output modes
| Mode | Behavior |
|---|---|
pretty | default on TTY (colors, ASCII markers) |
plain | auto when stdout piped or --no-interactive |
json | --json (single-object envelope, NDJSON-safe) |
Exit codes
| Code | Meaning |
|---|---|
0 | success |
1 | runtime error |
2 | invalid flags |
3 | user-cancel (SIGINT, prompt-cancel) |
Related commands
ak mcp— Inspect local MCP server configuration