home / mcp / search-mcp: minimal web search mcp server
Provides web search results via DuckDuckGo without requiring API keys.
Configuration
View docs{
"mcpServers": {
"deeprave-mcp-websearch": {
"command": "python3",
"args": [
"/Users/USERNAME/Code/search-mcp/search_mcp.py"
]
}
}
}You have a minimal MCP server that performs web searches through DuckDuckGo without needing API keys. It runs locally via a stdio MCP transport, so you can call it from any MCP client and get succinct web search results.
You run the server locally and connect to it with an MCP client. The server exposes a single tool named web_search that lets you search the web and return a small set of results. Use your MCP client to request a search by providing the query and, optionally, a maximum number of results. The server handles timeouts and errors gracefully, so you can rely on responsive results without hanging.
Prerequisites you need on your system before starting are Python 3 and a working Python package manager (pip). You also need access to the directory where you place the MCP server files.
cd ~/Code/search-mcp
pip install -e .
```
```
cd ~/Code/search-mcp
uv pip install -e .This server is configured as a stdio MCP endpoint. The client communicates over standard input/output with the Python script that runs the MCP server.
{
"mcpServers": {
"WebSearch": {
"type": "stdio",
"command": "python3",
"args": ["/Users/USERNAME/Code/search-mcp/search_mcp.py"],
"timeout": 120000,
"disabled": false
}
}
}Module not found errors typically mean the package wasn’t installed in editable mode. Reinstall with the exact command shown and ensure you’re in the correct directory.
If the server does not respond, verify you are using the correct Python path and that the command and script path in your config are accurate.
For timeout issues, check your internet connection, ensure DuckDuckGo is reachable, and try shorter or simpler search queries.
The server provides a single tool named web_search that queries DuckDuckGo via its free API and returns a small result set. It uses a 10-second timeout per request to avoid hanging when the remote service is slow or unavailable.
Queries DuckDuckGo to return a small set of web search results for a given query, with an optional maximum number of results.