Skip to main content
Glama
itto-ki
by itto-ki

Codex CLI Architect MCP

An MCP (Model Context Protocol) server implementation for OpenAI's Codex CLI, enabling AI-powered coding assistance through standardized tool interfaces.

npm version License: MIT

Features

  • Technical Consultation: Get expert advice on architecture, design patterns, and technology choices

  • Code Review: Comprehensive code quality and security analysis

  • Code Explanation: Clear explanations of code snippets and programming concepts

  • Read-Only File Access: Can read files in the current workspace (directory and subdirectories)

  • Write Protection: Uses Codex CLI's read-only sandbox mode to prevent file modifications

  • Sandboxed Execution: Runs with platform-specific sandboxing (Apple Seatbelt on macOS, Landlock/seccomp on Linux)

  • No Code Modification: Focuses on analysis and advice, not code generation

Related MCP server: Codex MCP Server

Prerequisites

Usage with MCP Clients

Claude Code

Register the MCP server with Claude Code:

# Using NPM package
claude mcp add codex -- npx codex-cli-architect-mcp

# With custom model configuration
claude mcp add codex -e CODEX_MODEL=gpt-5 -- npx codex-cli-architect-mcp

# With OpenAI API key
claude mcp add codex -e OPENAI_API_KEY=your-api-key-here -- npx codex-cli-architect-mcp

Other MCP Clients

Configure the MCP server in your client's settings file:

{
    "mcpServers": {
        "codex": {
            "command": "npx",
            "args": ["codex-cli-architect-mcp"],
            "env": {
                "OPENAI_API_KEY": "your-api-key-here",
                "CODEX_MODEL": "gpt-5",
                "CODEX_TIMEOUT": "300000"
            }
        }
    }
}

Available Tools

The MCP server provides the following tools:

  1. codex_consult - Technical consultation for architecture, design patterns, and implementation strategies

  2. codex_review - Comprehensive code review for quality, security, and best practices

  3. codex_explain - Get clear explanations of code snippets or programming concepts

These tools are exposed through the MCP protocol and can be used by any MCP-compatible client.

Configuration

Environment variables:

  • OPENAI_API_KEY - OpenAI API key for authentication (optional, uses ChatGPT login if not provided)

  • CODEX_MODEL - Model to use (default: gpt-5)

  • CODEX_TIMEOUT - Execution timeout in milliseconds (default: 300000)

Development

# Install dependencies
npm install

# Build
npm run build

# Development mode
npm run dev

# Run tests
npm test

License

MIT

Available Tools

3 tools
codex_consultB

Technical consultation for architecture decisions, design patterns, technology choices, and implementation strategies

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoAI model to use
topicYesType of consultation
contextNoAdditional context about your situation
questionYesYour technical question or design problem
constraintsNoTechnical constraints or requirements

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Technical consultation' implies an advisory, read-only activity, but the description does not state whether this tool modifies anything, what kind of response it returns, whether it invokes external models, or what limitations apply. For an unannotated tool this is a significant transparency gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler words. It efficiently communicates the core purpose and consulting domains. It could add more detail while remaining concise, but as written it is appropriately compact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and no output schema, the description needs to provide enough context for an agent to select and invoke the tool correctly. It does not describe return values, side-effect profile, or how this tool differs from codex_review and codex_explain. The schema covers parameters well, but the overall contextual picture is incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the parameters are already well documented by the schema. The description's domain list roughly mirrors the topic enum values, but it does not add meaningful detail beyond what the schema already provides. The baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool as providing technical consultation and specifies the domains: architecture decisions, design patterns, technology choices, and implementation strategies. This is more informative than the bare name and gives an agent a solid sense of the tool's purpose, though it does not explicitly differentiate it from the sibling tools codex_explain and codex_review.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The listed consultation areas imply when the tool should be used, but there is no explicit guidance about when to prefer it over codex_explain or codex_review, and no mention of exclusions or alternative tools. The context is clear but the routing to alternatives is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

codex_explainA

