mcp-openai-extended
Provides tools for interacting with OpenAI's API, supporting GPT-5 family, GPT-4o, and o1 series models for chat and code review tasks, with automatic endpoint selection (Responses API for Codex models, Chat Completions for others).
Click on "Deploy 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., "@mcp-openai-extendedReview this PHP code for vulnerabilities"
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.
MCP OpenAI Extended
Extended Model Context Protocol (MCP) server for OpenAI with GPT-5 family support, including specialized Codex models.
Features
✅ GPT-5 family support (gpt-5, gpt-5.1, gpt-5.2, chat-latest/pro/mini/nano/codex variants)
✅ GPT-4o and o1 series support
✅ Responses API support for Codex models (
*codex*)✅ Automatic API endpoint selection (Responses API for codex, Chat Completions for others)
✅ Works with Claude Desktop, Claude Code, and any MCP-compatible client
Related MCP server: OpenAI API MCP Server
Supported Models
GPT-5 Family
gpt-5-codex- Specialized for code and design reviews (default, uses Responses API)gpt-5.3-codexgpt-5.3-codex-sparkgpt-5.2-chat-latestgpt-5.2-progpt-5.2gpt-5.2-codexgpt-5.1-chat-latestgpt-5.1-codexgpt-5.1-codex-minigpt-5.1-codex-maxgpt-5.1gpt-5-chat-latestcodex-mini-latestgpt-5-progpt-5gpt-5-minigpt-5-nano
Note: Newer Codex model IDs may require account-level access before they work in API requests.
GPT-4 Series
gpt-4o- GPT-4 Omnigpt-4o-mini- Smaller GPT-4o
o1 Series
o1- Reasoning modelo1-preview- Reasoning model previewo1-mini- Smaller reasoning model
Installation
NPM (Recommended)
npm install -g @kent013/mcp-openai-extendedVia npx (GitHub)
npx github:kent013/mcp-openai-extendedLocal Development
git clone https://github.com/kent013/mcp-openai-extended.git
cd mcp-openai-extended
npm install
npm run buildConfiguration
⚠️ Security Warning
NEVER commit your API key to version control!
Keep your
OPENAI_API_KEYin environment variables or secure configuration filesAdd configuration files containing API keys to
.gitignoreIf you accidentally commit an API key, revoke it immediately at https://platform.openai.com/api-keys
Rotate your API keys regularly
Claude Desktop / Claude Code
Add to your .mcp.json or claude_desktop_config.json:
{
"mcpServers": {
"openai": {
"command": "npx",
"args": ["-y", "@kent013/mcp-openai-extended"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key-here"
}
}
}
}Local Development
{
"mcpServers": {
"openai": {
"command": "node",
"args": ["/path/to/mcp-openai-extended/dist/index.js"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key-here"
}
}
}
}Usage
The server provides a single tool: openai_chat
Default model is gpt-5-codex (automatically uses Responses API).
Example: Design Review with GPT-5.2 Codex (Default)
{
"name": "openai_chat",
"arguments": {
"messages": [
{
"role": "system",
"content": "You are an experienced system architect."
},
{
"role": "user",
"content": "Review this code:\n\n```php\n$user = User::find($id);\nMail::to($user->email)->send(new TestMail());\n```"
}
]
// model defaults to "gpt-5-codex"
}
}Example: General Reasoning with GPT-5 Chat Latest
{
"name": "openai_chat",
"arguments": {
"messages": [
{
"role": "user",
"content": "Explain quantum computing in simple terms"
}
],
"model": "gpt-5-chat-latest"
}
}API Endpoints
This server automatically selects the appropriate OpenAI API endpoint:
Responses API (
/v1/responses): For Codex models (*codex*)Chat Completions API (
/v1/chat/completions): For all other models (gpt-4o, gpt-5-chat-latest, etc.)
Environment Variables
OPENAI_API_KEY(required): Your OpenAI API key
Getting Your API Key
Create a new API key
Store it securely - never share or commit it to version control
Set appropriate usage limits to prevent unexpected charges
Best Practices
Use environment-specific API keys (development, staging, production)
Enable usage alerts in your OpenAI account
Regularly review API usage and rotate keys
Use OpenAI's API key restrictions feature to limit key permissions
Development
# Install dependencies
npm install
# Build
npm run build
# Run locally
node dist/index.jsContributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
Credits
Based on mcp-openai by mzxrai.
Extended to support GPT-5 family and specialized models.
Available Tools
1 toolopenai_chatC
Send messages to OpenAI using a specified model. Supports GPT-4o, o1, and GPT-5 series models.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model to use for completion (gpt-4o, gpt-4o-mini, o1, o1-preview, o1-mini, gpt-5/gpt-5.1/gpt-5.2 families, and codex variants) | gpt-5-codex |
| messages | Yes | Array of messages to send to the API |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden, yet it says nothing about cost, latency, rate limits, token/context limits, auth requirements, or whether calls are billed or stateful. It only names supported model families, which is closer to schema duplication than behavioral disclosure.
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-loaded with the core action; nothing is padded. The second sentence is mildly redundant with the enum in the schema but is not wasteful enough to penalize further.
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 two-parameter call with fully covered schema and no output schema, the description is minimally adequate. However, with zero annotations it should at least flag cost/rate-limit behavior or model-selection tradeoffs, which it omits.
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 both parameters (model enum and messages array with role/content) are already documented, establishing a baseline of 3. The description's mention of 'GPT-4o, o1, and GPT-5 series' merely restates a subset of the enum and adds no format, default, or selection semantics.
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?
States a clear verb (send) and resource (messages to OpenAI) with the model-selection dimension named. It distinguishes itself from any generic LLM-call sibling by naming the vendor, but there are no siblings to differentiate against and it doesn't clarify what the tool returns.
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?
No guidance on when to use this tool, when not to, or how to choose among the listed model families (e.g. cheap vs reasoning vs codex variants). The reader must infer usage entirely.
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.
1 tool update
v1.2.0- First observed
openai_chat
TDQS
Scored across 1 tool
With only a single tool, there is no possibility of misselection or overlap. The one tool's purpose is unambiguous.
openai_chat uses a clear, readable snake_case verb_noun convention that fits the provider prefix. With only one name there is no pattern to validate consistency against, so it cannot earn full marks.
A single tool is thin for a server explicitly branded as 'extended' with multi-model support. The count is defensible for a minimal chat wrapper but feels under-scoped for the stated purpose.
Core chat completion is covered, but obvious companions are missing: model listing/discovery, conversation or state management, and other OpenAI surfaces implied by 'extended'. Agents can do basic work but hit dead ends beyond a single completion call.
Maintenance
Related MCP Connectors
Synap (pool.linkrra.com/v1), Linkrra's OpenAI-compatible LLM API, as an MCP server.
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for OpenAI Sora AI video generation
Focused MCP server for OpenAI image/audio generation (v2.0.0). Wraps endpoints via HAPI CLI.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA server that integrates the MCP library with OpenAI's API, allowing users to interact with various tools, such as the weather tool, through natural language queries.MIT
- FlicenseNot gradedqualityDmaintenanceAn auto-generated MCP server that enables interaction with the OpenAI API, allowing users to access OpenAI's models and capabilities through the Multi-Agent Conversation Protocol.-
- AlicenseNot gradedqualityCmaintenanceA universal server that enables MCP-compatible clients (like Claude Desktop, Cursor, VS Code) to access OpenAI's APIs for chat completions, image generation, embeddings, and model listing through a standardized interface.5 npm7MIT
- FlicenseBqualityDmaintenanceProduction-ready MCP server that integrates OpenAI API with extensible tool support, enabling dynamic plugin loading and knowledge search capabilities through multiple interfaces including CLI and browser UI.2-