home / mcp / openai agents mcp server
OpenAI Agents And Tools as MCP Server
Configuration
View docs{
"mcpServers": {
"lroolle-openai-agents-mcp-server": {
"url": "https://mcp.example.com/openai-agents-mcp-server",
"headers": {
"OPENAI_API_KEY": "your-api-key-here"
}
}
}
}You can run OpenAI agents as MCP endpoints to perform web searches, file analyses, and even safe computer actions, all orchestrated through a unified MCP interface. This makes it easy to plug these specialized agents into any MCP client and compose multi-agent workflows without exposing your internal tooling.
You connect your MCP client to the available server endpoints to access three specialized agents and a coordinating orchestrator. The Web Search Agent can fetch real-time information from the web, the File Search Agent can search and analyze content stored in OpenAI vector stores, and the Computer Action Agent can perform safe actions on your computer. The Orchestrator Agent coordinates tasks across these specialized agents to choose the best tool for each step of a workflow. Use the MCP client to issue tasks, route results between agents, and chain actions into larger automation pipelines.
Prerequisites You need Python 3.11 or higher, the uv package manager, and an OpenAI API key.
Install via Smithery You can install the MCP server for Claude Desktop automatically with this command:
npx -y @smithery/cli install @lroolle/openai-agents-mcp-server --client claudeConfigure and run locally with UVX If you are running locally, start the server using the provided standard IO (stdio) configuration shown in the example below. Ensure your environment provides your OpenAI API key.
Connection can be via a local stdio process or an HTTP-based remote endpoint depending on how you set it up. The server expects an OpenAI API key and can be started with a command like uvx openai-agents-mcp-server. In a typical local setup you would expose the MCP endpoints to your client by launching the stdio server and wiring your MCP client to it.
- Keep your OpenAI API key secure. Use environment variable management to avoid exposing keys in logs or code. - If you plan to customize behavior, consider implementing a full AsyncComputer interface to enable real computer interactions beyond simulation. - The Orchestrator Agent is designed to coordinate between the Web Search, File Search, and Computer Action agents to handle complex, multi-step tasks efficiently.
If the MCP client cannot connect, verify that the server is running with the expected command and that the OPENAI_API_KEY environment variable is set. Check that the transport method (stdio or sse) matches what your MCP client expects and that the server is accessible at the configured path.
Limit access to the MCP endpoints by using secure transports when possible and by keeping the API key in a secure vault. If you enable the Orchestrator to perform file or system actions, ensure appropriate constraints and auditing are in place to prevent unintended operations.
- Web searches to gather real-time information for a task. - File analysis against content stored in a vector store. - Coordinated multi-step tasks where the orchestrator delegates subtasks to the appropriate specialized agents.
Agent to search the web for real-time information with optional location context.
Agent to search and analyze files in OpenAI's vector stores.
Agent to perform actions on your computer in an asynchronous, simulated manner.
Coordinating agent that routes tasks to specialized agents and manages multi-step workflows.