OpenAI Agents MCP server

Exposes OpenAI's agent capabilities for web search, file search, and computer actions through specialized agents and a multi-agent orchestrator that coordinates between them based on task requirements.
Back to servers
Provider
Eric Wang
Release date
Mar 18, 2025
Language
Python
Stats
6 stars

This MCP server implements the Model Context Protocol to expose OpenAI agents functionality, allowing you to interact with specialized AI agents through any MCP client, including the Claude desktop app. It provides access to web search, file search, and computer action capabilities through both individual specialized agents and a multi-agent orchestrator.

Installation

Prerequisites

  • Python 3.11 or higher
  • uv package manager (recommended)
  • OpenAI API key

Installing via Smithery

To install the server automatically via Smithery:

npx -y @smithery/cli install @lroolle/openai-agents-mcp-server --client claude

Manual Configuration for Claude Desktop

Add the following to your Claude Desktop configuration:

"mcpServers": {
  "openai-agents-mcp-server": {
    "command": "uvx",
    "args": ["openai-agents-mcp-server"],
    "env": {
        "OPENAI_API_KEY": "your-api-key-here"
    }
  }
}

Usage

Available Agents

The server provides access to these specialized agents:

  • Web Search Agent: Searches the web for real-time information
  • File Search Agent: Searches and analyzes files in OpenAI's vector store
  • Computer Action Agent: Performs actions on your computer safely
  • Orchestrator Agent: Coordinates between the specialized agents

Configuration Options

Configure the server using environment variables:

  • OPENAI_API_KEY: Your OpenAI API key (required)
  • MCP_TRANSPORT: Transport protocol to use (default: "stdio", can be "sse")

Tool Parameters

When using the agents, note these requirements:

  • Web Search Tool: No required parameters, but accepts optional location context
  • File Search Tool: Requires vector_store_ids (IDs from your OpenAI vector stores)
  • Computer Tool: Requires an AsyncComputer implementation

Testing with MCP Inspector

To test the server using the MCP Inspector:

# Run the server with SSE transport
export OPENAI_API_KEY=your-api-key
export MCP_TRANSPORT=sse

uv run mcp dev src/agents_mcp_server/server.py

Then open a web browser and navigate to http://localhost:5173.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later