home / mcp / openai websearch mcp server

OpenAI WebSearch MCP Server

openai websearch tool as mcp server

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "conechoai-openai-websearch-mcp": {
      "command": "uvx",
      "args": [
        "openai-websearch-mcp"
      ],
      "env": {
        "PYTHONPATH": "/path/to/your/project/src",
        "OPENAI_API_KEY": "YOUR_API_KEY",
        "OPENAI_DEFAULT_MODEL": "gpt-5-mini"
      }
    }
  }
}

This MCP server provides intelligent web search capabilities powered by OpenAI reasoning models, enabling your AI assistants to perform fast iterations or deep research with up-to-date information and localized results. It is designed to be easy to deploy alongside your existing tooling and to adapt to different workflows using configurable environment variables and multiple execution modes.

How to use

You will interact with the openai_websearch_mcp through your MCP client to perform web searches with smart reasoning. Start by configuring one or more MCP servers, then issue natural language queries to your assistant. The assistant will automatically select the appropriate model and reasoning effort based on your request, returning results, summaries, and any relevant context from the web search.

How to install

Prerequisites you need before installation: an MCP client (such as Claude Desktop, Cursor, or another MCP host) and a compatible runtime for the chosen installation path.

Option A β€” Using uvx (recommended) and a quick start command:

OPENAI_API_KEY=sk-xxxx uvx --with openai-websearch-mcp openai-websearch-mcp-install

Replace sk-xxxx with your actual OpenAI API key.

Option B β€” Install via pip and run directly with Python:

pip install openai-websearch-mcp
# Run the server
python -m openai_websearch_mcp

Option C β€” From source (for development or custom setup):

# Clone the repository
git clone https://github.com/yourusername/openai-websearch-mcp.git
cd openai-websearch-mcp

# Install dependencies
uv sync

# Run in development mode
uv run python -m openai_websearch_mcp

Configuration notes

You can configure the MCP server in your client’s environment to provide the API key and default model, allowing smooth integration with your existing setup.

Additional sections

The server supports multiple ways to run and configure the MCP, including environment variable overrides for quick deployments and Local Development modes for testing with a virtual environment.

Available tools

openai_web_search

Intelligent web search with reasoning model support. Parameters include input, model, reasoning_effort, type, search_context_size, and user_location.