Skip to content

Commit 172deab

Browse files
committed
Add Codex CLI as a second MCP registration target
deploy.sh detects claude and codex independently and now degrades gracefully when only one (or neither) is installed. Per-client registration failures no longer abort the install or strand the uninstall before rm: failures are counted and surfaced in the final banner. src/mcp/setup.rs grows a Host::Codex variant with matching aliases ("codex", "codex-cli"), ALL_HOSTS entry, generate_for_host arm, and round-trip tests. cargo test 1375 passed; clippy clean; shellcheck -x clean except a pre-existing SC2005 in get_script_dir.
1 parent defcc02 commit 172deab

4 files changed

Lines changed: 269 additions & 45 deletions

File tree

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,14 @@ The binary is at `target/release/zhtw-mcp`.
100100

101101
### Installing
102102

103-
The quickest way to build, install to `~/.local/bin`, and register with Claude Code:
103+
The quickest way to build, install to `$XDG_BIN_HOME` (or `~/.local/bin`),
104+
stop older server processes, and register with detected MCP clients
105+
(Claude Code and/or Codex):
104106

105107
```bash
106-
make install # build release, install binary, register MCP server
107-
make uninstall # remove binary and MCP registration
108-
make status # check binary, process, and registration state
108+
make install # build release, install binary, register detected MCP clients
109+
make uninstall # remove binary and detected MCP registrations
110+
make status # check binary freshness, process, and registration state
109111
```
110112

111113
For manual setup or other MCP clients:
@@ -114,11 +116,14 @@ For manual setup or other MCP clients:
114116
# Claude Code
115117
claude mcp add zhtw-mcp -- /path/to/zhtw-mcp
116118

119+
# Codex CLI
120+
codex mcp add zhtw -- /path/to/zhtw-mcp
121+
117122
# OpenCode
118123
opencode mcp add zhtw-mcp /path/to/zhtw-mcp
119124
```
120125

121-
Codex CLI or other MCP clients -- add to `.mcp.json` in your project root:
126+
Other MCP clients may use `.mcp.json` in your project root:
122127

123128
```json
124129
{

docs/cli.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ Generate configuration snippets for MCP-capable editors:
122122

123123
```bash
124124
zhtw-mcp setup claude-code
125+
zhtw-mcp setup codex
125126
```
126127

127128
Prints JSON configuration for the specified host. Available hosts depend on the build.

0 commit comments

Comments
 (0)