MCP Server Studio

Codex MCP Tool MCP server

MCP server bridging AI assistants to OpenAI Codex CLI for code analysis and review

Registry name: io.github.x51xxx/codex-mcp-tool

Publisher
x51xxx
Runs
Runs locally
Package
npm
Version
2.7.0
Category
Developer tools
Updated
2026-11-14

Source code on GitHub

Set up Codex MCP Tool (run locally)

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "codex-mcp-tool": {
      "command": "npx",
      "args": [
        "-y",
        "@trishchuk/[email protected]"
      ],
      "env": {
        "CODEX_MCP_CWD": "<CODEX_MCP_CWD>",
        "CODEX_SESSION_TTL_MS": "<CODEX_SESSION_TTL_MS>",
        "CODEX_MAX_SESSIONS": "<CODEX_MAX_SESSIONS>"
      }
    }
  }
}

Claude Code

Run in your terminal:

claude mcp add codex-mcp-tool -e CODEX_MCP_CWD='<CODEX_MCP_CWD>' -e CODEX_SESSION_TTL_MS='<CODEX_SESSION_TTL_MS>' -e CODEX_MAX_SESSIONS='<CODEX_MAX_SESSIONS>' -- npx -y @trishchuk/[email protected]

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "codex-mcp-tool": {
      "command": "npx",
      "args": [
        "-y",
        "@trishchuk/[email protected]"
      ],
      "env": {
        "CODEX_MCP_CWD": "<CODEX_MCP_CWD>",
        "CODEX_SESSION_TTL_MS": "<CODEX_SESSION_TTL_MS>",
        "CODEX_MAX_SESSIONS": "<CODEX_MAX_SESSIONS>"
      }
    }
  }
}

VS Code

Add to .vscode/mcp.json:

{
  "servers": {
    "codex-mcp-tool": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@trishchuk/[email protected]"
      ],
      "env": {
        "CODEX_MCP_CWD": "<CODEX_MCP_CWD>",
        "CODEX_SESSION_TTL_MS": "<CODEX_SESSION_TTL_MS>",
        "CODEX_MAX_SESSIONS": "<CODEX_MAX_SESSIONS>"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "codex-mcp-tool": {
      "command": "npx",
      "args": [
        "-y",
        "@trishchuk/[email protected]"
      ],
      "env": {
        "CODEX_MCP_CWD": "<CODEX_MCP_CWD>",
        "CODEX_SESSION_TTL_MS": "<CODEX_SESSION_TTL_MS>",
        "CODEX_MAX_SESSIONS": "<CODEX_MAX_SESSIONS>"
      }
    }
  }
}

Settings

NameRequiredWhat it is
CODEX_MCP_CWDNoOverride working directory for all tool calls
CODEX_SESSION_TTL_MSNoSession time-to-live in milliseconds (default: 86400000 = 24h)
CODEX_MAX_SESSIONSNoMaximum concurrent sessions (default: 50)

More developer tools MCP servers