claude-codex-bridge 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -28,8 +28,8 @@ Let Claude and Codex work as partners — each can ask the other for help, revie
28
28
  No install needed — use directly via `npx`:
29
29
 
30
30
  ```bash
31
- npx -p claude-codex-bridge ccb-codex # Start the Codex server
32
- npx -p claude-codex-bridge ccb-claude # Start the Claude server
31
+ npx claude-codex-bridge codex # Start the Codex server
32
+ npx claude-codex-bridge claude # Start the Claude server
33
33
  ```
34
34
 
35
35
  ## Setup
@@ -56,7 +56,7 @@ Or, if you don't have the repo cloned, just ask Claude Code:
56
56
  Add to your Claude Code MCP config:
57
57
 
58
58
  ```bash
59
- claude mcp add codex -- npx -p claude-codex-bridge ccb-codex
59
+ claude mcp add codex -- npx claude-codex-bridge codex
60
60
  ```
61
61
 
62
62
  Or add to `.mcp.json` in your project:
@@ -67,7 +67,7 @@ Or add to `.mcp.json` in your project:
67
67
  "codex": {
68
68
  "type": "stdio",
69
69
  "command": "npx",
70
- "args": ["-p", "claude-codex-bridge", "ccb-codex"]
70
+ "args": ["claude-codex-bridge", "codex"]
71
71
  }
72
72
  }
73
73
  }
@@ -83,7 +83,7 @@ Add to `~/.codex/config.toml`:
83
83
  ```toml
84
84
  [mcp_servers.claude]
85
85
  command = "npx"
86
- args = ["-p", "claude-codex-bridge", "ccb-claude"]
86
+ args = ["claude-codex-bridge", "claude"]
87
87
  tool_timeout_sec = 300
88
88
  ```
89
89
 
@@ -93,33 +93,33 @@ tool_timeout_sec = 300
93
93
 
94
94
  ### `ccb-codex` — Claude calls Codex
95
95
 
96
- | Tool | Description |
97
- |------|-------------|
98
- | `codex_query` | Ask Codex a question or give it a task |
99
- | `codex_review_code` | Ask Codex to review code changes |
100
- | `codex_review_plan` | Ask Codex to critique an implementation plan |
96
+ | Tool | Description |
97
+ | -------------------- | ------------------------------------------------ |
98
+ | `codex_query` | Ask Codex a question or give it a task |
99
+ | `codex_review_code` | Ask Codex to review code changes |
100
+ | `codex_review_plan` | Ask Codex to critique an implementation plan |
101
101
  | `codex_explain_code` | Ask Codex to explain code / logic / architecture |
102
- | `codex_plan_perf` | Ask Codex to plan performance improvements |
103
- | `codex_implement` | Ask Codex to write or modify code |
102
+ | `codex_plan_perf` | Ask Codex to plan performance improvements |
103
+ | `codex_implement` | Ask Codex to write or modify code |
104
104
 
105
105
  ### `ccb-claude` — Codex calls Claude
106
106
 
107
- | Tool | Description |
108
- |------|-------------|
109
- | `claude_query` | Ask Claude a question or give it a task |
110
- | `claude_review_code` | Ask Claude to review code changes |
111
- | `claude_review_plan` | Ask Claude to critique an implementation plan |
107
+ | Tool | Description |
108
+ | --------------------- | ------------------------------------------------- |
109
+ | `claude_query` | Ask Claude a question or give it a task |
110
+ | `claude_review_code` | Ask Claude to review code changes |
111
+ | `claude_review_plan` | Ask Claude to critique an implementation plan |
112
112
  | `claude_explain_code` | Ask Claude to explain code / logic / architecture |
113
- | `claude_plan_perf` | Ask Claude to plan performance improvements |
114
- | `claude_implement` | Ask Claude to write or modify code |
113
+ | `claude_plan_perf` | Ask Claude to plan performance improvements |
114
+ | `claude_implement` | Ask Claude to write or modify code |
115
115
 
116
116
  ## Configuration
117
117
 
118
- | Variable | Description | Default |
119
- |----------|-------------|---------|
120
- | `BRIDGE_TIMEOUT_MS` | Subprocess timeout in milliseconds | `300000` (5 min) |
121
- | `BRIDGE_DEBUG` | Enable debug logging to stderr | — |
122
- | `BRIDGE_DEPTH` | Current recursion depth (set automatically) | `0` |
118
+ | Variable | Description | Default |
119
+ | ------------------- | ------------------------------------------- | ---------------- |
120
+ | `BRIDGE_TIMEOUT_MS` | Subprocess timeout in milliseconds | `300000` (5 min) |
121
+ | `BRIDGE_DEBUG` | Enable debug logging to stderr | — |
122
+ | `BRIDGE_DEPTH` | Current recursion depth (set automatically) | `0` |
123
123
 
124
124
  ### Anti-Recursion Guard
