OpenAI Web Search MCP Server
About
A server for handling OpenAI web search using MCP (Multi-Config Protocol)
Explore
- Real‑time web search via OpenAI’s web_search_preview capability
- Simple MCP‑compliant tool interface (web_search)
- Run directly with npx or install globally
- Port configurable via the PORT environment variable
- Works with any MCP client (Claude Desktop, etc.)
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
OpenAI Web Search MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
You can run this package directly using npx:
npx openai-websearch-mcp-server
Or install it globally:
npm install -g openai-websearch-mcp-server
This server is designed to be used with MCP (Model Context Protocol) clients. Here's how to set it up with different clients:
1. Set your OpenAI API key as an environment variable:
export OPENAI_API_KEY='your-api-key-here'
2. 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
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"openai web search mcp server": {
"OpenAI-WebSearch-MCP-Server": {
"command": "npx",
"args": [
"openai-websearch-mcp-server"
]
}
}
}
}
McpServers
{
"OpenAI-WebSearch-MCP-Server": {
"command": "npx",
"args": [
"openai-websearch-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'
2. 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
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



