npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cpujia/codex-mcp-server

v2.1.0

Published

MCP Server for OpenAI Codex /v1/responses API integration with Claude Code

Readme

Codex MCP Server

npm version npm downloads License: MIT Node.js Version TypeScript GitHub stars

MCP Server for integrating OpenAI Codex /v1/responses API with Claude Code. Enables Claude Code to leverage GPT-5.3-Codex's powerful code generation capabilities.

✨ Features

  • 🚀 GPT-5.3-Codex Support: Latest and most powerful Codex model
  • 🧠 Reasoning Control: Configurable reasoning effort (xhigh, high, medium, low)
  • 🛠️ 5 Professional Tools: Generate, edit, explain, fix, and refactor code
  • 📡 Native /v1/responses API: Full protocol support with streaming
  • 🔒 Type-Safe: Complete TypeScript type definitions
  • Production-Ready: Error handling, timeouts, and retry mechanisms

📦 Installation

Option A: Install via npm (Recommended)

# Global installation
npm install -g @cpujia/codex-mcp-server

# Add to Claude Code
claude mcp add --scope user codex -- codex-mcp

Option B: Install from source

# Clone the repository
git clone https://github.com/CPU-JIA/codex-mcp-server.git
cd codex-mcp-server

# Install dependencies
npm install

# Configure environment
cp .env.example .env
# Edit .env with your Codex API credentials

# Build
npm run build

# Add to Claude Code
claude mcp add --scope user codex -- node /absolute/path/to/codex-mcp-server/dist/index.js

Option C: Use with npx (No installation required)

# Add to Claude Code using npx
claude mcp add --scope user codex -- npx @cpujia/codex-mcp-server

Detailed Installation

See QUICKSTART.md for step-by-step instructions.

🔧 Configuration

Environment Variables

CODEX_API_BASE_URL=https://your-codex-service.com/v1
CODEX_API_KEY=your-api-key-here
CODEX_MODEL=gpt-5.3-codex
CODEX_REASONING_EFFORT=xhigh
CODEX_TIMEOUT=60000
CODEX_MAX_TOKENS=4096

Claude Code Integration

Option A: Command Line (Recommended)

claude mcp add --scope user codex -- node /path/to/codex-mcp-server/dist/index.js

Option B: Manual Configuration

Edit %APPDATA%\Claude\mcp.json (Windows) or ~/.config/claude/mcp.json (Linux/Mac):

{
  "mcpServers": {
    "codex": {
      "command": "node",
      "args": ["/absolute/path/to/codex-mcp-server/dist/index.js"],
      "env": {
        "CODEX_API_BASE_URL": "https://your-codex-service.com/v1",
        "CODEX_API_KEY": "your-api-key-here",
        "CODEX_MODEL": "gpt-5.3-codex",
        "CODEX_REASONING_EFFORT": "xhigh"
      }
    }
  }
}

See CLAUDE_CODE_CONFIG.md for detailed configuration options.

🛠️ Available Tools

| Tool | Description | Use Case | | ---------------- | ------------------------------------------ | ---------------------------------------- | | codex_generate | Generate new code from natural language | Create functions, components, algorithms | | codex_edit | Modify existing code based on instructions | Add features, refactor, optimize | | codex_explain | Explain code logic and complexity | Understand algorithms, review code | | codex_fix | Fix bugs based on error messages | Debug, resolve issues | | codex_refactor | Improve code quality and structure | Simplify logic, enhance readability |

Example Usage

Claude, use codex_generate to create a TypeScript function that implements a binary search tree

See EXAMPLES.md for more detailed examples.

🎯 Reasoning Effort Levels

| Level | Speed | Quality | Best For | | -------- | ------- | ------- | --------------------------------------- | | xhigh | Slowest | Highest | Complex algorithms, architecture design | | high | Slow | High | General complex tasks, refactoring | | medium | Medium | Medium | Daily development, balanced use | | low | Fast | Basic | Simple tasks, code completion |

See GPT-5.3-CODEX-CONFIG.md for detailed reasoning configuration.

📚 Documentation

🏗️ Architecture

Claude Code (Orchestrator)
    ↓
MCP Server (Protocol Bridge)
    ↓
Codex API (/v1/responses)

Separation of Concerns:

  • Claude Code: Requirement understanding, file operations, command execution, tool orchestration
  • Codex: Code generation, editing, analysis (with powerful reasoning)

🔍 Troubleshooting

"Cannot find module"

cd /path/to/codex-mcp-server
npm run build

"CODEX_API_BASE_URL must be set"

Check your .env file or Claude Code configuration env fields.

Claude Code doesn't see the tools

  1. Verify the configuration file path is correct
  2. Restart Claude Code
  3. Check Claude Code logs for errors

API call failures

  1. Test your Codex API endpoint:
    curl -X POST https://your-codex-service.com/v1/responses \
      -H "Authorization: Bearer your-api-key" \
      -H "Content-Type: application/json" \
      -d '{"model":"gpt-5.3-codex","input":[{"role":"user","content":"test"}]}'
  2. Verify API key is valid
  3. Check network connectivity

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

MIT License - see LICENSE file for details.

🙏 Acknowledgments

📞 Support


Enjoy the powerful combination of Claude + Codex! 🚀