@aiwerk/mcp-bridge 2.8.12 → 2.8.13
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/dist/bin/mcp-bridge.js +21 -0
- package/package.json +1 -1
package/dist/bin/mcp-bridge.js
CHANGED
|
@@ -282,12 +282,33 @@ function cmdInit(logger) {
|
|
|
282
282
|
process.stdout.write("⚠ Windsurf detected but registration failed.\n");
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
+
// Codex (OpenAI)
|
|
286
|
+
if (whichCmd("codex")) {
|
|
287
|
+
const codexConfigPath = join(homedir(), ".codex", "config.toml");
|
|
288
|
+
try {
|
|
289
|
+
const codexConfig = existsSync(codexConfigPath) ? readFileSync(codexConfigPath, "utf-8") : "";
|
|
290
|
+
if (codexConfig.includes("[mcp_servers.mcp-bridge]") || codexConfig.includes("[mcp_servers.aiwerk-bridge]")) {
|
|
291
|
+
registered = true;
|
|
292
|
+
// Silent - already configured
|
|
293
|
+
}
|
|
294
|
+
else {
|
|
295
|
+
execFileSync("codex", ["mcp", "add", "mcp-bridge", "--", bridgeCmd, ...bridgeArgs], { stdio: "pipe" });
|
|
296
|
+
process.stdout.write(`✓ Registered with Codex → ${codexConfigPath}\n Restart Codex to activate.\n`);
|
|
297
|
+
registered = true;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
catch {
|
|
301
|
+
process.stdout.write("⚠ Codex detected but registration failed. Manual setup:\n");
|
|
302
|
+
process.stdout.write(` codex mcp add mcp-bridge -- ${bridgeCmd} ${bridgeArgs.join(" ")}\n\n`);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
285
305
|
if (!registered) {
|
|
286
306
|
const cmd = isGlobal ? "mcp-bridge" : `node ${join(__dirname, "..", "bin", "mcp-bridge.js")}`;
|
|
287
307
|
process.stdout.write(`
|
|
288
308
|
No supported MCP client detected. Add manually:
|
|
289
309
|
|
|
290
310
|
Claude Code: claude mcp add -s user mcp-bridge -- ${cmd} serve
|
|
311
|
+
Codex: codex mcp add mcp-bridge -- ${cmd} serve
|
|
291
312
|
Cursor: Add to ~/.cursor/mcp.json
|
|
292
313
|
Claude Desktop: Add to claude_desktop_config.json
|
|
293
314
|
OpenClaw: openclaw plugins install @aiwerk/openclaw-mcp-bridge
|