OpenAI Tools
About
A wrapper for OpenAI's built-in tools, enabling functionalities like web search and code execution. Requires an OpenAI API key.
Details
- Author
- alohays
- Categories
- Productivity, Other, AI, Search, Knowledge Base
Jump to
MCP-Compatible Configuration for Claude Desktop
# 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")
Configure Claude Desktop to use this script withuv:
{ "mcpServers": { "openai-tools": { "command": "uv", "args": [ "--directory", "/absolute/path/to/your/project/folder", "run", "openai_tools_server.py" ] } } }
The library serves as a bridge between the OpenAI Assistant API and the MCP protocol:
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
openai-tool2mcpis now fully compatible with the MCP SDK. You can use it with the Claude for Desktop app by:
- Installing the package withpip install openai-tool2mcp
- Configuring yourclaude_desktop_config.jsonto include:
{ "mcpServers": { "openai-tools": { "command": "openai-tool2mcp", "args": [ "start", "--transport", "stdio", "--tools", "retrieval", "code_interpreter" ] } } }
- MacOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:%AppData%\Claude\claude_desktop_config.json
We welcome contributions from the community! Here's how you can help:
- Forkthe repository
- Cloneyour fork to your local machine
- Create a branchfor your feature or bugfix
- Make your changesand commit them
- Pushto your fork and submit apull request
Please make sure to follow our coding standards and add tests for any new features.
# 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
This project is licensed under the MIT License - see theLICENSEfile for details.
- The OpenAI team for their excellent tools and APIs
- The MCP community for developing an open standard for tool usage
- All contributors who have helped improve this project
This project is in active development. While the core functionality works, expect frequent updates and improvements. If you encounter any issues, please submit them on ourissue tracker.
openai-tool2mcp is part of the broaderMCPortalinitiative to bridge OpenAI's tools with the open-source MCP ecosystem.
A memory management server for Claude apps with optional AI-powered search, using local SQLite storage.
Claude Desktop job search assistant: searches LinkedIn + 8 ATS boards, scores each job 0-100 for fit, and shows a ranked board to triage.
X (Twitter) bookmarks MCP server: search, label, and manage your saved posts from Claude, ChatGPT, Cursor, or any MCP client.
Eagle MCP Server is a local Model Context Protocol bridge that lets AI assistants (e.g. Cursor, Claude) access your Eagle media library so you can tag, categorize, search, and batch-organize assets with natural language.
Word search, crossword, and sudoku generator MCP server with printable PDF worksheets, themed word banks, and verifiable LLM evals. Local-first, from the makers of puzzletide.com.
Structural AI Search Readiness MCP. Audit, dry-run fixes, rescore, doctor. No LLM rankings.
A context insertion and search server for Claude Desktop and Cursor IDE, using configurable API endpoints.
MCP server for Anthropic Claude Messages API β chat, vision, web search, extended thinking (Rust)
Manage and coordinate multiple Xcode/Swift projects with features like project tracking, smart search, and analytics.
Provides web search functionality powered by the Claude API from Anthropic.
openai-tool2mcpis a lightweight, open-source bridge that wraps OpenAI's powerful built-in tools as Model Context Protocol (MCP) servers. It enables you to use high-quality OpenAI tools like web search and code interpreter with Claude and other MCP-compatible models.
- πUse OpenAI's robust web search in Claude App
- π»Access code interpreter functionality in any MCP-compatible LLM
- πSeamless protocol translation between OpenAI and MCP
- π οΈSimple API for easy integration
- πFull compatibility with the MCP SDK
π OpenAI Search Integration Demo with Claude App! π
https://github.com/user-attachments/assets/f1f10e2c-b995-4e03-8b28-61eeb2b2bfe9
OpenAI tried to keep their powerful, LLM-optimized tools locked within their own agent platform, but they couldn't stop the unstoppable open-source movement of MCP!
AI developers currently face a challenging choice between two ecosystems:
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 highlight
openai-tool2mcpbridges this gap by letting you use OpenAI's mature, high-quality tools within the open MCP ecosystem.
- Easy Setup: Get up and running with a few simple commands
- OpenAI Tools as MCP Servers: Wrap powerful OpenAI built-in tools as MCP-compliant servers
- Seamless Integration: Works with Claude App and other MCP-compatible clients
- MCP SDK Compatible: Uses the official MCP Python SDK
- Tool Support:
- π Web Search
- π» Code Interpreter
- π Web Browser
- π File Management
# 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 uv
- Python 3.10+
- OpenAI API key with access to the Assistant API
- (Recommended) uv package manager for MCP compatibility
export OPENAI_API_KEY="your-api-key-here"
- Start the MCP server with OpenAI tools:
# 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 stdio
Configure your Claude for Desktop to use the server by editing the claude_desktop_config.json:
{ "mcpServers": { "openai-tools": { "command": "uv", "args": [ "--directory", "/absolute/path/to/your/openai-tool2mcp", "run", "openai_tool2mcp/server_entry.py" ] } } }
- MacOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:%AppData%\Claude\claude_desktop_config.json
# 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")
MCP-Compatible Configuration for Claude Desktop
# 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")
Configure Claude Desktop to use this script withuv:
{ "mcpServers": { "openai-tools": { "command": "uv", "args": [ "--directory", "/absolute/path/to/your/project/folder", "run", "openai_tools_server.py" ] } } }
The library serves as a bridge between the OpenAI Assistant API and the MCP protocol:
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
openai-tool2mcpis now fully compatible with the MCP SDK. You can use it with the Claude for Desktop app by:
- Installing the package withpip install openai-tool2mcp
- Configuring yourclaude_desktop_config.jsonto include:
{ "mcpServers": { "openai-tools": { "command": "openai-tool2mcp", "args": [ "start", "--transport", "stdio", "--tools", "retrieval", "code_interpreter" ] } } }
- MacOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:%AppData%\Claude\claude_desktop_config.json
We welcome contributions from the community! Here's how you can help:
- Forkthe repository
- Cloneyour fork to your local machine
- Create a branchfor your feature or bugfix
- Make your changesand commit them
- Pushto your fork and submit apull request
Please make sure to follow our coding standards and add tests for any new features.
# 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
This project is licensed under the MIT License - see theLICENSEfile for details.
- The OpenAI team for their excellent tools and APIs
- The MCP community for developing an open standard for tool usage
- All contributors who have helped improve this project
This project is in active development. While the core functionality works, expect frequent updates and improvements. If you encounter any issues, please submit them on ourissue tracker.
openai-tool2mcp is part of the broaderMCPortalinitiative to bridge OpenAI's tools with the open-source MCP ecosystem.
A memory management server for Claude apps with optional AI-powered search, using local SQLite storage.
Claude Desktop job search assistant: searches LinkedIn + 8 ATS boards, scores each job 0-100 for fit, and shows a ranked board to triage.
X (Twitter) bookmarks MCP server: search, label, and manage your saved posts from Claude, ChatGPT, Cursor, or any MCP client.
Eagle MCP Server is a local Model Context Protocol bridge that lets AI assistants (e.g. Cursor, Claude) access your Eagle media library so you can tag, categorize, search, and batch-organize assets with natural language.
Word search, crossword, and sudoku generator MCP server with printable PDF worksheets, themed word banks, and verifiable LLM evals. Local-first, from the makers of puzzletide.com.
Structural AI Search Readiness MCP. Audit, dry-run fixes, rescore, doctor. No LLM rankings.
A context insertion and search server for Claude Desktop and Cursor IDE, using configurable API endpoints.
MCP server for Anthropic Claude Messages API β chat, vision, web search, extended thinking (Rust)
Manage and coordinate multiple Xcode/Swift projects with features like project tracking, smart search, and analytics.
Provides web search functionality powered by the Claude API from Anthropic.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





