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

@yu-orz/mcp-codex-cli

v1.0.4

Published

MCP server wrapper for OpenAI's CodeX CLI

Downloads

14

Readme

MCP CodeX CLI

OpenAI CodeX CLI用のModel Context Protocol (MCP)サーバー実装

概要

このMCPサーバーは、OpenAI CodeX CLIをMCPクライアント(Claude Desktop等)から直接利用できるようにします。

提供機能:

  • Chat: CodeX CLIとの対話機能
  • AnalyzeFile: ファイル分析機能

前提条件

CodeX CLI クイックインストール (macOS)

brew install codex
codex

インストール

方法1: npx(推奨)

# プロジェクト固有の設定
claude mcp add -s project mcp-codex-cli -- npx @yu-orz/mcp-codex-cli --allow-npx

# ユーザー全体の設定
claude mcp add -s user mcp-codex-cli -- npx @yu-orz/mcp-codex-cli --allow-npx

# ローカル設定
claude mcp add -s local mcp-codex-cli -- npx @yu-orz/mcp-codex-cli --allow-npx

方法2: ローカルビルド

git clone https://github.com/yu-orz/mcp-codex-cli
cd mcp-codex-cli
bun install
bun run build

# ビルド後、Claude MCPに追加
claude mcp add -s project mcp-codex-cli -- bun run $(pwd)/dist/index.js

使用方法

Chat Tool

CodeX CLIとの対話:

基本:

CodeXに「Hello, can you help me write a Python function?」と聞いて

オプション付き:

CodeXにモデルgpt-5、サンドボックスモードで「このコードを最適化して」と聞いて

Analyze File Tool

ファイル分析:

基本:

./src/app.js ファイルを分析して

カスタムプロンプト:

./components/Button.tsx ファイルを「パフォーマンス観点で」分析して

パラメータ

Chat Tool

| パラメータ | 型 | 必須 | デフォルト | 説明 | |-----------|------|------|----------|------| | prompt | string | ✅ | - | CodeXへのプロンプト | | model | string | ❌ | gpt-5 | 使用モデル | | sandbox | boolean | ❌ | true | サンドボックスモード | | yolo | boolean | ❌ | false | 全自動モード | | reasoningEffort | string | ❌ | medium | 推論レベル (none|low|medium|high) | | reasoningSummary | string | ❌ | none | 推論要約 (none|auto) |

Analyze File Tool

| パラメータ | 型 | 必須 | デフォルト | 説明 | |-----------|------|------|----------|------| | filePath | string | ✅ | - | 分析対象ファイルパス | | prompt | string | ❌ | "Please analyze this file" | カスタム分析プロンプト | | model | string | ❌ | gpt-5 | 使用モデル | | sandbox | boolean | ❌ | true | サンドボックスモード | | yolo | boolean | ❌ | false | 全自動モード | | reasoningEffort | string | ❌ | medium | 推論レベル (none|low|medium|high) | | reasoningSummary | string | ❌ | none | 推論要約 (none|auto) |

オプション説明

  • sandbox: true--sandbox workspace-write (ワークスペース内のみ安全に実行)
  • yolo: true--full-auto (確認なしで自動実行、注意して使用)
  • reasoningEffort: 推論レベルを制御 → -c model_reasoning_effort=値
    • none: 推論なし(最速)
    • low: 軽微な推論
    • medium: 標準推論(デフォルト)
    • high: 詳細な推論(最も時間がかかる)
  • reasoningSummary: 推論要約の表示制御 → -c model_reasoning_summary=値
    • none: 推論要約なし(デフォルト)
    • auto: 自動で推論要約を表示

実行されるコマンド

このMCPサーバーは内部で以下のようなCodeX CLIコマンドを生成・実行します:

# Chat Tool
codex exec --skip-git-repo-check [--model gpt-5] [--sandbox workspace-write] [--full-auto] [-c model_reasoning_effort=値] [-c model_reasoning_summary=値] "プロンプト"

# Analyze File Tool
codex exec --skip-git-repo-check [オプション] [-c model_reasoning_effort=値] [-c model_reasoning_summary=値] "カスタムプロンプト. Please analyze the file: ファイルパス"

実行例

# 基本的なチャット
codex exec --skip-git-repo-check --sandbox workspace-write "Hello CodeX"

# 高精度推論付きチャット
codex exec --skip-git-repo-check --sandbox workspace-write -c model_reasoning_effort=high -c model_reasoning_summary=auto "複雑な問題を解決して"

# 高速チャット(推論なし)
codex exec --skip-git-repo-check --sandbox workspace-write -c model_reasoning_effort=none "簡単な質問"

開発

# 開発サーバー
bun run dev

# テスト実行 (24テスト)
bun test

# ユニットテストのみ (17テスト)
bun run test:unit

# E2Eテストのみ (7テスト、CodeX CLI必須)
bun run test:e2e

# リント
bun run lint

# ビルド
bun run build

MCP設定例

{
  "mcpServers": {
    "mcp-codex-cli": {
      "command": "bun",
      "args": ["run", "/path/to/mcp-codex-cli/index.ts"]
    }
  }
}

ライセンス

MIT License


このプロジェクトはOpenAIの公式プロダクトではありません。CodeX CLIの非公式MCPインテグレーションです。