Token导航 LogoToken导航TokenDH.com
Codex Claude MCP logo
开发工具stdio官方级别未说明来源级核验

Codex Claude MCP

MCP Server

codex

Codex MCP Integration v2.0是一个功能丰富的OpenAI Codex集成工具,提供统一的命令接口、智能路由和质量控制,适用于Claude Code环境中的代码实现、修复、审查和重构任务。

工具数

2

提示词数

0

GitHub Stars

0

资源数

0
代码生成代码审查PythonClaudeClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

merceralex397-collab

提供方

merceralex397-collab

最后核验

2026/5/17 20:21

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx -y codex mcp-server

详细介绍

Codex MCP集成v2.0

Claude Code的全功能OpenAI Codex集成,具有统一的命令界面、智能路由和质量门。

快速开始

/codex 

就是这样。统一 /codex 命令处理一切:

  • 自动检测您的项目(框架、模式、工具)
  • 基于意图的路由(实现、修复、审查、重构、测试)
  • 链操作(“修复X并添加测试”)
  • 迭代直到通过质量门

例子

/codex implement a rate limiter for the API
/codex fix the auth bug
/codex review the payment module for security issues
/codex refactor to use repository pattern and add tests

命令

命令描述
/codex 统一入口-自动路由到适当的代理
/codex-config查看和修改设置

标志(可在/codex上使用)

标志目的
--model=覆盖此调用的模型
--reasoning=覆盖推理努力(低/中/高/高)
--profile=使用特定配置文件(快速/标准/深度)
--no-iterate跳过质量门
--verbose显示详细输出
--quiet最小输出

文档

  • 食品法典委员会文件目录: docs/codex-docs/DOCS.md (与Claude Code的列表相同,直接引用了MCP)。
  • Codex文档镜像:每个官方页面的原始HTML,保存在 docs/codex-docs/pages/ (例如。, codex-cli.html, codex-config-reference.html, codex-mcp.html等等),这样你就可以离线打开确切的OpenAI内容。

特性

  • 统一指挥部:一个命令用于所有食典操作
  • DNA检测项目:自动理解您的代码库
  • 意向路由:将自然语言与最佳工作流程相匹配
  • 质量门:迭代直到测试通过,lints clean
  • MCP服务器集成:直接从Claude Code访问Codex
  • 写入功能:完全文件修改支持

先决条件

  1. 克劳德代码 已安装(安装指南)
  2. Codex CLI 安装:
   npm install -g codex
  1. 食品法典委员会认证:
   codex login

安装

Windows(PowerShell):

# One-time install (plugin auto-updates thereafter)
git clone https://github.com/merceralex397-collab/codex-claude-integration.git
cd codex-claude-integration
.\install.ps1

Linux/Mac(Bash):

# One-time install (plugin auto-updates thereafter)
git clone https://github.com/merceralex397-collab/codex-claude-integration.git
cd codex-claude-integration
chmod +x install.sh
./install.sh

安装程序将存储库克隆到 ~/.claude/plugins/codex-claude-integration/ 并将技能复制到 ~/.claude/skills/该插件在每次Claude Code会话时自动更新。

验证安装

在克劳德代码中:

/mcp

应该显示 codex 服务器已连接(绿色)。

配置

用户设置

通过在以下位置创建设置文件来自定义插件 ~/.claude/codex-settings.toml:

# Copy the template
cp ~/.claude/plugins/codex-claude-integration/config/codex-settings.toml ~/.claude/

或者使用 /codex-config 命令:

/codex-config create   # Create settings file from template
/codex-config          # View current settings
/codex-config edit     # Show settings file for editing

设置参考

[defaults]
model = "gpt-5.2-codex"           # Default model
reasoning_effort = "medium"        # low | medium | high | xhigh
verbosity = "normal"               # quiet | normal | verbose

[gates]
enabled = ["test", "lint"]         # Quality gates to run
max_retries = 3                    # Retries per failing gate
auto_iterate = true                # Continue after gate failure

[profiles.quick]                   # Fast execution for simple tasks
model = "gpt-5.1-codex-mini"
reasoning_effort = "low"
timeout = 120

[profiles.standard]                # Balanced for most tasks
model = "gpt-5.2-codex"
reasoning_effort = "medium"
timeout = 300

[profiles.deep]                    # Complex tasks
model = "gpt-5.1-codex-max"
reasoning_effort = "high"
timeout = 600

