Socket
Book a DemoInstallSign in
Socket

@yu-orz/mcp-codex-cli

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yu-orz/mcp-codex-cli

MCP server wrapper for OpenAI's CodeX CLI

1.0.4
latest
Source
npmnpm
Version published
Weekly downloads
1
-93.75%
Maintainers
1
Weekly downloads
 
Created
Source

MCP CodeX CLI

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

概要

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

提供機能:

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

前提条件

  • Node.js 20以上
  • Bun - インストールガイド
  • OpenAI CodeX CLI - インストール方法は公式リポジトリを参照

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

パラメータ必須デフォルト説明
promptstring-CodeXへのプロンプト
modelstringgpt-5使用モデル
sandboxbooleantrueサンドボックスモード
yolobooleanfalse全自動モード
reasoningEffortstringmedium推論レベル (none|low|medium|high)
reasoningSummarystringnone推論要約 (none|auto)

Analyze File Tool

パラメータ必須デフォルト説明
filePathstring-分析対象ファイルパス
promptstring"Please analyze this file"カスタム分析プロンプト
modelstringgpt-5使用モデル
sandboxbooleantrueサンドボックスモード
yolobooleanfalse全自動モード
reasoningEffortstringmedium推論レベル (none|low|medium|high)
reasoningSummarystringnone推論要約 (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インテグレーションです。

Keywords

mcp

FAQs

Package last updated on 15 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.