Explain code, features, or changes. Codex examines the implementation, Git history, or conceptual design to provide comprehensive explanations

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoAI model to use
targetYesWhat to explain - feature/component (e.g., "authentication flow"), Git context (e.g., "recent commits", "changes in PR"), or concept
languagesNoProgramming languages involved (e.g., ["javascript", "sql"])

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral disclosure burden. It does convey useful behavior: Codex examines implementation, Git history, or conceptual design and returns comprehensive explanations. It does not explicitly state that the operation is read-only or mention access requirements, response format, or limitations, leaving some transparency gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences front-load the core purpose and then explain what Codex examines and what the user receives. There is no filler, and every clause adds meaningful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with three documented parameters, the description covers the key invocation details. It is incomplete in that it does not relate this tool to its siblings or clarify the expected shape of the returned explanation, and there is no output schema to fill that gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description loosely reinforces the 'target' parameter by echoing its allowed categories (code, features, changes, Git context, concept), but it adds no new parameter-level detail beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Explain code, features, or changes.' It also names the investigation sources (implementation, Git history, conceptual design), making the tool's purpose clear. It does not explicitly distinguish itself from the sibling tools codex_consult and codex_review, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implied guidance: use this tool when a comprehensive explanation of code, features, changes, Git history, or design is needed. However, it never states when not to use it or how it differs from codex_consult and codex_review, so the routing decision is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

codex_reviewA

Review code for a feature, component, or Git changes. Codex analyzes the relevant implementation or modified files, providing contextual feedback and improvement suggestions

ParametersJSON Schema
NameRequiredDescriptionDefault
focusNoSpecific areas to focus on
modelNoAI model to use
targetYesWhat to review - feature/component (e.g., "user authentication"), or Git context (e.g., "git diff", "staged changes", "changes in feature-branch"). Codex will identify relevant files automatically
languagesNoProgramming languages involved (e.g., ["typescript", "python"])

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure, and it handles this well: it states that Codex analyzes relevant files automatically and produces contextual feedback and improvement suggestions. It does not mention potential side effects, permissions, or output format, but for a read-oriented code review tool the described behavior is largely sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences with no filler. The primary action and target scope are front-loaded, and the behavioral outcome is stated in the second sentence. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is sufficiently complete for a tool with four well-documented parameters and no output schema: it explains the input target types and the expected result of the review. It could be stronger with explicit guidance about when to prefer this tool over codex_explain or codex_consult, but the core invocation context is adequately covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all four parameters including target's examples and the automatic file-identification behavior. The top-level description adds no new parameter-level meaning beyond what is already in the schema, so it stays at the baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Review code') and the resource ('a feature, component, or Git changes'), making the tool's purpose immediately understandable. It does not explicitly differentiate from sibling tools codex_explain and codex_consult, but the review-specific language is distinct enough for a competent agent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool by listing valid targets: feature, component, or Git changes. However, it provides no explicit exclusions or comparison to alternatives such as codex_explain or codex_consult, leaving the agent to infer the boundary between these tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv0.2.1
    • First observedcodex_consult
    • First observedcodex_explain
    • First observedcodex_review

TDQS

A3.6/5.0
Disambiguation4/5

The three tools are largely distinct: consult is clearly separate, while explain and review both analyze code but differ in intent (understanding vs. critique). This boundary is clear enough for most cases, though explain and review could still be confused in edge scenarios.

Naming Consistency5/5

All tool names follow the same predictable pattern: codex_ prefix plus a lowercase imperative verb in snake_case. The naming is consistent and each verb clearly reflects the tool's purpose.

Tool Count4/5

Three tools is at the low end of the typical range, but each covers a distinct architect-focused activity: explain, consult, and review. The count is reasonable for a narrow assistant, though a broader architecture server could justify more tools.

Completeness4/5

The toolset covers core advisor-style workflows: understanding code, getting technical guidance, and reviewing changes. It lacks generative or planning tools, but that appears acceptable for an architect/consultant role rather than an active coding agent.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    An MCP server that wraps OpenAI's Codex CLI to automate repository cloning and code analysis tasks. It enables users to execute complex coding requests on specific Git branches and subfolders using standardized MCP tools.
    11
    45
    MIT
  • F
    license
    B
    quality
    Not graded
    maintenance
    An MCP server for the OpenAI Codex CLI that provides coding assistance with multi-turn session management and reasoning depth control. It enables users to perform code analysis, generation, and refactoring through Claude with native resume support for conversational context.
    4
    765
    1
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that integrates Google Gemini CLI with Claude Code for AI-powered development assistance, enabling code review, bug analysis, feature planning, and code explanation without requiring an API key.
    8
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/itto-ki/codex-cli-architect-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server