OpenAI WebSearch MCP Server
The OpenAI WebSearch MCP Server enables AI assistants to perform intelligent web searches with advanced reasoning capabilities and real-time information access.
Core Capabilities:
Intelligent web search using OpenAI's reasoning models for up-to-date information retrieval
Multi-model support including GPT-4o, GPT-4o-mini, GPT-5, GPT-5-mini, GPT-5-nano, o3, and o4-mini
Configurable reasoning effort with low, medium, high, or minimal levels for optimal performance
Multiple search modes - fast iterations with lightweight models or comprehensive deep research
Localized search results based on user location (city, timezone, region, country)
Adjustable search context with low, medium, or high settings
Multiple API versions including web_search_preview and web_search_preview_2025_03_11
Integration & Configuration:
Seamless integration with AI assistants like Claude Desktop, Cursor, and Claude Code via MCP protocol
Easy configuration through environment variables for API keys and default models
Flexible parameters for customizing each search query including input type and model selection
Provides access to OpenAI's websearch tool to query for current information from the web
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OpenAI WebSearch MCP Serversearch for the latest AI breakthroughs using gpt-5 with high reasoning effort"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenAI WebSearch MCP Server 🔍
An advanced MCP server that provides intelligent web search capabilities using OpenAI's reasoning models. Perfect for AI assistants that need up-to-date information with smart reasoning capabilities.
✨ Features
🧠 Reasoning Model Support: Full compatibility with OpenAI's latest reasoning models (gpt-5, gpt-5-mini, gpt-5-nano, o3, o4-mini)
⚡ Smart Effort Control: Intelligent
reasoning_effortdefaults based on use case🔄 Multi-Mode Search: Fast iterations with gpt-5-mini or deep research with gpt-5
🌍 Localized Results: Support for location-based search customization
📝 Rich Descriptions: Complete parameter documentation for easy integration
🔧 Flexible Configuration: Environment variable support for easy deployment
Related MCP server: OneSearch MCP Server
🚀 Quick Start
One-Click Installation for Claude Desktop
OPENAI_API_KEY=sk-xxxx uvx --with openai-websearch-mcp openai-websearch-mcp-installReplace sk-xxxx with your OpenAI API key from the OpenAI Platform.
⚙️ Configuration
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"openai-websearch-mcp": {
"command": "uvx",
"args": ["openai-websearch-mcp"],
"env": {
"OPENAI_API_KEY": "your-api-key-here",
"OPENAI_DEFAULT_MODEL": "gpt-5-mini"
}
}
}
}Cursor
Add to your MCP settings in Cursor:
Open Cursor Settings (
Cmd/Ctrl + ,)Search for "MCP" or go to Extensions → MCP
Add server configuration:
{
"mcpServers": {
"openai-websearch-mcp": {
"command": "uvx",
"args": ["openai-websearch-mcp"],
"env": {
"OPENAI_API_KEY": "your-api-key-here",
"OPENAI_DEFAULT_MODEL": "gpt-5-mini"
}
}
}
}Claude Code
Claude Code automatically detects MCP servers configured for Claude Desktop. Use the same configuration as above for Claude Desktop.
Local Development
For local testing, use the absolute path to your virtual environment:
{
"mcpServers": {
"openai-websearch-mcp": {
"command": "/path/to/your/project/.venv/bin/python",
"args": ["-m", "openai_websearch_mcp"],
"env": {
"OPENAI_API_KEY": "your-api-key-here",
"OPENAI_DEFAULT_MODEL": "gpt-5-mini",
"PYTHONPATH": "/path/to/your/project/src"
}
}
}
}🛠️ Available Tools
openai_web_search
Intelligent web search with reasoning model support.
Parameters
Parameter | Type | Description | Default |
|
| The search query or question to search for | Required |
|
| AI model to use. Supports gpt-4o, gpt-4o-mini, gpt-5, gpt-5-mini, gpt-5-nano, o3, o4-mini |
|
|
| Reasoning effort level: low, medium, high, minimal | Smart default |
|
| Web search API version |
|
|
| Context amount: low, medium, high |
|
|
| Optional location for localized results |
|
💬 Usage Examples
Once configured, simply ask your AI assistant to search for information using natural language:
Quick Search
"Search for the latest developments in AI reasoning models using openai_web_search"
Deep Research
"Use openai_web_search with gpt-5 and high reasoning effort to provide a comprehensive analysis of quantum computing breakthroughs"
Localized Search
"Search for local tech meetups in San Francisco this week using openai_web_search"
The AI assistant will automatically use the openai_web_search tool with appropriate parameters based on your request.
🤖 Model Selection Guide
Quick Multi-Round Searches 🚀
Recommended:
gpt-5-miniwithreasoning_effort: "low"Use Case: Fast iterations, real-time information, multiple quick queries
Benefits: Lower latency, cost-effective for frequent searches
Deep Research 🔬
Recommended:
gpt-5withreasoning_effort: "medium"or"high"Use Case: Comprehensive analysis, complex topics, detailed investigation
Benefits: Multi-round reasoned results, no need for agent iterations
Model Comparison
Model | Reasoning | Default Effort | Best For |
| ❌ | N/A | Standard search |
| ❌ | N/A | Basic queries |
| ✅ |
| Fast iterations |
| ✅ |
| Deep research |
| ✅ |
| Balanced approach |
| ✅ |
| Advanced reasoning |
| ✅ |
| Efficient reasoning |
📦 Installation
Using uvx (Recommended)
# Install and run directly
uvx openai-websearch-mcp
# Or install globally
uvx install openai-websearch-mcpUsing pip
# Install from PyPI
pip install openai-websearch-mcp
# Run the server
python -m openai_websearch_mcpFrom Source
# 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👩💻 Development
Setup Development Environment
# Clone and setup
git clone https://github.com/yourusername/openai-websearch-mcp.git
cd openai-websearch-mcp
# Create virtual environment and install dependencies
uv sync
# Run tests
uv run python -m pytest
# Install in development mode
uv pip install -e .Environment Variables
Variable | Description | Default |
| Your OpenAI API key | Required |
| Default model to use |
|
🐛 Debugging
Using MCP Inspector
# For uvx installations
npx @modelcontextprotocol/inspector uvx openai-websearch-mcp
# For pip installations
npx @modelcontextprotocol/inspector python -m openai_websearch_mcpCommon Issues
Issue: "Unsupported parameter: 'reasoning.effort'" Solution: This occurs when using non-reasoning models (gpt-4o, gpt-4o-mini) with reasoning_effort parameter. The server automatically handles this by only applying reasoning parameters to compatible models.
Issue: "No module named 'openai_websearch_mcp'" Solution: Ensure you've installed the package correctly and your Python path includes the package location.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
🤖 Generated with Claude Code
🔥 Powered by OpenAI's Web Search API
🛠️ Built on the Model Context Protocol
Co-Authored-By: Claude noreply@anthropic.com
Available Tools
1 toolopenai_web_searchA
OpenAI Web Search with reasoning models.
For quick multi-round searches: Use 'gpt-5-mini' with reasoning_effort='low' for fast iterations.
For deep research: Use 'gpt-5' with reasoning_effort='medium' or 'high'. The result is already multi-round reasoned, so agents don't need continuous iterations.
Supports: gpt-4o (no reasoning), gpt-5/gpt-5-mini/gpt-5-nano, o3/o4-mini (with reasoning).
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | The search query or question to search for | |
| model | No | AI model to use. Defaults to OPENAI_DEFAULT_MODEL env var or gpt-5-mini | |
| reasoning_effort | No | Reasoning effort level for supported models (gpt-5, o3, o4-mini). Default: low for gpt-5-mini, medium for others | |
| type | No | Web search API version to use | web_search_preview |
| search_context_size | No | Amount of context to include in search results | medium |
| user_location | No | Optional user location for localized search results |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the reasoning model capabilities and result characteristics ('multi-round reasoned'), but lacks details on rate limits, authentication needs, error handling, or what constitutes a 'search' versus other operations. It adds some context about model behaviors but leaves significant gaps for a tool with multiple parameters.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently structured with clear sections for different use cases and model support. It avoids redundancy and each sentence adds value, though the final 'Supports:' line could be integrated more smoothly. Overall, it's appropriately sized and front-loaded with key information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (6 parameters, reasoning models, web search) and the presence of an output schema, the description is moderately complete. It covers model selection and usage scenarios but lacks context about search result format, limitations, or how parameters like 'search_context_size' and 'user_location' affect outcomes. The output schema reduces the burden, but more operational context would be helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, providing detailed parameter documentation. The description adds minimal semantic value beyond the schema, mentioning model support and reasoning effort implications but not explaining parameter interactions or search-specific nuances. It meets the baseline for high schema coverage but doesn't significantly enhance understanding of parameter meanings.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool performs 'OpenAI Web Search with reasoning models', specifying the action (search) and key capability (reasoning models). It distinguishes this as a web search tool with AI reasoning integration, though no sibling tools exist for comparison. The purpose is specific but could be more precise about what 'web search' entails beyond model selection.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use different configurations: 'quick multi-round searches' with gpt-5-mini and reasoning_effort='low', and 'deep research' with gpt-5 and reasoning_effort='medium' or 'high'. It also advises that 'agents don't need continuous iterations' for deep research, offering clear usage scenarios despite no sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v1.0.0- Added
openai_web_search - Removed
web_search
1 tool update
- First observed
web_search
TDQS
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool has a single, clear purpose of performing web searches with OpenAI models.
Since there is only one tool, naming consistency is inherently perfect. The tool name 'openai_web_search' follows a clear and descriptive pattern that would be consistent if more tools existed.
A single tool is generally too few for a server's purpose, as it limits functionality and flexibility. While the tool is well-described, the server's scope appears to be web search, which could benefit from additional tools for filtering, refining, or managing searches.
The server is severely incomplete for web search functionality. It lacks essential operations such as filtering results, handling pagination, saving or retrieving search history, or configuring search parameters beyond model selection. This will likely cause agent failures in complex search tasks.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
One API key for 6 AI models. Pay-per-use. MCP protocol support with web search.
The best web search for your AI Agent
LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseAqualityCmaintenanceA Model Context Protocol server that enables AI models to perform real-time internet and knowledge searches through Higress, enhancing model responses with up-to-date information from Google, Bing, Arxiv, and internal knowledge bases.15Apache 2.0
- AlicenseAqualityAmaintenanceA Model Context Protocol server that enables web search, scraping, crawling, and content extraction through multiple engines including SearXNG, Firecrawl, and Tavily.4190139MIT
- AlicenseBqualityFmaintenanceConnects AI assistants to external data sources (Google, Bing, etc.) via SearchAPI.site, implementing the Model Context Protocol (MCP) for secure and contextual access to web information.31514MIT
- AlicenseCqualityDmaintenanceA Model Context Protocol server that enables AI assistants to search the web using Bocha AI's search API, supporting features like time filtering, domain inclusion/exclusion, and summarized results.1363Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ConechoAI/openai-websearch-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server