codex-cli-architect-mcp
Provides AI-powered coding assistance through Codex CLI, enabling technical consultation, code review, and code explanation using OpenAI's models.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@codex-cli-architect-mcpReview the auth middleware for security flaws"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
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
Node.js 18+
Codex CLI installed and logged in
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-mcpOther 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:
codex_consult - Technical consultation for architecture, design patterns, and implementation strategies
codex_review - Comprehensive code review for quality, security, and best practices
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 testLicense
MIT
Available Tools
3 toolscodex_consultB
Technical consultation for architecture decisions, design patterns, technology choices, and implementation strategies
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | AI model to use | |
| topic | Yes | Type of consultation | |
| context | No | Additional context about your situation | |
| question | Yes | Your technical question or design problem | |
| constraints | No | Technical constraints or requirements |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | AI model to use | |
| target | Yes | What to explain - feature/component (e.g., "authentication flow"), Git context (e.g., "recent commits", "changes in PR"), or concept | |
| languages | No | Programming languages involved (e.g., ["javascript", "sql"]) |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| focus | No | Specific areas to focus on | |
| model | No | AI model to use | |
| target | Yes | What 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 | |
| languages | No | Programming languages involved (e.g., ["typescript", "python"]) |
TDQS
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.
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.
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.
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.
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.
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.
3 tool updates
v0.2.1- First observed
codex_consult - First observed
codex_explain - First observed
codex_review
TDQS
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.
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.
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.
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
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
An MCP server that gives your AI access to the source code and docs of all public github repos
A paid remote MCP for OpenAI Codex memory MCP, built to return verdicts, receipts, usage logs, and a
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceAn 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.1145MIT
- FlicenseBqualityNot gradedmaintenanceAn 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.47651-
- AlicenseNot gradedqualityFmaintenanceAn MCP server that allows Claude Code to interact with the OpenAI Codex CLI.2921MIT
- AlicenseNot gradedqualityCmaintenanceAn 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.8MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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