feat(cli): add acp alias for mcp subcommand

This commit is contained in:
James Peter
2025-09-22 15:42:26 +10:00
parent 580cc8f4da
commit d41e9064c8
4 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ npx -y @just-every/code
```bash
npm install -g @just-every/code
code # or `coder` if you're using VS Code
code mcp # launches the MCP server over stdio
code mcp # launches the MCP server over stdio (alias: `code acp`)
```
Note: If another tool already provides a `code` command (e.g. VS Code), our CLI is also installed as `coder`. Use `coder` to avoid conflicts.
+1
View File
@@ -72,6 +72,7 @@ enum Subcommand {
Logout(LogoutCommand),
/// [experimental] Run Codex as an MCP server and manage MCP servers.
#[clap(alias = "acp", visible_alias = "acp")]
Mcp(McpCli),
/// Run the Protocol stream via stdin/stdout
+1 -1
View File
@@ -3,7 +3,7 @@
This document describes Codex’s experimental MCP interface: a JSON‑RPC API that runs over the Model Context Protocol (MCP) transport to control a local Codex engine.
- Status: experimental and subject to change without notice
- Recommended entry point: `code mcp` (wraps the same binary used by the CLI)
- Recommended entry point: `code mcp` (alias: `code acp`; both wrap the same binary used by the CLI)
- Underlying Rust binary (for development): `cargo run -p code-mcp-server`
- ACP compatibility: surfaces `acp/new_session` + `acp/prompt` as MCP tools and emits `acp/session_update` notifications
- Transport: standard MCP over stdio (JSON‑RPC 2.0, line‑delimited)
+2 -2
View File
@@ -22,7 +22,7 @@ Any existing MCP servers can remain in this table; the exiting overrides simply
## 2. Launch the MCP server under the new name
If you globally installed Code from npm (`npm install -g @just-every/code`), launch the MCP server with the built-in subcommand:
If you globally installed Code from npm (`npm install -g @just-every/code`), launch the MCP server with the built-in subcommand (`code mcp`; `code acp` is an equivalent alias):
```bash
code mcp
@@ -45,7 +45,7 @@ Add an entry to Zed's `settings.json` under `agent_servers` (see [Zed’s extern
"agent_servers": {
"Code": {
"command": "/usr/local/bin/code",
"args": ["mcp"],
"args": ["mcp"], // or "acp"
"env": {
"CODEX_HOME": "/Users/you/.code",
"RUST_LOG": "info"