Skip to content

PushPullCommitPush/claudex_MCP_CLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

claudex-mcp-cli

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.

Tools

  • codex_run — run codex exec with optional model/cwd/extra args (uses isolated CODEX_HOME).
  • claude_run — run claude --print with optional model/cwd/extra args (isolated HOME/XDG).
  • both_run — send the same prompt to Codex and Claude in parallel and return both outputs.

Install

npm install

Run (STDIO)

node index.js

Add to an MCP client (e.g. .mcp.json):

{
  "mcpServers": {
    "claudex-mcp": {
      "command": "node",
      "args": ["/path/to/claudex_MCP_CLI/index.js"]
    }
  }
}

State & identity

  • 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_HOME and CODEX_LOG_DIR; Claude uses HOME/XDG vars set to the hybrid dirs.
  • Your main Codex/Claude configs are not touched.

Runtime env vars (optional)

  • HYBRID_CODEX_CMD (default codex)
  • HYBRID_CLAUDE_CMD (default claude)
  • HYBRID_STATE_DIR, HYBRID_CODEX_HOME, HYBRID_CLAUDE_HOME, HYBRID_LOG_DIR

Inputs

  • 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? }

Timeouts / defaults

  • 120s per call by default; max 300s via timeout_ms.
  • Codex invoked with --full-auto --skip-git-repo-check by default.

Requirements

  • codex and claude binaries on PATH.
  • Node 18+.

Notes

  • Local-only: uses STDIO transport; no HTTP server is started.
  • Outputs include host, exit code, stdout/stderr for easy debugging.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published