codex-mcp-agent

codex-mcp-agent

Enables Claude Code, Cursor, and other AI tools to call OpenAI Codex for task execution, with safe and writable modes.

Category
Visit Server

README

codex-mcp-agent

中文版

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

  • origin: https://github.com/1WorldCapture/codex-as-mcp

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured