openai-tool2mcp
herramienta openai-tool2mcp
openai-tool2mcp es un puente ligero y de código abierto que integra las potentes herramientas integradas de OpenAI como servidores del Protocolo de Contexto de Modelo (MCP). Permite utilizar herramientas OpenAI de alta calidad, como la búsqueda web y el intérprete de código, con Claude y otros modelos compatibles con MCP.
🔍 Utilice la robusta búsqueda web de OpenAI en la aplicación Claude
💻 Funcionalidad de intérprete de código de acceso en cualquier LLM compatible con MCP
🔄 Traducción de protocolos fluida entre OpenAI y MCP
🛠️ API sencilla para una fácil integración
🌐 Compatibilidad total con el SDK de MCP
¡Demostración de la integración de OpenAI Search con la aplicación Claude! 🚀
https://github.com/user-attachments/assets/f1f10e2c-b995-4e03-8b28-61eeb2b2bfe9
OpenAI intentó mantener sus poderosas herramientas optimizadas para LLM bloqueadas dentro de su propia plataforma de agentes, ¡pero no pudo detener el imparable movimiento de código abierto de MCP!
Related MCP server: OpenAI Agents MCP Server
El dilema del desarrollador
Los desarrolladores de IA se enfrentan actualmente a una difícil elección entre dos ecosistemas:
graph TD
subgraph "Developer's Dilemma"
style Developer fill:#ff9e64,stroke:#fff,stroke-width:2px
Developer((Developer))
end
subgraph "OpenAI's Ecosystem"
style OpenAITools fill:#bb9af7,stroke:#fff,stroke-width:2px
style Tracing fill:#bb9af7,stroke:#fff,stroke-width:2px
style Evaluation fill:#bb9af7,stroke:#fff,stroke-width:2px
style VendorLock fill:#f7768e,stroke:#fff,stroke-width:2px,stroke-dasharray: 5 5
OpenAITools["Built-in Tools<br/>(Web Search, Code Interpreter)"]
Tracing["Advanced Tracing<br/>(Visual Debugging)"]
Evaluation["Evaluation Dashboards<br/>(Performance Metrics)"]
VendorLock["Vendor Lock-in<br/>⚠️ Closed Source ⚠️"]
OpenAITools --> Tracing
Tracing --> Evaluation
OpenAITools -.-> VendorLock
Tracing -.-> VendorLock
Evaluation -.-> VendorLock
end
subgraph "MCP Ecosystem"
style MCPStandard fill:#7dcfff,stroke:#fff,stroke-width:2px
style MCPTools fill:#7dcfff,stroke:#fff,stroke-width:2px
style OpenStandard fill:#9ece6a,stroke:#fff,stroke-width:2px
style LimitedTools fill:#f7768e,stroke:#fff,stroke-width:2px,stroke-dasharray: 5 5
MCPStandard["Model Context Protocol<br/>(Open Standard)"]
MCPTools["MCP-compatible Tools"]
OpenStandard["Open Ecosystem<br/>✅ Interoperability ✅"]
LimitedTools["Limited Tool Quality<br/>⚠️ Less Mature (e.g., web search, computer use) ⚠️"]
MCPStandard --> MCPTools
MCPStandard --> OpenStandard
MCPTools -.-> LimitedTools
end
Developer -->|"Wants powerful tools<br/>& visualizations"| OpenAITools
Developer -->|"Wants open standards<br/>& interoperability"| MCPStandard
classDef highlight fill:#ff9e64,stroke:#fff,stroke-width:4px;
class Developer highlightopenai-tool2mcp cierra esta brecha al permitirle utilizar las herramientas maduras y de alta calidad de OpenAI dentro del ecosistema MCP abierto.
🌟 Características
Configuración sencilla : comience a funcionar con unos pocos comandos simples
Herramientas OpenAI como servidores MCP : integre las potentes herramientas integradas de OpenAI como servidores compatibles con MCP
Integración perfecta : funciona con Claude App y otros clientes compatibles con MCP
Compatible con MCP SDK : utiliza el SDK oficial de MCP Python
Soporte de herramientas :
🔍 Búsqueda web
💻 Intérprete de código
🌐 Navegador web
📁 Gestión de archivos
Código abierto : con licencia MIT, pirateable y extensible
🚀 Instalación
# Install from PyPI
pip install openai-tool2mcp
# Or install the latest development version
pip install git+https://github.com/alohays/openai-tool2mcp.git
# Recommended: Install uv for better MCP compatibility
pip install uvPrerrequisitos
Python 3.10+
Clave API de OpenAI con acceso a la API del Asistente
(Recomendado) Gestor de paquetes uv para compatibilidad con MCP
🛠️ Inicio rápido
Establezca su clave API de OpenAI :
export OPENAI_API_KEY="your-api-key-here"Inicie el servidor MCP con las herramientas OpenAI :
# Recommended: Use uv for MCP compatibility (recommended by MCP documentation)
uv run openai_tool2mcp/server_entry.py --transport stdio
# Or use the traditional method with the CLI
openai-tool2mcp start --transport stdioUsar con Claude para escritorio :
Configure su Claude for Desktop para usar el servidor editando claude_desktop_config.json:
{
"mcpServers": {
"openai-tools": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/your/openai-tool2mcp",
"run",
"openai_tool2mcp/server_entry.py"
]
}
}
}El archivo de configuración se encuentra en:
MacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonVentanas:
%AppData%\Claude\claude_desktop_config.json
💻 Ejemplos de uso
Configuración básica del servidor
# server_script.py
from openai_tool2mcp import MCPServer, ServerConfig, OpenAIBuiltInTools
# Configure with OpenAI web search
config = ServerConfig(
openai_api_key="your-api-key",
tools=[OpenAIBuiltInTools.WEB_SEARCH.value]
)
# Create and start server with STDIO transport (for MCP compatibility)
server = MCPServer(config)
server.start(transport="stdio")Ejecútelo con uv según lo recomendado por MCP:
uv run server_script.pyConfiguración compatible con MCP para Claude Desktop
Crear un script independiente:
# openai_tools_server.py
import os
from dotenv import load_dotenv
from openai_tool2mcp import MCPServer, ServerConfig, OpenAIBuiltInTools
# Load environment variables
load_dotenv()
# Create a server with multiple tools
config = ServerConfig(
openai_api_key=os.environ.get("OPENAI_API_KEY"),
tools=[
OpenAIBuiltInTools.WEB_SEARCH.value,
OpenAIBuiltInTools.CODE_INTERPRETER.value
]
)
# Create and start the server with stdio transport for MCP compatibility
server = MCPServer(config)
server.start(transport="stdio")Configurar Claude Desktop para usar este script con uv :
{
"mcpServers": {
"openai-tools": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/your/project/folder",
"run",
"openai_tools_server.py"
]
}
}
}📊 Cómo funciona
La biblioteca actúa como puente entre la API de OpenAI Assistant y el protocolo MCP:
sequenceDiagram
participant Claude as "Claude App"
participant MCP as "MCP Client"
participant Server as "openai-tool2mcp Server"
participant OpenAI as "OpenAI API"
Claude->>MCP: User query requiring tools
MCP->>Server: MCP request
Server->>OpenAI: Convert to OpenAI format
OpenAI->>Server: Tool response
Server->>MCP: Convert to MCP format
MCP->>Claude: Display result🔄 Integración del SDK de MCP
openai-tool2mcp ahora es totalmente compatible con el SDK de MCP. Puedes usarlo con la aplicación Claude para escritorio:
Instalación del paquete con
pip install openai-tool2mcpConfigurar su
claude_desktop_config.jsonpara incluir:
{
"mcpServers": {
"openai-tools": {
"command": "openai-tool2mcp",
"args": [
"start",
"--transport",
"stdio",
"--tools",
"retrieval",
"code_interpreter"
]
}
}
}El archivo de configuración se encuentra en:
MacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonVentanas:
%AppData%\Claude\claude_desktop_config.json
🤝 Contribuyendo
¡Agradecemos las contribuciones de la comunidad! Puedes ayudar de esta manera:
Bifurcar el repositorio
Clona tu bifurcación en tu máquina local
Crea una rama para tu característica o corrección de errores
Realice sus cambios y confirme
Empujar a su bifurcación y enviar una solicitud de extracción
Asegúrese de seguir nuestros estándares de codificación y agregar pruebas para cualquier característica nueva.
Configuración de desarrollo
# Clone the repository
git clone https://github.com/alohays/openai-tool2mcp.git
cd openai-tool2mcp
# Install in development mode
make install
# Run tests
make test
# Run linting
make lint📄 Licencia
Este proyecto está licenciado bajo la licencia MIT: consulte el archivo de LICENCIA para obtener más detalles.
🙏 Agradecimientos
Al equipo de OpenAI por sus excelentes herramientas y API
La comunidad MCP para desarrollar un estándar abierto para el uso de herramientas
Todos los colaboradores que han ayudado a mejorar este proyecto
⚠️ Estado del proyecto
Este proyecto está en desarrollo activo. Mientras la funcionalidad principal funcione, se esperan actualizaciones y mejoras frecuentes. Si encuentra algún problema, por favor, infórmenos en nuestro sistema de seguimiento de problemas .
openai-tool2mcp es parte de la iniciativa más amplia MCPortal para unir las herramientas de OpenAI con el ecosistema MCP de código abierto.
Available Tools
4 toolsbrowserC
Browse websites and interact with web content
| Name | Required | Description | Default |
|---|---|---|---|
| parameters | Yes |
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. It mentions 'browse' and 'interact' but doesn't specify whether this is read-only or allows mutations, what permissions or authentication might be needed, rate limits, or what 'interact' entails (e.g., clicking, form submission). It lacks critical behavioral details for a tool with web interaction capabilities.
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 concise with two short phrases: 'Browse websites' and 'interact with web content'. It's front-loaded with the core purpose, though it could be more structured. There's no wasted text, but it's under-specified rather than efficiently detailed.
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 the complexity of web browsing/interaction, no annotations, no output schema, and 0% schema coverage for the single parameter, the description is incomplete. It doesn't cover what the tool returns, how errors are handled, or the scope of interactions. For a tool with potential side effects and rich functionality, this is inadequate.
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?
The input schema has 1 parameter with 0% description coverage, and the description provides no information about parameters. It doesn't explain what 'parameters' should contain (e.g., URLs, actions, content), their format, or how they're used. For a single undocumented parameter, the description fails to add any semantic value beyond the schema.
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 'Browse websites and interact with web content' states a general purpose but lacks specificity. It mentions 'browse' and 'interact' as verbs with 'websites' and 'web content' as resources, but doesn't distinguish from sibling tools like 'web-search' or specify what type of interaction is possible. It's vague about scope and functionality.
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 versus alternatives like 'web-search' or other siblings. The description implies a general web browsing context but doesn't specify use cases, prerequisites, or exclusions. There's no mention of when-not-to-use or comparisons to other tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
code-executionC
Execute code and return the result
| Name | Required | Description | Default |
|---|---|---|---|
| parameters | Yes |
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. It states the tool executes code and returns a result, but lacks critical details such as execution environment (e.g., sandbox, permissions), safety implications (e.g., destructive effects, rate limits), or output format. This is a significant gap for a mutation tool with zero annotation coverage.
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 extremely concise with a single sentence 'Execute code and return the result', which is front-loaded and wastes no words. Every part of the sentence contributes to the core purpose, making it efficient in structure.
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 the complexity of code execution (a mutation tool with potential security implications), no annotations, no output schema, and incomplete parameter documentation, the description is insufficient. It should address execution context, safety, and result details to be complete enough for an AI agent to use correctly.
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?
The input schema has 1 parameter ('parameters') with 0% description coverage, so the schema provides no semantic information. The description adds no meaning beyond the schema, failing to explain what 'parameters' should contain (e.g., code string, language spec, arguments). For a tool with low schema coverage, this is inadequate compensation.
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 'Execute code and return the result' states a clear verb ('execute') and resource ('code'), but it's vague about what type of code (e.g., programming language, environment) and lacks differentiation from sibling tools like 'browser' or 'file-io' that might also involve execution. It's not tautological but misses specificity.
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 versus alternatives like 'browser' for web-based execution or 'file-io' for file operations. The description implies a general-purpose code execution but offers no context, exclusions, or prerequisites, leaving the agent to guess based on tool names alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
file-ioC
Search and access file content
| Name | Required | Description | Default |
|---|---|---|---|
| parameters | Yes |
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. 'Search and access file content' implies read operations, but it doesn't specify whether this tool can modify files, requires specific permissions, has rate limits, or what happens during errors. The description is too brief to provide meaningful behavioral context for safe invocation.
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 very concise with just three words, which is efficient. However, it's arguably under-specified rather than optimally concise—it could benefit from slightly more detail without becoming verbose. The structure is simple but lacks front-loading of critical 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?
Given no annotations, no output schema, and a parameter with 0% schema coverage, the description is incomplete. It doesn't compensate for the lack of structured data by explaining return values, error conditions, or parameter usage. For a tool with one parameter and potential file system interactions, this leaves significant gaps.
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?
The input schema has 1 parameter with 0% description coverage, and the tool description doesn't mention any parameters at all. The description 'Search and access file content' doesn't explain what the 'parameters' string should contain (e.g., file paths, search queries, access modes). This leaves the parameter completely undocumented.
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 'Search and access file content' states a general purpose (searching and accessing files) but lacks specificity about what resources it operates on (local files, remote files, specific file types) and doesn't clearly distinguish from sibling tools like 'browser' or 'web-search' which might also access content. It's vague about the exact scope of file operations.
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 versus alternatives like 'browser' or 'web-search'. The description doesn't mention any prerequisites, constraints, or typical use cases. It's left to the agent to infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
web-searchC
Search the web for real-time information
| Name | Required | Description | Default |
|---|---|---|---|
| parameters | Yes |
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. It mentions 'real-time information', hinting at dynamic data retrieval, but fails to describe critical traits like rate limits, authentication needs, or output format. For a tool with no annotation coverage, this is a significant gap in transparency.
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 zero waste. It is appropriately sized and front-loaded, clearly stating the tool's purpose without unnecessary elaboration. Every word 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?
Given the tool's complexity (web search with real-time data), lack of annotations, no output schema, and low parameter coverage, the description is incomplete. It does not address how results are returned, error handling, or integration with sibling tools, leaving the agent with insufficient context for effective use.
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 0%, and the description does not explain the single parameter 'parameters' beyond what the schema provides. It adds no meaning regarding what the parameter should contain (e.g., search query format) or how it influences the search. With low coverage and no compensatory details, the description falls short.
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 states the tool's purpose as 'Search the web for real-time information', which includes a specific verb ('Search') and resource ('the web'). However, it lacks differentiation from sibling tools like 'browser' or 'code-execution', leaving the agent to infer distinctions. The purpose is clear but not specific enough to distinguish it from alternatives.
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 no guidance on when to use this tool versus siblings such as 'browser' or 'file-io'. It implies usage for web searches but does not specify contexts, exclusions, or alternatives. This leaves the agent with minimal direction for tool selection.
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.
4 tool updates
v1.0.0- Changed
browser1 field changed- added
Input schema / titleAdded value: +"tool_handlerArguments"
- Changed
code-execution1 field changed- added
Input schema / titleAdded value: +"tool_handlerArguments"
- Changed
file-io1 field changed- added
Input schema / titleAdded value: +"tool_handlerArguments"
- Changed
web-search1 field changed- added
Input schema / titleAdded value: +"tool_handlerArguments"
4 tool updates
- First observed
browser - First observed
code-execution - First observed
file-io - First observed
web-search
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: browser for web interaction, code-execution for running code, file-io for file access, and web-search for information retrieval. There is no overlap in functionality, making tool selection straightforward for an agent.
The tools follow a consistent snake_case naming convention, but there is a minor deviation with 'file-io' using a hyphen instead of an underscore. Overall, the naming is readable and predictable, with clear verb-noun patterns like 'browser' and 'web-search'.
With 4 tools, the server is well-scoped for its purpose of providing general utility functions. Each tool serves a distinct and essential role, and the count is neither too sparse nor overwhelming, fitting typical utility server ranges.
The tool set covers key utility domains: web browsing, code execution, file access, and web search. Minor gaps might exist, such as lack of advanced file operations or specialized code environments, but agents can handle core tasks effectively with these tools.
Maintenance
Related MCP Connectors
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
Related MCP Servers
- AlicenseBqualityCmaintenanceA Model Context Protocol (MCP) server that lets you seamlessly use OpenAI's models right from Claude.1276 npm76MIT
- FlicenseBqualityDmaintenanceA Model Context Protocol server that enables Claude users to access specialized OpenAI agents (web search, file search, computer actions) and a multi-agent orchestrator through the MCP protocol.410-
- AlicenseNot gradedqualityDmaintenanceAn MCP server and local HTTP bridge designed to integrate remote upstream MCP tools into OpenClaw skills or local environments. It enables users to generate skill wrappers and proxy tool calls via a local HTTP bridge for use in Claude Desktop, Cursor, or OpenClaw.Apache 2.0
- AlicenseAqualityDmaintenanceMCP server that bridges OpenAI's Agents SDK with Claude Code, enabling web search, file search, and computer use capabilities directly in your development environment.29 npm1MIT