ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

Codex MCP Bridge

โดย hampsterxรุ่น 0.9.1i★ –iรันบนเครื่อง
ชื่อใน registryio.github.hampsterx/codex-mcp-bridge

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Wraps Codex CLI as MCP tools: codex, review, query, search, structured, ping, listSessions.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: ค้นข้อมูลและความจำของ AI

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

  • ผลตรวจเบื้องต้น: ผ่าน 1 จาก 1 ข้อ
  • รันในเครื่องคุณด้วยสิทธิ์ของผู้ใช้คุณ (ไฟล์ อินเทอร์เน็ต แอปต่าง ๆ)
  • ค่าที่คุณต้องใส่เอง: CODEX_CLI_PATH, CODEX_DEFAULT_MODEL, CODEX_FALLBACK_MODEL, CODEX_MAX_CONCURRENT, CODEX_MCP_SERVERS

ต้องเตรียมก่อน

  • npmติดตั้ง Node.js (มีคำสั่ง npx) ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "codex-bridge": {
      "command": "npx",
      "args": [
        "-y",
        "codex-mcp-bridge"
      ],
      "env": {
        "CODEX_CLI_PATH": "ใส่ค่าของคุณ",
        "CODEX_DEFAULT_MODEL": "ใส่ค่าของคุณ",
        "CODEX_FALLBACK_MODEL": "ใส่ค่าของคุณ",
        "CODEX_MAX_CONCURRENT": "ใส่ค่าของคุณ",
        "CODEX_MCP_SERVERS": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add codex-bridge --env CODEX_CLI_PATH='ใส่ค่าของคุณ' --env CODEX_DEFAULT_MODEL='ใส่ค่าของคุณ' --env CODEX_FALLBACK_MODEL='ใส่ค่าของคุณ' --env CODEX_MAX_CONCURRENT='ใส่ค่าของคุณ' --env CODEX_MCP_SERVERS='ใส่ค่าของคุณ' -- npx -y codex-mcp-bridge

เติมค่าที่เว้นว่างไว้ก่อนรัน

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "codex-bridge": {
      "command": "npx",
      "args": [
        "-y",
        "codex-mcp-bridge"
      ],
      "env": {
        "CODEX_CLI_PATH": "ใส่ค่าของคุณ",
        "CODEX_DEFAULT_MODEL": "ใส่ค่าของคุณ",
        "CODEX_FALLBACK_MODEL": "ใส่ค่าของคุณ",
        "CODEX_MAX_CONCURRENT": "ใส่ค่าของคุณ",
        "CODEX_MCP_SERVERS": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "codex-bridge": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "codex-mcp-bridge"
      ],
      "env": {
        "CODEX_CLI_PATH": "ใส่ค่าของคุณ",
        "CODEX_DEFAULT_MODEL": "ใส่ค่าของคุณ",
        "CODEX_FALLBACK_MODEL": "ใส่ค่าของคุณ",
        "CODEX_MAX_CONCURRENT": "ใส่ค่าของคุณ",
        "CODEX_MCP_SERVERS": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

  • CODEX_CLI_PATH env
    Path to the codex CLI binary. Defaults to 'codex' on PATH.
  • CODEX_DEFAULT_MODEL env
    Default Codex model for codex/query/search.
  • CODEX_FALLBACK_MODEL env
    Model to use when the primary model hits a quota error.
  • CODEX_MAX_CONCURRENT env
    Maximum concurrent Codex CLI subprocesses (default 3).
  • CODEX_MCP_SERVERS env
    Controls which MCP servers from ~/.codex/config.toml stay enabled inside the Codex subprocess. Empty/unset disables all non-required servers; 'inherit' passes config through; comma-separated names (e…

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub hampsterx ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด ค้นข้อมูลและความจำของ AIi

  • ดาวมากกว่า 0% ของอีก 7256 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 27% ของอีก 7256 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 7256 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Codex MCP Bridge ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.9.1) เข้า registry 3 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี Context7, Codebase Memory, Exa

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

Context7

โดย upstash

ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว

บนเครื่องหรือคลาวด์★ 64,224MITอัปเดต วันนี้
ติดตั้ง

Codebase Memory

โดย DeusData

Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.

รันบนเครื่อง★ 48,148MITอัปเดต 20 วันที่ผ่านมา
ติดตั้ง

Exa

โดย exa-labs

Connect AI agents to Exa for web search, content fetching, and multi-step research.

รันบนคลาวด์★ 5,213MITอัปเดต เดือนที่แล้ว
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

codex-mcp-bridge

MCP server that wraps Codex CLI as a subprocess, exposing code execution, web search, and structured output as Model Context Protocol tools.

Works with any MCP client: Claude Code, Gemini CLI, Cursor, Windsurf, VS Code, or any tool that speaks MCP.

Do you need this?

If you're in a terminal agent (Claude Code, Codex CLI, Gemini CLI) with shell access, call Codex CLI directly. It's faster, cheaper, and zero overhead:

# Review current branch vs main

codex review --base main

Review uncommitted changes

codex review --uncommitted

Review with custom focus

codex review --base main "Focus on security and error handling"

From a worktree (run inside the worktree; -C is broken for review)

cd /path/to/worktree && codex review --base main

General analysis

codex exec "Analyze src/utils/parse.ts for edge cases"

Use this MCP bridge instead when:

  • Your client has no shell access (Cursor, Windsurf, Claude Desktop, VS Code)
  • You need structured output with JSON Schema validation (Codex CLI's --json has known bugs)
  • You need partial response capture on timeout and automatic model fallback on quota exhaustion
  • You want subprocess isolation: explicit env allowlist, no shell escape, secret redaction on output, FIFO-queued concurrency (max 3 parallel spawns, configurable via CODEX_MAX_CONCURRENT)
  • You need multi-turn conversations via session resume (sessionId / resetSession, inspected via listSessions)

Worktree note: Codex CLI issue #9084 breaks codex -C /path review .... Run codex review from inside the worktree to avoid it.

Quick Start

npx codex-mcp-bridge
Prerequisites
  • Codex CLI installed (npm i -g @openai/codex)
  • OPENAI_API_KEY environment variable set, or codex auth login completed
Claude Code
claude mcp add codex-bridge -- npx -y codex-mcp-bridge
Gemini CLI

Add to ~/.gemini/settings.json:

{

"mcpServers": { "codex-bridge": { "command": "npx", "args": ["-y", "codex-mcp-bridge"] } } }

Cursor / Windsurf / VS Code

Add to your MCP settings:

{

"codex-bridge": { "command": "npx", "args": ["-y", "codex-mcp-bridge"], "env": { "OPENAI_API_KEY": "sk-..." } } }

Tools

ToolDescription
codexExecute prompts with file context, session resume, and sandbox control. Multi-turn conversations via session IDs. Use for free-form review prompts; see Code review with this CLI.
reviewNative diff-aware Codex review via codex exec review --json. No caller prompt; supports uncommitted, base branch, and commit review modes.
searchWeb search via codex --search. Returns synthesized answers with source URLs.
queryLightweight text analysis. No repo context, no sessions. Runs in an isolated temp directory.
structuredJSON Schema validated output via Ajv. Data extraction, classification, or any task needing machine-parseable output.
pingHealth check with CLI version, capabilities, and concurrency diagnostics (activeCount, queueDepth).
mcpStatusReport what Codex says about each MCP server it knows about: auth type, tool inventory, and whether it initialized. Optional diagnostic mode adds explicit failure states and error text.
listSessionsList active conversation sessions with metadata (turn count, model, timestamps).
codex

General-purpose execution. Supports multi-turn conversations via sessionId, sandbox levels (read-only, workspace-write, full-auto), and reasoning effort control. Pass resetSession: true to discard and start fresh. Use listSessions to inspect active sessions before resuming.

Key parameters: prompt (required), files, model, sessionId, sandbox, reasoningEffort, workingDirectory, timeout (default 60s).

search

Web search powered by OpenAI's native search infrastructure via Codex CLI's --search flag. Returns synthesized answers with source URLs.

Key parameters: query (required), model, workingDirectory, timeout (default 120s).

query

Lightweight, non-agentic text analysis. Spawns in an isolated temp directory so the bridge's repo context doesn't leak. Pass text to analyze in the context parameter. Supports reasoningEffort and maxResponseLength.

Key parameters: prompt (required), context, model, reasoningEffort, timeout (default 60s).

review

Thin wrapper around Codex CLI's native diff-aware review. The bridge passes the diff selector to codex exec review --json; upstream Codex owns the review prompt. Requires a real git repository via workingDirectory.

Key parameters: mode (required: uncommitted, base, or commit), workingDirectory (required), base (required for base mode), commit (required for commit mode), title, model, timeout (default 180s).

structured

Embeds a JSON Schema in the prompt and validates the response with Ajv. Returns clean JSON on success, validation errors on failure.

Key parameters: prompt (required), schema (required, JSON string), files, model, workingDirectory, timeout (default 60s).

ping

No parameters. Returns CLI version, auth status, model configuration, and concurrency diagnostics (activeCount, queueDepth).

mcpStatus

Reports per-server MCP state as Codex's own app-server protocol sees it. Unlike every other tool, it deliberately does not suppress Codex's MCP servers or harden the subprocess environment, because both would disable the thing being measured. It therefore boots the servers in ~/.codex/config.toml and is slower than a normal call. With diagnostics: true and a workingDirectory inside a trusted project, the thread it starts also boots that project's .codex/config.toml servers.

Key parameters: diagnostics (default false), workingDirectory, timeout (per-request, default 90s).

ModeCostWhat you get
default~6-9sInventory: auth type, tool names and counts, and initialized / unknown per server. Creates no thread and writes no session record.
diagnostics: true~10-20sAdds an explicit failed state and the error text naming the cause (expired OAuth grant, missing binary, remote refusal). Starts an ephemeral thread, which is never materialised on disk.

Reading the output:

  • `unknown` is not a failure. It means the inventory carried no server info and no explicit verdict was available. Only diagnostics: true can report failed.
  • A `degraded` warning means don't trust `unknown`. Slow calls have been observed reporting healthy servers as uninitialized, so the tool reports how long the underlying call took and flags the result when it was slow enough to be suspect.
  • `builtIn` marks a server Codex injects that is not in your config; `configuredButUnreported` marks one in your config that Codex never mentioned.

Example:

atlassian            failed       auth=oAuth  tools=0

error: MCP client for atlassian failed to start: MCP startup failed: failed to refresh OAuth tokens for server atlassian: ... invalid_grant: Grant not found codex_apps initialized auth=bearerToken tools=117 (builtIn) linear initialized auth=oAuth tools=57 serena initialized auth=unsupported tools=22

All tools attach execution metadata (_meta) with durationMs, model, fallbackUsed, and session info where applicable. See DESIGN.md for details.

Code review with this CLI

This bridge does not bundle reviewer prompts. There are three paths for code review:

Native upstream codex review
codex review --base main

codex review --uncommitted codex review --base main "Focus on security and error handling"

Diff-aware review built into Codex CLI. No bridge involvement. Use this when your client has shell access.

Bridge review tool for native diff-aware review
{

"tool": "review", "arguments": { "mode": "base", "base": "main", "workingDirectory": "/path/to/worktree" } }

The bridge runs codex exec review --json from workingDirectory, captures the final review text, and returns review metadata such as threadId, event counts, and redacted command output. It does not accept a prompt.

Bridge codex tool with caller-supplied prompt
{

"tool": "codex", "arguments": { "prompt": " ", "sandbox": "read-only" } }

The bridge runs codex exec --sandbox read-only with the supplied prompt and returns stdout. Use this for free-form review prompts or review inputs that are not expressible as uncommitted, base, or commit diff selectors.

Representative review prompt

A starting point; adapt freely:

Review the following diff:

Look for:

  • Bugs that would surface in production
  • Missing error handling on user-supplied input
  • Tests modified to silence failures rather than verify behaviour
  • Security issues (injection, missing auth checks, secret leaks)

For each finding cite file:line, severity (high/medium/low), and a suggested fix. Skip style/formatting; assume an autoformatter handles those.

The bridge has no opinion on prompt content. See ADR-001 for the rationale.

Configuration

VariableDefaultDescription
CODEX_DEFAULT_MODEL*(CLI default)*Default model for all tools
CODEX_FALLBACK_MODELo3Fallback on quota exhaustion (none to disable)
CODEX_CLI_PATHcodexPath to CLI binary
CODEX_MAX_CONCURRENT3Max concurrent subprocess spawns
CODEX_MCP_SERVERS*(unset)*Control which Codex internal MCP servers stay enabled. See DESIGN.md.
CODEX_HOME~/.codexRoot subprocesses authenticate from
Running the bridge against a second Codex account

CODEX_HOME is a complete identity switch: auth, config.toml, skills and thread history all live under the root, so a second root is a second install. Every tool call this bridge makes is machine traffic rather than a session someone is sitting in front of, which makes it a good candidate for a work or team seat while interactive codex keeps a personal one.

Set it in the server registration rather than the ambient shell, so the choice does not depend on which terminal launched the client:

{

"mcpServers": { "codex": { "type": "stdio", "command": "npx", "args": ["-y", "codex-mcp-bridge"], "env": { "CODEX_HOME": "/home/you/.codex-work", "CODEX_DEFAULT_MODEL": "gpt-5.6-sol" } } } }

Three things to know before you

ตัดมาแค่ช่วงต้น อ่านต่อใน repo

ถาม PopNx