MCP HubMCP Hub
ConechoAI

openai-websearch-mcp

by: ConechoAI

openai websearch tool as mcp server

34created 12/03/2025
Visit
openai
websearch

📌Overview

Purpose: To enable AI assistants to perform web searches during user interactions, providing immediate and relevant information not present in their training data.

Overview: The OpenAI WebSearch MCP Server accesses OpenAI's websearch capabilities via the Model Context Protocol. It is designed for integration with tools like Claude.app and Zed editor, allowing for real-time information retrieval during conversations.

Key Features:

  • Web Search Tool: Facilitates web searches from within conversations, offering fresh and relevant data by allowing configuration of search parameters such as context size and user location.

  • Easy Installation: Provides a straightforward one-click installation process and configuration options, compatible with various environments including uvx and pip.


OpenAI WebSearch MCP Server

This MCP server provides access to OpenAI's websearch functionality through the Model Context Protocol. It enables AI assistants to search the web during conversations, providing up-to-date information beyond their training data. The server can be installed and configured for use with Claude.app or Zed editor.

One-Click Installation & Configuration

Claude

You can auto-update the configuration file with this recommended command:

OPENAI_API_KEY=sk-xxxx uv run --with uv --with openai-websearch-mcp openai-websearch-mcp-install

Replace sk-xxxx with your OpenAI API key, available on OpenAI's platform.

Cursor

Coming soon.

Windsurf

Coming soon.

Available Tools

  • web_search - Calls OpenAI websearch as a tool with the following arguments:
    • type (string): web_search_preview
    • search_context_size (string): Level of context window space for the search; one of low, medium, or high. Default is medium.
    • user_location (object or null), with fields:
      • type (string): Type of location, always approximate.
      • city (string): City of the user (e.g., San Francisco).
      • country (string): Two-letter ISO country code (e.g., US).
      • region (string): Region of the user (e.g., California).
      • timezone (string): IANA timezone (e.g., America/Los_Angeles).

Manual Installation and Configuration

Ensure uvx is installed before proceeding.

Claude Settings

  1. Using uvx:
"mcpServers": {
  "openai-websearch-mcp": {
    "command": "uvx",
    "args": ["openai-websearch-mcp"],
    "env": {
      "OPENAI_API_KEY": "your-api-key-here"
    }
  }
}
  1. Using pip installation:
  • Install the package:
pip install openai-websearch-mcp
  • Modify Claude settings:
"mcpServers": {
  "openai-websearch-mcp": {
    "command": "python",
    "args": ["-m", "openai_websearch_mcp"],
    "env": {
      "OPENAI_API_KEY": "your-api-key-here"
    }
  }
}

Configure for Zed

Add to your settings.json:

  • Using uvx:
"context_servers": [
  {
    "openai-websearch-mcp": {
      "command": "uvx",
      "args": ["openai-websearch-mcp"],
      "env": {
        "OPENAI_API_KEY": "your-api-key-here"
      }
    }
  }
],
  • Using pip installation:
"context_servers": {
  "openai-websearch-mcp": {
    "command": "python",
    "args": ["-m", "openai_websearch_mcp"],
    "env": {
      "OPENAI_API_KEY": "your-api-key-here"
    }
  }
},

Debugging

Use the MCP inspector to debug the server (for uvx installations):

npx @modelcontextprotocol/inspector uvx openai-websearch-mcp