codex-cli-architect-mcp
An MCP server that provides technical consultation, code review, and code explanation by integrating with OpenAI's Codex CLI, enabling AI-powered coding assistance in a sandboxed, read-only environment.
README
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
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-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:
- 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 test
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.