Skip to main content

MCP server that provides agent capability backing by codex CLI

Project description

codex-mcp-agent

中文版

Note: This project is a fork of the current Git remote:

Enable Claude Code, Cursor and other AI tools to call Codex for task execution. Plus/Pro/Team subscribers can maximize GPT-5 usage without additional costs.

Setup

1. Install Codex CLI

npm install -g @openai/codex
codex login

2. Configure MCP

Add to your .mcp.json: Safe Mode (Default):

{
  "mcpServers": {
    "codex": {
      "type": "stdio",
      "command": "uvx",
      "args": ["codex-mcp-agent@latest"]
    }
  }
}

Writable Mode:

{
  "mcpServers": {
    "codex": {
      "type": "stdio",
      "command": "uvx",
      "args": ["codex-mcp-agent@latest", "--yolo"]
    }
  }
}

Or use Claude Code commands:

# Safe mode (default)
claude mcp add codex-mcp-agent -- uvx codex-mcp-agent@latest

# Writable mode
claude mcp add codex-mcp-agent -- uvx codex-mcp-agent@latest --yolo

Tools

The MCP server exposes two tools:

  • codex_execute(prompt, work_dir) - General purpose codex execution
  • codex_review(review_type, work_dir, target?, prompt?) - Specialized code review

If you have any other use case requirements, feel free to open issue.

HTTP/SSE Mode (Optional)

For local personal use, you can run the server over HTTP with Server-Sent Events (SSE) and connect via type: "sse".

Start the server in SSE mode:

uvx codex-mcp-agent@latest --sse            # safe mode, localhost:8822
uvx codex-mcp-agent@latest --sse --yolo     # writable mode

# Options
#   --host  (default: 127.0.0.1)
#   --port  (default: 8822)

Configure your client .mcp.json:

{
  "mcpServers": {
    "codex": {
      "type": "sse",
      "url": "http://127.0.0.1:8822"
    }
  }
}

Notes:

  • SSE mode keeps the same Safe/Writable behavior controlled by --yolo.
  • SSE server binds to 127.0.0.1 by default and has no auth/CORS for simplicity.
  • Stdio mode remains the default; use --sse only if you prefer HTTP.

Optional: Streamable HTTP transport (if your client supports it):

uvx codex-mcp-agent@latest --http           # safe mode streamable-http transport

Safety

  • Safe Mode: Default read-only operations protect your environment
  • Writable Mode: Use --yolo flag when you need full codex capabilities
  • Sequential Execution: Prevents conflicts from parallel agent operations

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codex_mcp_agent-0.1.0.tar.gz (51.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codex_mcp_agent-0.1.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file codex_mcp_agent-0.1.0.tar.gz.

File metadata

  • Download URL: codex_mcp_agent-0.1.0.tar.gz
  • Upload date:
  • Size: 51.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for codex_mcp_agent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e5c514c65a622fb3de3751c3c271cbc9a4dee1c8b199362e7546098992f22683
MD5 8cb0df28ffe7c7e0df04a704b4415be9
BLAKE2b-256 e44b262c04331abcc63901a80e4cfaf41dcf6d1fd029e79649725353b9dbd3f0

See more details on using hashes here.

File details

Details for the file codex_mcp_agent-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for codex_mcp_agent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96013faea383a084fe7a25ad272583df8297b946573483fee5652a3cef58ea52
MD5 46d8e52d0503041a21fd157d9ea93c4b
BLAKE2b-256 8f75f8aea1e40179c7bc673bb1fb27dd6efc44fa2bae4a90767eafbd312b125d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page