MCP ExplorerExplorer

OpenAI WebSearch

@ConechoAIon 13 days ago
42 MIT
FreeCommunity
Web Services
#openai#websearch#AI assistant
This is a Python-based MCP server that provides OpenAI `web_search` build-in tool.

Overview

What is OpenAI WebSearch

The OpenAI WebSearch MCP Server facilitates access to OpenAI’s websearch functionality via the Model Context Protocol, allowing AI assistants to retrieve real-time, up-to-date information from the web during user interactions, which may not be included in the assistant’s pre-existing knowledge base.

Use cases

This server can be used in various applications where real-time information retrieval is crucial, such as providing the latest news updates, verifying facts, answering queries about current events, and offering relevant information tailored to the user’s location or context.

How to use

To use the OpenAI WebSearch MCP Server, users can either install it via a one-click command with an API key or manually through pip or uvx configuration. After installation, settings can be integrated into applications like Claude or Zed by specifying the server command, arguments, and environment variables in the relevant configuration files.

Key features

Key features of the server include the ability to use different search context sizes (low, medium, high), location-based searches to tailor results according to the user’s geographical data, and a debugging tool (MCP inspector) for troubleshooting during development.

Where to use

The server is designed for use within AI-assisted environments such as Claude.app and Zed editor, enabling enhanced conversational experiences by integrating web search capabilities directly into these platforms.

Content

OpenAI WebSearch MCP Server

This MCP server provides access to OpenAI’s websearch functionality through the Model Context Protocol. It allows AI assistants to search the web during conversations with users, providing up-to-date information that may not be available in the assistant’s training data. The server can be installed and configured for use with Claude.app or Zed editor.

One click installation & Configuration

Claude

!!Can using this command auto update configure file(Recommend)

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

sk-xxxx is your API key. You can get it from openai’s open platform

Cursor

Conming soon

Windsurf

Conming soon

Available Tools

  • web_search - Call openai websearch as tool.
    • Required arguments:
      • type (string): web_search_preview
      • search_context_size (string): High level guidance for the amount of context window space to use for the search. One of low, medium, or high. medium is the default.
      • user_location (object or null)
        • type (string): The type of location > approximation. Always approximate.
        • city (string): Free text input for the city of the user, e.g. San Francisco.
        • country (string): The two-letter ISO country code of the user, e.g. US.
        • region (string): Free text input for the region of the user, e.g. California.
        • timezone (string): The IANA timezone of the user, e.g. America/Los_Angeles.

Manual installation and configuration

Please make sure uvx is installed before installation

Add to your Claude settings:

1、Using uvx

2、Using pip installation

1)install openai-websearch-mcp via pip:

pip install openai-websearch-mcp

2)modify your Claude settings

Configure for Zed

Add to your Zed settings.json:

Using uvx

Using pip installation

Debugging

You can use the MCP inspector to debug the server. For uvx installations:

npx @modelcontextprotocol/inspector uvx openai-websearch-mcp

Tools

web_search
It allows AI assistants to search the web during conversations with users

Comments