x51xxx/codex-mcp-tool

x51xxx/codex-mcp-tool

от x51xxx
MCP инструмент для интеграции Codex CLI с Claude и Cursor. Позволяет анализировать файлы через @-ссылки, вести многошаговые сессии в изолированном окружении и применять структурированные правки. Полезен разработчикам для безопасного рефакторинга.

Codex MCP Server

GitHub Release npm version npm downloads License: MIT

MCP server connecting Claude/Cursor to Codex CLI. Enables code analysis via @ file references, multi-turn conversations, sandboxed edits, and structured change mode.

Features

  • File Analysis — Reference files with @src/, @package.json syntax
  • Multi-Turn Sessions — Conversation continuity with workspace isolation
  • Native Resume — Uses codex resume for context preservation (CLI v0.36.0+)
  • Local OSS Models — Run with Ollama or LM Studio via localProvider
  • Web Search — Research capabilities with search: true
  • Sandbox Mode — Safe code execution with --full-auto
  • Change Mode — Structured OLD/NEW patch output for refactoring
  • Brainstorming — SCAMPER, design-thinking, lateral thinking frameworks
  • Health Diagnostics — CLI version, features, and session monitoring
  • Cross-Platform — Windows, macOS, Linux fully supported

Quick Start

claude mcp add codex-cli -- npx -y @trishchuk/codex-mcp-tool

Prerequisites: Node.js 18+, Codex CLI installed and authenticated.

Configuration
{
  "mcpServers": {
    "codex-cli": {
      "command": "npx",
      "args": ["-y", "@trishchuk/codex-mcp-tool"]
    }
  }
}
Инструменты были проиндексированы:
ask-codexвнешний мир

Запускает Codex CLI с анализом файлов (@syntax), навыками ($syntax), выбором модели и контролем безопасности. Поддерживает changeMode.

Параметры
  • addDirsstring[]

    Additional writable directories beyond workspace (e.g., ["/tmp", "/var/log"]). Useful for monorepos and multi-directory projects.

  • approvalenum

    Deprecated alias for approvalPolicy — both map to --ask-for-approval. Prefer approvalPolicy. Values: on-request, never

  • approvalPolicyenum

    Approval: never, on-request

  • bypassHookTrustboolean

    DANGEROUS: run enabled hooks without persisted hook trust

  • cdstring

    Working directory

  • changeModeboolean

    Return structured OLD/NEW edits for refactoring

  • chunkCacheKeystring

    Cache key for continuation

  • chunkIndexnumber

    Chunk index (1-based)

  • configstring | object

    Configuration overrides as 'key=value' string or object

  • disableFeaturesstring[]

    Disable feature flags (repeatable). Equivalent to -c features.<name>=false

  • enableFeaturesstring[]

    Enable feature flags (repeatable). Equivalent to -c features.<name>=true

  • ephemeralboolean

    Run without persisting Codex session files to disk

  • fullAutoboolean

    Compatibility alias for workspace-write with approval=never (not --yolo)

  • ignoreRulesboolean

    Ignore user and project execpolicy .rules files for this run

  • ignoreUserConfigboolean

    Ignore $CODEX_HOME/config.toml for this run; authentication is still loaded

  • imagestring | string[]

    Optional image file path(s) to include with the prompt

  • includeMetadataboolean

    Include configuration metadata in response

  • includeThinkingboolean

    Include reasoning/thinking section in response

  • localProviderenum

    Specify which local provider to use (lmstudio or ollama). Automatically enables --oss if not set. If omitted with --oss, uses config default or shows selection.

  • modelstring

    Optional model override. Known: gpt-6-astra, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4-mini. If omitted, uses your Codex CLI default (~/.codex/config.toml). Specify only to override.

  • ossboolean

    Use local Ollama server (convenience for -c model_provider=oss). Requires Ollama running locally. Automatically sets sandbox to workspace-write if not specified.

  • outputLastMessagestring

    Write final Codex message to file path. Useful for CI/CD result capture (Codex CLI v0.95.0+)

  • outputSchemastring | object

    JSON Schema path or inline schema to constrain output format (Codex CLI v0.95.0+)

  • personalityenum

    Communication style: pragmatic (concise, machine-friendly) or friendly (conversational). Codex CLI v0.94.0+

  • profilestring

    Configuration profile to use from ~/.codex/config.toml

  • promptstringобязательный

    Task or question. Use @ to include files (e.g., '@largefile.ts explain').

  • reasoningEffortenum

    Reasoning depth. Omit to use the CLI default. max/ultra are model-dependent GPT-6/GPT-5.6 options; ultra may delegate to subagents.

  • resetSessionboolean

    Clear session context before execution. Starts fresh conversation.

  • responseModeenum

    Response verbosity: "clean" returns only the final answer (default), "full" returns the complete execution log including thinking, tool calls, and agent activity

  • sandboxboolean

    Quick automation mode: enables workspace-write with approval=never. Sandboxing remains active.

  • sandboxModeenum

    Access: read-only, workspace-write, danger-full-access

  • searchboolean

    Enable web search using native --search flag (v0.52.0+). Requires network access - automatically sets sandbox to workspace-write if not specified.

  • sessionIdstring

    Session ID for conversation continuity. Enables native Codex resume.

  • skipGitRepoCheckboolean

    Skip git repository validation. Useful for non-git directories (Codex CLI v0.75.0+)

  • strictConfigboolean

    Fail when config.toml contains fields unknown to the installed Codex CLI

  • timeoutnumber

    Maximum execution time in milliseconds (optional)

  • toolOutputTokenLimitnumber

    Maximum tokens for tool outputs (100-10,000). Controls response verbosity.

  • workingDirstring

    Working directory for execution

  • yoloboolean

    ⚠️ Bypass all safety (dangerous)

