mcpField
O
OpenAI Web Search MCP Server

OpenAI Web Search MCP Server

Local
github.com/bitibiAI & Agents0Updated 85w ago

About OpenAI Web Search MCP Server

OpenAI Web Search MCP Server exposes real-time web search through OpenAI's Responses API. It is for MCP clients that need to submit a query to the `web_search` tool.

Key features

  1. 01Real-time web search
  2. 02`web_search` query tool
  3. 03Uses OpenAI Responses API
  4. 04Configurable server port

Use cases

  1. 01Search the web for current information
  2. 02Retrieve online results from an MCP client

MCP support

Exposes a `web_search` tool to MCP clients. The tool accepts a query and uses OpenAI's Responses API with `web_search_preview`.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"OpenAI-WebSearch-MCP-Server": {
"command": "npx",
"args": [
"-y",
"openai-websearch-mcp-server"
]
}
}
}
Run commandnpx -y openai-websearch-mcp-server

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmopenai-websearch-mcp-server

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

OpenAI Web Search MCP Server

A TypeScript implementation of an MCP server that provides web search functionality using OpenAI's web search preview feature. This server utilizes OpenAI's latest Responses API with the web_search_preview capability, allowing AI models to perform real-time web searches through the OpenAI API.

Installation

You can run this package directly using npx:

npx openai-websearch-mcp-server

Or install it globally:

npm install -g openai-websearch-mcp-server

Usage with MCP Clients

This server is designed to be used with MCP (Model Context Protocol) clients. Here's how to set it up with different clients:

Claude Desktop

Add the following configuration to your Claude Desktop settings:

{
  "mcpServers": {
    "openai_websearch": {
      "command": "npx",
      "args": [
        "-y",
        "openai-websearch-mcp-server"
      ],
      "env": {
        "OPENAI_API_KEY": "your_api_key"
      }
    }
  }
}

Replace your_api_key with your actual OpenAI API key.

Environment Setup

  1. Set your OpenAI API key as an environment variable:
export OPENAI_API_KEY='your-api-key-here'
  1. Run the server:
openai-websearch-mcp

By default, the server runs on port 3000. You can change this by setting the PORT environment variable:

PORT=8080 openai-websearch-mcp

API

The server provides a web search tool that can be used through the MCP protocol. The tool is named web_search and accepts a query string as input. Under the hood, it uses OpenAI's Responses API with the web_search_preview feature to perform real-time web searches, providing up-to-date information from across the internet.

Development

To set up the development environment:

  1. Clone the repository
  2. Install dependencies:
    npm install
    
  3. Start the development server:
    npm run dev
    

Building

To build the package:

npm run build

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.