OpenAI MCP Server
Servidor MCP de OpenAI
Consulta modelos de OpenAI directamente desde Claude mediante el protocolo MCP. Esta bifurcación añade compatibilidad con los modelos o3-mini y gpt-4o-mini con un manejo de mensajes mejorado.
Instalación automática de Cline
Set up the MCP server from https://github.com/thadius83/mcp-server-openai.
Use "github.com/thadius83/mcp-server-openai" as the server name in cline_mcp_settings.json.
Analyse the readme and instructions below. Do not create new files in the repo, utilise the findings from pyproject.toml, src/mcp_server_openai/server.py, src/mcp_server_openai/llm.py
Once installed, demonstrate the server's capabilities by using one of its tools.
Installation Steps:
# Clone the repository
git clone https://github.com/thadius83/mcp-server-openai
cd mcp-server-openai
# Install the package
pip install .`
MCP Settings Configuration: The cline_mcp_settings.json should be configured with:
Correct server name format: "github.com/thadius83/mcp-server-openai"
Python module path structure for the server
PYTHONPATH environment variable pointing to the project directory
OpenAI API key passed as a command line argument
Example configuration:
{
"mcpServers": {
"github.com/thadius83/mcp-server-openai": {
"command": "python",
"args": [
"-m",
"src.mcp_server_openai.server",
"--openai-api-key",
"your-openai-api-key"
],
"env": {
"PYTHONPATH": "/path/to/mcp-server-openai"
},
"disabled": false,
"autoApprove": []
}
}
}
Requirements:
Python >= 3.10
OpenAI API key
Dependencies installed via pip (mcp>=0.9.1, openai>=1.0.0, click>=8.0.0, pytest-asyncio)
Available Tools:
Tool Name: ask-openai
Description: Ask OpenAI assistant models a direct question
Models Available:
o3-mini (default)
gpt-4o-mini
Input Schema:
{
"query": "Your question here",
"model": "o3-mini" // optional, defaults to o3-mini
}Related MCP server: SwiftOpenAI MCP Server
Características
Integración directa con la API de OpenAI
Soporte para múltiples modelos:
o3-mini (predeterminado): optimizado para respuestas concisas
gpt-4o-mini: Modelo mejorado para respuestas más detalladas
Formato de mensaje configurable
Manejo y registro de errores
Interfaz sencilla a través del protocolo MCP
Instalación
Instalación mediante herrería
Para instalar OpenAI MCP Server para Claude Desktop automáticamente a través de Smithery :
npx -y @smithery/cli install @thadius83/mcp-server-openai --client claudeInstalación manual
Clonar el repositorio :
git clone https://github.com/thadius83/mcp-server-openai.git
cd mcp-server-openai
# Install dependencies
pip install -e .Configurar Claude Desktop :
Agregue este servidor a su configuración de MCP existente. Nota: Conserve todos los servidores MCP existentes en la configuración; simplemente agregue este junto con ellos.
Ubicación:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonVentanas:
%APPDATA%/Claude/claude_desktop_config.jsonLinux: Verifique su directorio de inicio (
~/) para conocer la ubicación de la configuración predeterminada de MCP
{
"mcpServers": {
// ... keep your existing MCP servers here ...
"github.com/thadius83/mcp-server-openai": {
"command": "python",
"args": ["-m", "src.mcp_server_openai.server", "--openai-api-key", "your-key-here"],
"env": {
"PYTHONPATH": "/path/to/your/mcp-server-openai"
}
}
}
}Obtenga una clave API de OpenAI :
Visita el sitio web de OpenAI
Crea una cuenta o inicia sesión
Navegar a la configuración de la API
Generar una nueva clave API
Agregue la clave a su archivo de configuración como se muestra arriba
Reiniciar Claude :
Después de actualizar la configuración, reinicie Claude para que los cambios surtan efecto.
Uso
El servidor proporciona una única herramienta ask-openai , que permite consultar modelos OpenAI. Puede usarla directamente en Claude con el comando use_mcp_tool:
<use_mcp_tool>
<server_name>github.com/thadius83/mcp-server-openai</server_name>
<tool_name>ask-openai</tool_name>
<arguments>
{
"query": "What are the key features of Python's asyncio library?",
"model": "o3-mini" // Optional, defaults to o3-mini
}
</arguments>
</use_mcp_tool>Comparación de modelos
o3-mini (predeterminado)
Ideal para: respuestas rápidas y concisas
Estilo: Directo y eficiente
Ejemplo de respuesta:
Python's asyncio provides non-blocking, collaborative multitasking. Key features: 1. Event Loop – Schedules and runs asynchronous tasks 2. Coroutines – Functions you can pause and resume 3. Tasks – Run coroutines concurrently 4. Futures – Represent future results 5. Non-blocking I/O – Efficient handling of I/O operations
gpt-4o-mini
Ideal para: explicaciones más completas
Estilo: Detallado y minucioso.
Ejemplo de respuesta:
Python's asyncio library provides a comprehensive framework for asynchronous programming. It includes an event loop for managing tasks, coroutines for writing non-blocking code, tasks for concurrent execution, futures for handling future results, and efficient I/O operations. The library also provides synchronization primitives and high-level APIs for network programming.
Formato de respuesta
La herramienta devuelve respuestas en un formato estandarizado:
{
"content": [
{
"type": "text",
"text": "Response from the model..."
}
]
}Solución de problemas
Servidor no encontrado :
Verifique que PYTHONPATH en su configuración apunte al directorio correcto
Asegúrese de que Python y pip estén instalados correctamente
Intente ejecutar
python -m src.mcp_server_openai.server --openai-api-key your-key-heredirectamente para verificar si hay errores
Errores de autenticación :
Comprueba que tu clave API de OpenAI sea válida
Asegúrese de que la clave se pase correctamente en la matriz de argumentos
Verifique que no haya espacios ni caracteres adicionales en la clave
Errores del modelo :
Confirme que está utilizando modelos compatibles (o3-mini o gpt-4o-mini)
Comprueba que tu consulta no esté vacía
Asegúrese de no exceder los límites de tokens
Desarrollo
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest -v test_openai.py -sCambios respecto al original
Se agregó soporte para los modelos o3-mini y gpt-4o-mini
Formato de mensajes mejorado
Se eliminó el parámetro de temperatura para una mejor compatibilidad.
Documentación actualizada con ejemplos de uso detallados
Se agregaron ejemplos de comparación y respuesta de modelos
Instrucciones de instalación mejoradas
Se agregó una guía de solución de problemas
Licencia
Licencia MIT
Available Tools
1 toolask-openaiC
Ask my assistant models a direct question
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Ask assistant | |
| model | No | o3-mini |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It only states the action ('ask a direct question') without disclosing behavioral traits like response format, rate limits, authentication needs, or whether this is a read-only or mutative operation. This leaves significant gaps in understanding how the tool behaves.
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, efficient sentence with no wasted words. It's appropriately sized for a simple tool, though it could be more front-loaded with clearer purpose. The brevity is good, but it borders on under-specification.
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?
Given no annotations, no output schema, and 2 parameters with only 50% schema coverage, the description is incomplete. It doesn't explain return values, error handling, or key behavioral aspects. For a tool that likely interacts with AI models, more context is needed to understand its full scope and limitations.
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 50% (only 'query' has a description). The description adds no parameter semantics beyond what the schema provides. With 2 parameters and partial schema coverage, the baseline is 3 as the schema does some work, but the description doesn't compensate for the undocumented 'model' parameter.
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 'Ask my assistant models a direct question' states the action (ask) and target (assistant models), but is vague about what 'assistant models' refers to. It doesn't specify if this is for querying AI models, testing, or something else. Without sibling tools, differentiation isn't needed, but the purpose remains somewhat ambiguous.
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 is provided on when to use this tool. The description doesn't mention context, prerequisites, or alternatives. With no sibling tools, this is less critical, but there's still no indication of appropriate use cases or constraints.
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.0.0- First observed
ask-openai
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion or overlap between tools. The single tool 'ask-openai' has a clear and distinct purpose, making disambiguation perfect.
Since there is only one tool, naming consistency is inherently perfect. The tool name 'ask-openai' follows a verb_noun pattern, but with no other tools to compare, it cannot be inconsistent.
A single tool for an 'OpenAI MCP Server' feels too minimal for the apparent scope, which likely involves interacting with OpenAI's models. This is borderline inadequate, as it may limit functionality and require agents to work around gaps, scoring low due to the mismatch.
The tool surface is severely incomplete for an OpenAI server. It only allows asking questions to assistant models, missing obvious operations like listing models, generating text, handling images, or managing conversations, which are core to OpenAI's API capabilities.
Maintenance
Related MCP Connectors
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Authenticated MCP Agent (Openai)
Related MCP Servers
- AlicenseCqualityDmaintenanceQuery OpenAI models directly from Claude using MCP protocol.184MIT
- 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.13 npm7MIT
- FlicenseNot gradedqualityNot gradedmaintenanceEnables Claude and other MCP-compatible tools to communicate with OpenAI's GPT models (GPT-5, GPT-5-mini, o3) with conversation history and session management. Features advanced controls like reasoning effort settings, token tracking, and parallel conversation sessions for efficient AI workflows.11 npm-
- -licenseCqualityNot gradedmaintenanceEnables interaction with OpenAI-compatible APIs (like Ollama) through MCP tools. Provides access to chat completions, model listings, and embeddings generation from local or remote OpenAI-style endpoints.3-