batch-codexвнешний мир

Делегирует множественные атомарные задачи Codex для пакетной обработки. Идеально подходит для повторяющихся операций, массового рефакторинга и автоматизированных преобразований кода.

Параметры
  • concurrencyinteger

    Maximum parallel Codex processes when parallel=true. Default: min(task count, 4)

  • disableFeaturesstring[]

    Disable feature flags

  • enableFeaturesstring[]

    Enable feature flags

  • modelstring

    Optional model override applied to every task. Known: gpt-6-astra, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4-mini. If omitted, uses your Codex CLI default (~/.codex/config.toml).

  • ossboolean

    Use local Ollama server

  • parallelboolean

    Execute independent tasks in parallel

  • sandboxstring

    Sandbox mode: read-only, workspace-write, danger-full-access

  • searchboolean

    Enable live web search for all tasks using the native --search flag

  • stopOnErrorboolean

    Stop execution if any task fails

  • tasksobject[]обязательный

    Array of atomic tasks to delegate to Codex

  • timeoutnumber

    Maximum execution time per task in milliseconds

  • workingDirstring

    Working directory for execution

brainstormвнешний мир

Генерирует творческие идеи, используя структурированные фреймворки с контекстом предметной области и анализом выполнимости.

Параметры
  • approvalPolicyenum

    Approval: never, on-request

  • cdstring

    Working directory

  • constraintsstring

    Limitations: budget, time, technical, legal, etc.

  • disableFeaturesstring[]

    Disable feature flags

  • domainstring

    Domain: software, business, creative, research, product, marketing, etc.

  • enableFeaturesstring[]

    Enable feature flags

  • existingContextstring

    Background info or previous attempts

  • fullAutoboolean

    Compatibility alias for workspace-write with approval=never

  • ideaCountinteger

    Number of ideas (default: 12, range: 5-30)

  • includeAnalysisboolean

    Include feasibility/impact analysis

  • localProviderenum

    Specify which local provider to use (lmstudio or ollama). Automatically enables --oss if not set.

  • methodologyenum

    Framework: divergent, convergent, scamper, design-thinking, lateral, auto (default)

  • modelstring

    Optional model override. Known: gpt-6-astra, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4-mini. If omitted, uses your Codex CLI default (~/.codex/config.toml).

  • ossboolean

    Use local Ollama server

  • personalityenum

    Communication style: pragmatic (concise, machine-friendly) or friendly (conversational). Codex CLI v0.94.0+

  • promptstringобязательный

    Brainstorming challenge or question

  • reasoningEffortenum

    Reasoning depth. Default: high (creative ideation benefits from depth). Override with "xhigh" for very complex domains, "medium" for quick exploration.

  • sandboxModeenum

    Access: read-only, workspace-write, danger-full-access

  • searchboolean

    Enable live web search using the native --search flag

  • yoloboolean

    ⚠️ Bypass all safety (dangerous)

do-actвнешний мир

Выполни задачу через Codex, проверь shell-командой, при ошибке — автоматически исправь. Цикл Act-Check-Fix.

Параметры
  • fullAutoboolean

    Compatibility alias for workspace-write with approval=never

  • localProviderenum
  • maxRetriesinteger

    Max retry attempts if verify fails. Default: 2

  • modelstring

    Optional model override. Known: gpt-6-astra, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4-mini. If omitted, uses your Codex CLI default (~/.codex/config.toml).

  • ossboolean

    Use local Ollama/LM Studio

  • reasoningEffortenum

    Reasoning depth. Default: high (act-check-fix loops benefit from depth so retries converge). Override with "xhigh" for hard tasks, "medium" for simple verifiable steps.

  • sandboxModeenum

    Access: read-only, workspace-write, danger-full-access

  • taskstringобязательный

    Task for Codex to execute

  • timeoutnumber

    Codex timeout per attempt in ms. Default: 10min

  • verifyobject

    Shell command to validate result. Triggers act-check-fix loop on failure.

  • workingDirstring

    Working directory