[profiles.review]                  # Code review (read-only)
model = "gpt-5.2"
reasoning_effort = "medium"
timeout = 300

档案

该插件包括预配置的配置文件:

简介模型推理工作量用途
quickgpt-5.1-codex-mini简单/快速任务
standardgpt-5.2-codex中等大多数编码任务
deepgpt-5.1-codex-max高/高复杂任务
reviewgpt-5.2中等仅用于分析

统一 /codex 技能会根据任务的复杂性自动选择合适的配置文件。 您可以覆盖设置文件中的配置文件。

当前型号(2026年1月)

型号最适合
gpt-5.2-codex旗舰-大多数编码任务
gpt-5.1-codex-max深度推理,长任务
gpt-5.1-codex-mini简单任务快速/便宜
gpt-5.2不执行代码的分析

注:o3、o4 mini和gpt-4.1系列已被取代。

故障排除

MCP服务器无法启动

# Test directly
npx -y codex mcp-server

# Check logs
codex --version

身份验证问题

# Re-authenticate
codex login

# Or use API key
claude mcp remove codex
claude mcp add --transport stdio --scope user --env OPENAI_API_KEY=sk-... codex -- npx -y codex mcp-server

任务无限期挂起

确保您正在使用 approval-policy: "never"。参见 知识_问题.md.

长任务超时

该插件设置10分钟超时。对于很长的任务,把它们分解成更小的部分。

建筑

子代理

该插件将任务路由到专门的子代理:

代理目的沙盒
codex-coder实现、调试、重构工作区编写
codex-reviewer代码审查、安全审计、分析只读

路由是基于意图检测的自动路由:

  • 生成、调试、重构、测试 → codex编码器
  • 审查、分析、审计 → 法典评审员

文件结构

codex-claude-integration/
├── .claude-plugin/
│   └── plugin.json           # Plugin manifest
├── .mcp.json                 # MCP server configuration
├── hooks/
│   └── hooks.json            # SessionStart auto-update hook
├── agents/
│   ├── codex-coder.md        # Coding subagent
│   └── codex-reviewer.md     # Review subagent
├── skills/
│   ├── codex/                # Unified skill
│   │   └── SKILL.md
│   └── codex-config/         # Configuration skill
│       └── SKILL.md
├── config/
│   ├── codex-settings.toml   # User settings template
│   ├── profiles.toml         # Profile definitions
│   ├── models.json           # Model configurations
│   ├── task-mappings.json    # Task type mappings
│   ├── intents.toml          # Intent configuration
│   └── gates.toml            # Quality gate configuration
├── scripts/
│   ├── auto-update.ps1       # Windows auto-update script
│   ├── auto-update.sh        # Linux/Mac auto-update script
│   ├── settings_loader.py    # User settings management
│   ├── task-analyzer.py      # Task analysis script
│   ├── project_dna.py        # Project detection
│   └── quality_gates.py      # Quality gate runner
├── README.md
├── KNOWN_ISSUES.md
├── LICENSE
├── install.ps1 / install.sh
└── uninstall.ps1 / uninstall.sh

自动更新

该插件会自动检查每个Claude Code会话的更新:

  • 从GitHub存储库获取更新
  • 检查被限制在每小时一次
  • 技能更新后会自动重新复制
  • 显示的版本: git describe --tags (例如,“v2.1.0”)

要手动更新,请执行以下操作:

cd ~/.claude/plugins/codex-claude-integration
git fetch origin --tags
git reset --hard origin/master

卸载

Windows(PowerShell):

~/.claude/plugins/codex-claude-integration/uninstall.ps1

Linux/Mac(Bash):

~/.claude/plugins/codex-claude-integration/uninstall.sh

手动卸载:

# Remove MCP server
claude mcp remove codex

# Remove skills
rm -rf ~/.claude/skills/codex-*
rm -rf ~/.claude/skills/auto-codex
rm -rf ~/.claude/skills/codex

# Remove plugin
rm -rf ~/.claude/plugins/codex-claude-integration

许可证

麻省理工学院

贡献

欢迎在https://github.com/merceralex397-collab/codex-claude-integration

目录标签

目录标签

代码生成代码审查PythonClaude本地部署智能路由质量控制自动化编程

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

api-key

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

codex

工具数量(toolCount,工具数)

2

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdioapi-key部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP