openai-agents-mcp
Provides web search, file search, and computer use capabilities powered by OpenAI's Agents SDK, enabling AI agents to search the web, analyze files, and interact with computer interfaces.
Click on "Install 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., "@openai-agents-mcpsearch the web for the latest AI developments"
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.
OpenAI Agents MCP ๐ค
A Model Context Protocol (MCP) server that bridges OpenAI's Agents SDK with Claude Code and other MCP clients. Enable powerful AI agent capabilities including web search, file search, and computer use directly in your development environment.
๐ Quick Start
npx openai-agents-mcpThat's it! The server will start and be ready to accept MCP connections.
Related MCP server: personal-mcp
๐ฏ Features
๐ Web Search - Search the web using OpenAI's integrated web search capability
๐ File Search - Analyze and search through files with AI-powered understanding
๐ป Computer Use - Interact with computer interfaces (preview feature, requires tier 3-5)
โก Real-time Streaming - Stream responses for better user experience
๐ง Claude Code Ready - Works seamlessly with Claude Code via stdio transport
๐งช Test-Driven - Comprehensive test suite with high coverage
๐ฆ NPX Compatible - Run directly without installation
๐ Prerequisites
Node.js 18.0.0 or higher
OpenAI API key
For computer use: OpenAI usage tier 3-5
๐ง Installation & Setup
Option 1: NPX (Recommended)
No installation needed! Just run:
npx openai-agents-mcpOption 2: Global Installation
npm install -g openai-agents-mcp
openai-agents-mcpOption 3: From Source
git clone https://github.com/merlinrabens/openai-agents-mcp.git
cd openai-agents-mcp
npm install
npm run build
npm startโ๏ธ Configuration
Environment Variables
Create a .env file in your project root:
# Required
OPENAI_API_KEY=sk-...your-key-here
# Optional
OPENAI_ORGANIZATION=org-... # Your org ID
ENABLE_COMPUTER_USE=true # Enable computer use (requires tier 3-5)
LOG_LEVEL=info # debug | info | warn | errorClaude Code Integration
Add to your Claude Code configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"openai-agents": {
"command": "npx",
"args": ["openai-agents-mcp"],
"env": {
"OPENAI_API_KEY": "sk-...your-key-here"
}
}
}
}Then restart Claude Code to activate the server.
๐ก Usage Examples
Once configured, you can use these commands in Claude Code:
Web Search
Use the web_search tool to find the latest news about AI developmentsFile Search
Use the file_search tool to analyze this codebase and find all API endpointsComputer Use (if enabled)
Use the computer_use tool to take a screenshot of the current screen๐๏ธ Architecture
โโโโโโโโโโโโโโโ MCP Protocol โโโโโโโโโโโโโโโโ OpenAI API โโโโโโโโโโโโ
โ Claude Code โ โโโโโโโโโโโโโโโโโโโโบ โ This Server โ โโโโโโโโโโโโโโโโโโโบ โ OpenAI โ
โ or other โ stdio/HTTP โ โ Agents SDK โ Agents โ
โ MCP Client โ โ โ โ โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโKey Components
MCP Server Core - Handles MCP protocol using
@modelcontextprotocol/sdkOpenAI Integration - Uses
@openai/agentsSDK for agent capabilitiesTool Translation - Maps MCP tool calls to OpenAI function calls
Stream Handler - Manages real-time streaming responses
Error Handler - Provides retry logic and graceful error handling
๐งช Development
Setup Development Environment
# Clone the repository
git clone https://github.com/merlinrabens/openai-agents-mcp.git
cd openai-agents-mcp
# Install dependencies
npm install
# Run in development mode
npm run devAvailable Scripts
npm run dev # Development mode with hot reload
npm test # Run test suite
npm run test:watch # Run tests in watch mode
npm run test:coverage # Generate coverage report
npm run build # Build for production
npm run lint # Run ESLint
npm run format # Format with PrettierProject Structure
src/
โโโ server/ # MCP server implementation
โ โโโ index.ts # Main server class
โโโ openai/ # OpenAI Agents SDK integration
โ โโโ client.ts # OpenAI client wrapper
โโโ tools/ # Tool definitions
โโโ config/ # Configuration management
โโโ utils/ # Utilities and helpers
tests/ # Test suite
bin/ # CLI entry point
examples/ # Usage examples๐ Testing
The project follows Test-Driven Development (TDD) principles:
# Run all tests
npm test
# Watch mode for development
npm run test:watch
# Coverage report
npm run test:coverageCurrent test coverage: ~71%
๐ฐ Pricing
This server uses OpenAI's API, which has the following pricing (as of March 2025):
Input: $3 per 1M tokens
Output: $12 per 1M tokens
Computer Use: Research preview (requires tier 3-5)
๐ค Contributing
Contributions are welcome! Please follow these guidelines:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Write tests first (TDD approach)
Implement your feature
Ensure all tests pass
Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
๐ License
MIT License - see LICENSE file for details
๐ Acknowledgments
Built with:
Model Context Protocol SDK - The MCP protocol implementation
OpenAI Agents SDK - OpenAI's agent framework
Claude Code - Anthropic's AI-powered development environment
๐ Troubleshooting
Server won't start
Ensure
OPENAI_API_KEYis set correctlyCheck Node.js version is 18.0.0 or higher
Run
npm run buildif running from source
Claude Code doesn't see the server
Restart Claude Code after updating configuration
Check the configuration file path is correct
Verify the server starts without errors:
npx openai-agents-mcp
Computer use not working
Verify your OpenAI account is tier 3-5
Set
ENABLE_COMPUTER_USE=truein environment
๐ง Support
Issues: GitHub Issues
Discussions: GitHub Discussions
Author: Merlin Rabens
๐ฆ Status
โ Web Search - Fully functional
โ File Search - Fully functional
โ ๏ธ Computer Use - Preview (requires tier 3-5)
๐ง OpenAI Agents SDK - Preview as of March 2025
Note: The OpenAI Agents SDK is currently in preview. Features and pricing may change. The deprecated Assistants API will be sunset by mid-2026 in favor of the Agents SDK.
Available Tools
2 toolsfile_searchFile SearchC
Search and analyze files using OpenAI's file search capability
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | What to search for in files | |
| file_paths | No | Specific file paths to search |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full weight but fails to disclose behavioral traits such as whether it modifies state, requires authentication, what happens on failure, or the nature of the 'analysis'. The term 'analyze' suggests more than search but is unexplained.
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, front-loaded sentence. It directly states the purpose without extraneous information, though it could be more precise.
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 lack of output schema and annotations, the description is insufficient. It does not explain return values, scope of search, supported file types, or what 'analyze' entails. A search tool should provide more context on how results are presented.
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 the schema already describes both parameters. The description adds no new meaning beyond 'search and analyze', which does not elaborate on the parameters' usage or constraints. Baseline 3 is appropriate.
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 clearly states the verb 'search and analyze' and the resource 'files', distinguishing it from the sibling 'web_search' which searches web content. However, 'using OpenAI's file search capability' is somewhat vague about the exact mechanism.
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 the sibling 'web_search'. The description does not mention prerequisites, limitations, or typical use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
web_searchWeb SearchA
Search the web for information using OpenAI's web search capability
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query |
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. It only states the basic function without disclosing any behavioral traits like result format, rate limits, or limitations.
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 sentence with no unnecessary information, achieving maximum conciseness while still conveying the core purpose.
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 single-parameter tool with no output schema, the description is adequate but lacks context on result expectations or any constraints. It could benefit from explaining what kind of results to expect or how it differs from file_search.
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% for the single parameter 'query'. The tool description adds no additional meaning beyond what the schema already provides, so baseline 3 is appropriate.
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 clearly states the verb (search), resource (web), and scope (for information). It distinguishes from sibling file_search by focusing on web content.
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 explicit guidelines for when to use this tool versus alternatives. It is implied for web searches but lacks context for when to prefer web_search over file_search or vice versa.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
The two tools are clearly distinct: one searches files, the other searches the web. There is no overlap in purpose.
Both tools follow the same 'noun_verb' pattern (file_search, web_search), which is consistent and predictable.
With only two tools, the server is very lean but still appropriate for a focused search functionality. It covers the basics without unnecessary bloat.
For a server named 'openai-agents-mcp', one might expect additional agent-related tools beyond search (e.g., text generation, function calling). The current set is minimal and may leave agents without key capabilities.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- 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
- FlicenseNot gradedqualityAmaintenanceMCP server that bridges coding agents (Claude Code, Codex, Gemini CLI) via ACP for pair programming, enabling agents to consult each other as tools.
- AlicenseNot gradedqualityCmaintenanceA universal MCP server for spawning agents with any OpenAI-compatible LLM, supporting cloud and local models, and integrating with Claude Code, OpenCode, and Codex CLI.MIT
- AlicenseAqualityDmaintenanceAn MCP server that bridges Claude Desktop and Claude Code by letting Desktop read and interact with Claude Code Remote Control sessions, enabling cross-agent coordination.63MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/merlinrabens/openai-agents-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server