125
125
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as logger, n as buildPlanPerfPrompt, r as execCommand, t as buildExplainCodePrompt } from "./prompt-builder-CQ2IGDTq.mjs";
2
+ import { a as execCommand, i as buildPlanPerfPrompt, o as logger, r as buildExplainCodePrompt, t as CLAUDE_MODELS } from "./types-zG6mPG0o.mjs";
3
3
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
4
4
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
5
  import { z } from "zod";
@@ -115,7 +115,7 @@ server.registerTool("claude_query", {
115
115
  inputSchema: {
116
116
  prompt: z.string().describe("The question or task for Claude"),
117
117
  workingDirectory: z.string().optional().describe("Working directory (defaults to server cwd)"),
118
- model: z.string().optional().describe("Model alias: sonnet, opus, or haiku"),
118
+ model: z.enum(CLAUDE_MODELS).optional().describe("Claude model alias"),
119
119
  maxTurns: z.number().optional().default(10).describe("Maximum agentic turns (limits runtime)"),
120
120
  allowedTools: z.array(z.string()).optional().describe("Restrict tools (e.g., [\"Read\", \"Grep\", \"Glob\"])")
121
121
  }
@@ -226,7 +226,7 @@ server.registerTool("claude_implement", {
226
226
  inputSchema: {
227
227
  task: z.string().describe("What to implement or fix"),
228
228
  workingDirectory: z.string().optional(),
229
- model: z.string().optional(),
229
+ model: z.enum(CLAUDE_MODELS).optional().describe("Claude model alias"),
230
230
  maxTurns: z.number().optional().default(15)
231
231
  }
232
232
  }, async ({ task, workingDirectory, model, maxTurns }) => {
package/dist/cli.d.mts ADDED
@@ -0,0 +1 @@
1
+ export { };
package/dist/cli.mjs ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ //#region src/cli.ts
3
+ const subcommand = process.argv[2];
4
+ if (subcommand === "codex") await import("./codex-server.mjs");
5
+ else if (subcommand === "claude") await import("./claude-server.mjs");
6
+ else {
7
+ console.error(`Usage: claude-codex-bridge <codex|claude>\n\n codex Start the Codex MCP server (for Claude Code)\n claude Start the Claude MCP server (for Codex CLI)`);
8
+ process.exit(1);
9
+ }
10
+
11
+ //#endregion
12
+ export { };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as logger, n as buildPlanPerfPrompt, r as execCommand, t as buildExplainCodePrompt } from "./prompt-builder-CQ2IGDTq.mjs";
2
+ import { a as execCommand, i as buildPlanPerfPrompt, n as CODEX_MODELS, o as logger, r as buildExplainCodePrompt } from "./types-zG6mPG0o.mjs";
3
3
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
4
4
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
5
  import { z } from "zod";
@@ -134,7 +134,7 @@ server.registerTool("codex_query", {
134
134
  inputSchema: {
135
135
  prompt: z.string().describe("The question or task for Codex"),
136
136
  workingDirectory: z.string().optional().describe("Working directory (defaults to server cwd)"),
137
- model: z.string().optional().describe("Override the Codex model (e.g., o4-mini, o3)"),
137
+ model: z.enum(CODEX_MODELS).optional().describe("Override the Codex model"),
138
138
  sandbox: z.enum([
139
139
  "read-only",
140
140
  "workspace-write",
@@ -239,7 +239,7 @@ server.registerTool("codex_implement", {
239
239
  inputSchema: {
240
240
  task: z.string().describe("What to implement or fix"),
241
241
  workingDirectory: z.string().optional(),
242
- model: z.string().optional(),
242
+ model: z.enum(CODEX_MODELS).optional().describe("Override the Codex model"),
243
243
  sandbox: z.enum(["workspace-write", "danger-full-access"]).optional().default("workspace-write").describe("Sandbox level (must allow writes)")
244
244
  }
245
245
  }, async ({ task, workingDirectory, model, sandbox }) => {
@@ -156,4 +156,17 @@ Perform the following analysis:
156
156
  }
157
157
 
158
158
  //#endregion
159
- export { logger as i, buildPlanPerfPrompt as n, execCommand as r, buildExplainCodePrompt as t };
159
+ //#region src/lib/types.ts
160
+ const CODEX_MODELS = [
161
+ "gpt-5.3-codex",
162
+ "gpt-5.2-codex",
163
+ "gpt-5.1-codex-max"
164
+ ];
165
+ const CLAUDE_MODELS = [
166
+ "sonnet",
167
+ "opus",
168
+ "haiku"
169
+ ];
170
+
171
+ //#endregion
172
+ export { execCommand as a, buildPlanPerfPrompt as i, CODEX_MODELS as n, logger as o, buildExplainCodePrompt as r, CLAUDE_MODELS as t };
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "claude-codex-bridge",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "Bidirectional MCP server bridge between Claude Code and Codex CLI",
5
5
  "type": "module",
6
6
  "bin": {
7
+ "claude-codex-bridge": "./dist/cli.mjs",
7
8
  "ccb-codex": "./dist/codex-server.mjs",
8
9
  "ccb-claude": "./dist/claude-server.mjs"
9
10
  },