CLI commands
ak mcp link
Mirror MCP servers into another adapter config
ak mcp link
Mirror MCP servers into another adapter config
Synopsis
What it does: 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.
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 --json
What changes on disk: Dry-run by default. With --apply, writes the target adapter config after creating a backup.
Output modes: pretty default on TTY (colors, ASCII markers) plain auto when stdout piped or --no-interactive json --json (single-object envelope, NDJSON-safe)
Exit codes: 0 success 1 runtime error 2 invalid flags 3 user-cancel (SIGINT, prompt-cancel)
ak mcp link --to <adapter> [flags]Options
--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 promptsOptions inherited from parent commands
--claude-home string Claude home override; defaults to AGENTKIT_CLAUDE_HOME or ~/.claude
--cwd string Project directory override; defaults to current working directorySEE ALSO
- ak mcp - Inspect local MCP server configuration