Hybrid MCP server that exposes both Codex CLI and Claude CLI as tools over STDIO. Runs locally; no network endpoints. It keeps a separate state for this “hybrid” persona so your main Codex/Claude identities and histories remain untouched.
codex_run— runcodex execwith optional model/cwd/extra args (uses isolatedCODEX_HOME).claude_run— runclaude --printwith optional model/cwd/extra args (isolated HOME/XDG).both_run— send the same prompt to Codex and Claude in parallel and return both outputs.
npm installnode index.jsAdd to an MCP client (e.g. .mcp.json):
{
"mcpServers": {
"claudex-mcp": {
"command": "node",
"args": ["/path/to/claudex_MCP_CLI/index.js"]
}
}
}- Default state root:
./state/inside the repo. - Override via env:
HYBRID_STATE_DIR(base),HYBRID_CODEX_HOME,HYBRID_CLAUDE_HOME,HYBRID_LOG_DIR.
- Codex uses
CODEX_HOMEandCODEX_LOG_DIR; Claude uses HOME/XDG vars set to the hybrid dirs. - Your main Codex/Claude configs are not touched.
HYBRID_CODEX_CMD(defaultcodex)HYBRID_CLAUDE_CMD(defaultclaude)HYBRID_STATE_DIR,HYBRID_CODEX_HOME,HYBRID_CLAUDE_HOME,HYBRID_LOG_DIR
codex_run: {prompt,model?,cwd?,extra_args[]?,timeout_ms?}claude_run: {message,model?,cwd?,extra_args[]?,timeout_ms?}both_run: {prompt,codex_model?,claude_model?,cwd?,timeout_ms?}
- 120s per call by default; max 300s via
timeout_ms. - Codex invoked with
--full-auto --skip-git-repo-checkby default.
codexandclaudebinaries on PATH.- Node 18+.
- Local-only: uses STDIO transport; no HTTP server is started.
- Outputs include host, exit code, stdout/stderr for easy debugging.