GPT-5 Search MCP Server
Provides access to OpenAI's GPT-5 model with web search and advanced reasoning capabilities, enabling AI-powered search and analysis through MCP tools.
README
GPT-5 Search MCP Server
An MCP (Model Context Protocol) server that provides access to OpenAI's GPT-5 model with web search and advanced reasoning capabilities.
Features
- GPT-5 Integration: Direct access to OpenAI's latest GPT-5 reasoning model
- Web Search: Built-in web search capabilities for up-to-date information
- Type Safety: Full TypeScript types with Zod validation for API responses
- Error Handling: Robust error handling with retry logic and structured error messages
- Multiple Variants: Different tools for various use cases:
gpt5-search: Main tool with web search and medium reasoninggpt5: Pure reasoning without web searchgpt5-low: Fast responses with low reasoning effortgpt5-high: Deep analysis with high reasoning effortgpt5-mini: Using the smaller gpt-5-mini modelgpt5-nano: Using the smallest gpt-5-nano modelgpt5-pro: ⚠️ EXPENSIVE - Premium GPT-5 Pro model (use only when explicitly requested)
Limitations
⚠️ No Local File Access: This MCP server does not provide file reading capabilities. The GPT-5 tools cannot access or read local files from your system. Only text prompts are sent to the OpenAI API.
- What it CAN do: Write gpt5-pro outputs to files, make web searches, perform reasoning
- What it CANNOT do: Read local files, access your filesystem, include file contents in prompts
If you need to provide file contents to GPT-5, you must copy/paste the content into your prompt manually.
Installation
npm install
npm run build
Configuration
Set your OpenAI API key as an environment variable:
export OPENAI_API_KEY=your-api-key-here
Optional environment variables:
SEARCH_CONTEXT_SIZE: Controls web search context size (low,medium,high). Default:mediumREASONING_EFFORT: Controls reasoning effort (low,medium,high). Default:mediumCLIENT_CWD: Directory where gpt5-pro outputs will be saved. Default: server's current working directory
Usage with Claude Code
Add to your Claude Code configuration (.claude/config.json):
{
"mcpServers": {
"gpt5-search": {
"command": "node",
"args": ["/path/to/gpt5-search-mcp/build/index.js"],
"env": {
"OPENAI_API_KEY": "your-api-key-here",
"CLIENT_CWD": "${workspaceFolder}"
}
}
}
}
Note: The CLIENT_CWD variable controls where gpt5-pro output files are saved. Use ${workspaceFolder} to save files in your current working directory, or specify an absolute path.
Available Tools
gpt5-search
Main tool with web search capabilities. Best for queries requiring current information.
gpt5
Pure reasoning without web search. Best for complex problem-solving that doesn't need current data.
gpt5-low
Fast responses with low reasoning effort and web search. Good for simple queries.
gpt5-high
High reasoning effort with web search. Best for complex problems requiring deep analysis.
gpt5-mini
Uses the gpt-5-mini model - smaller, faster, and less expensive.
gpt5-nano
Uses the gpt-5-nano model - smallest and fastest for simple queries.
gpt5-pro ⚠️
EXPENSIVE MODEL - Use Only When Explicitly Requested
Uses the gpt-5-pro-2025-10-06 model with maximum reasoning capabilities and web search. This is a premium, high-cost model that provides the most advanced reasoning and analysis capabilities.
Important Notes:
- This model should only be invoked when the user explicitly requests it due to its significantly higher cost
- Automatic File Output: Due to extremely large output sizes that can crash clients, gpt5-pro responses are automatically saved to files in the
gpt5-pro-outputs/directory - The tool returns only a preview (first 1000 chars) and the file path
- Files are named with timestamps:
gpt5-pro-YYYY-MM-DDTHH-MM-SS-mmmZ.txt - Output location can be controlled with the
CLIENT_CWDenvironment variable
Implementation Details
Architecture Improvements (v0.0.2)
- Tool Factory Pattern: Single
createToolfunction eliminates code duplication - Configuration Registry: Centralized
toolConfigsobject manages all tool variants - Type Safety: Zod schemas validate API responses with proper TypeScript inference
- Error Handling:
- Custom
HttpErrorclass for structured errors - Automatic retry with exponential backoff for transient failures
- Respects
Retry-Afterheaders for rate limiting - User-friendly error messages for different status codes
- Custom
API Response Format
The GPT-5 API returns a structured response with:
- Reasoning tokens (hidden but billed)
- Web search calls (if web search is enabled)
- Final message with text and URL citations
Testing
Run the test script to verify the server is working:
node test-mcp.js
License
WTFPL - Do What The Fuck You Want To Public License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。