fetch-chunkтолько чтениеидемпотентный

Извлекает кэшированные чанки из ответа changeMode. Используйте это для получения последующих чанков после получения частичного ответа changeMode.

Параметры
  • cacheKeystringобязательный

    The cache key provided in the initial changeMode response

  • chunkIndexnumberобязательный

    Which chunk to retrieve (1-based index)

healthтолько чтениеидемпотентныйвнешний мир

Проверяет состояние Codex CLI и сессии

Параметры
  • sessionIdstring

    Optional session ID to check specific session health

  • verboseboolean

    Include detailed diagnostic information

helpтолько чтениеидемпотентный

Получить справочную информацию

Параметры

Без параметров.

list-sessions

Выводит список всех активных сессий диалогов с метаданными, а также управляет сессиями.

Параметры
  • actionenum

    Action: list (default), delete (single session), clear (all sessions)

  • sessionIdstring

    Session ID for delete action

list-skillsтолько чтениеидемпотентный

Обнаружить доступные скиллы Codex из директории .agents/skills/

Параметры
  • workingDirstring

    Working directory to search for skills. Defaults to resolved working directory.

pingтолько чтениеидемпотентный

Echo

Параметры
  • promptstring

    Message to echo

review-changesтолько чтениеидемпотентныйвнешний мир

Выполнить код-ревью текущего репозитория с помощью встроенной команды ревью Codex CLI.

Параметры
  • basestring

    Review changes against a specific base branch (e.g., "main", "develop")

  • commitstring

    Review the changes introduced by a specific commit SHA

  • modelstring

    Optional model override. Known: gpt-6-astra, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4-mini. If omitted, uses your Codex CLI default (~/.codex/config.toml).

  • promptstring

    Custom review instructions or focus areas (cannot be used with uncommitted=true; use base/commit review instead)

  • reasoningEffortenum

    Reasoning depth for the review. Default: high (code review benefits from deep reasoning).

  • timeoutnumber

    Maximum execution time in milliseconds

  • titlestring

    Optional title to display in the review summary

  • uncommittedboolean

    Review staged, unstaged, and untracked changes (working tree) - cannot be combined with custom prompt

  • workingDirstring

    Working directory to run the review in (passed via -C as a global Codex option)

timeout-testтолько чтениеидемпотентный

Тестирует предотвращение тайм-аута, запускаясь на заданную длительность.

Параметры
  • durationnumberобязательный

    Duration in milliseconds (minimum 10ms)

versionтолько чтениеидемпотентныйвнешний мир

Показывает версию и информацию о системе

Параметры

Без параметров.

Похожие MCP-сервера

x51xxx/copilot-mcp-server

x51xxx/copilot-mcp-server

MCP сервер для подключения GitHub Copilot CLI к вашему редактору или ИИ-ассистенту. Позволяет выполнять неинтерактивные команды, анализировать код с @ссылками на файлы, проводить ревью, рефакторинг и пакетную обработку задач. Полезен разработчикам для автоматизации CI и ускорения работы с кодом.

TypeScript5
mumez/pharo-smalltalk-interop-mcp-server

mumez/pharo-smalltalk-interop-mcp-server

MCP-сервер для взаимодействия с локальным образом Pharo Smalltalk: выполняет код, ищет классы и методы, управляет пакетами, запускает тесты и отлаживает UI. Незаменим для разработчиков на Pharo, ра...

Python12
ydb/ydb-mcp

ydb/ydb-mcp

официальный

MCP-сервер для YDB: LLM выполняют SQL-запросы, анализируют планы и управляют объектами БД через естественный язык. Поддерживает аутентификацию и кастомные инструменты. Полезен разработчикам, работа...

Python29
srijanshukla18/xray

srijanshukla18/xray

XRAY даёт AI-ассистентам навигацию по коду: карту проекта, поиск символов и анализ влияния. Использует ast-grep для точного синтаксического поиска, поддерживает Python, JS/TS, Go. Без БД и LSP — лё...

Python52
nwiizo/tfmcp

nwiizo/tfmcp

MCP сервер tfmcp для Terraform позволяет AI-ассистентам читать конфигурации, анализировать планы, применять изменения и управлять состоянием. Включает анализ безопасности и модулей. Полезен DevOps-...

Rust371
alvii147/piston-mcp

alvii147/piston-mcp

Piston MCP Server - MCP-сервер для подключения LLM к Piston API для выполнения кода. Он даёт ИИ-ассистентам безопасно запускать скрипты на разных языках в песочнице. Полезен разработчикам ИИ-агенто...

Python9
© Каталог MCP, 2026. Все права защищены.
Проект не аффилирован с Anthropic и любыми упомянутыми продуктами.
Все названия и торговые марки принадлежат их владельцам.
Контакты для связи: hi@mcp-katalog.ru

Лука Никитин