o4-search
# @mkusaka/o4-search-mcp
An MCP (Model Context Protocol) server that provides web search capabilities using OpenAI models. The `o4-search` tool accepts text queries and returns AI-powered search results with advanced reasoning capabilities.
> Note: This is a personal fork of [yoshiko-pg/o3-search-mcp](https://github.com/yoshiko-pg/o3-search-mcp) maintained for my own use. The original author is not involved with this repository, its releases, or support.
## Supported Models
- `o4-mini` (default)
- `gpt-5`
- Any other OpenAI model that supports the responses API with web search tools
## Installation
### Using npx (Recommended)
Claude Code:
```
$ claude mcp add search -s user \
-e OPENAI_API_KEY=your-api-key \
-e OPENAI_MODEL=o4-mini \
-e SEARCH_CONTEXT_SIZE=high \
-e REASONING_EFFORT=high \
-- npx @mkusaka/mcp-server-o4-search
```
json:
```json
{
"mcpServers": {
"o4-search": {
"command": "npx",
"args": ["@mkusaka/mcp-server-o4-search"],
"env": {
"OPENAI_API_KEY": "your-api-key",
// Optional: o4-mini, gpt-5, etc. (default: o4-mini)
"OPENAI_MODEL": "o4-mini",
// Optional: low, medium, high (default: high)
"SEARCH_CONTEXT_SIZE": "high",
"REASONING_EFFORT": "high"
}
}
}
}
```
### Local Development Setup
If you want to download and run the code locally:
```bash
# setup
git clone git@github.com:mkusaka/o4-search-mcp.git
cd o4-search-mcp
pnpm install
pnpm build
```
Claude Code:
```
$ claude mcp add search -s user \
-e OPENAI_API_KEY=your-api-key \
-e OPENAI_MODEL=o4-mini \
-e SEARCH_CONTEXT_SIZE=high \
-e REASONING_EFFORT=high \
-- node /path/to/o4-search-mcp/build/index.js
```
json:
```json
{
"mcpServers": {
"o4-search": {
"command": "node",
"args": ["/path/to/o4-search-mcp/build/index.js"],
"env": {
"OPENAI_API_KEY": "your-api-key",
// Optional: o4-mini, gpt-5, etc. (default: o4-mini)
"OPENAI_MODEL": "o4-mini",
// Optional: low, medium, high (default: high)
"SEARCH_CONTEXT_SIZE": "high",
"REASONING_EFFORT": "high"
}
}
}
}
```
TDQS
Scored across 1 tool
There is only one tool, so there is no risk of confusion with another tool. Its purpose as a natural-language web search agent is clear enough for an agent to select it unambiguously.
With a single tool named `o4-search`, there are no competing naming conventions to create inconsistency. The lowercase hyphenated name also matches the server name.
A single tool is borderline thin for a search-oriented server, even if the domain is narrow. It may be sufficient for basic queries but leaves little room for specialized search operations.
The core web search operation is covered, which is the stated purpose of the server. Minor gaps may exist around advanced filtering, result fetching, or structured outputs, but the main workflow is available.