一键导入
heventure-search-mcp
Use when: agent needs web search (multi-engine: DuckDuckGo/Bing/Google, free, no API key). Install: pip install heventure-search-mcp
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when: agent needs web search (multi-engine: DuckDuckGo/Bing/Google, free, no API key). Install: pip install heventure-search-mcp
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | heventure-search-mcp |
| description | Use when: agent needs web search (multi-engine: DuckDuckGo/Bing/Google, free, no API key). Install: pip install heventure-search-mcp |
A free MCP (Model Context Protocol) web search server with no API key required for core search.
Set these before starting the server to enable paid search engines:
| Variable | Required By | Free Tier | Get Key |
|---|---|---|---|
SERPAPI_KEY | serpapi engine | 100 req/month | serpapi.com |
TAVILY_API_KEY | tavily engine | 1000 req/month | tavily.com |
Note: Free engines (DuckDuckGo, Bing, Google) work without any API key. Without these env vars,
serpapi/tavilyengines will silently fail.
Example:
export SERPAPI_KEY="your_key"
export TAVILY_API_KEY="your_key"
Load this MCP server when any of the following conditions apply:
web_search tool is unavailable or fails — this MCP provides a fallback with multiple enginesweb-search as an MCP tool in Claude Desktop, Hermes Agent, Cursor, or similarget_webpage_content tool extracts text from URLsDo NOT load when:
web_search is already working and the user has no preference for MCP toolsfirecrawl-self-hosted skill instead)uvx heventure-search-mcp
pip install heventure-search-mcp
heventure-search-mcp
pip install git+https://github.com/HughesCuit/heventure-search-mcp.git
python -m server
{
"mcpServers": {
"web-search": {
"command": "uvx",
"args": ["heventure-search-mcp"]
}
}
}
{
"mcpServers": {
"web-search": {
"command": "python",
"args": ["-m", "server"]
}
}
}
web_searchSearch the web with multiple engines.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | yes | — | Search query |
max_results | integer | no | 10 | Max results (1–20) |
search_engine | string | no | "both" | Engine: "duckduckgo" / "bing" / "google" (free) / "serpapi" (needs SERPAPI_KEY) / "tavily" (needs TAVILY_API_KEY) / "both" (free engines only) |
search_engine="both" behaviorWhen set to "both" (the default), the server:
asyncio.gatherSERPAPI_KEY, TAVILY_API_KEY) are setmax_results — so even though 3–5 engines run in parallel, the final list is cappedFor single-engine mode (e.g. "duckduckgo"), only that engine runs and results are returned as-is (no truncation).
get_webpage_contentFetch text content from a URL.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | yes | Target webpage URL |
| Engine | Free | API Key | Notes |
|---|---|---|---|
| DuckDuckGo | ✅ | No | Default engine, great privacy |
| Bing | ✅ | No | Rich results, good for news |
| ✅ | No | Scraping-based, may hit rate limits | |
| SerpAPI | ❌ | Yes | Google API results, 100 free/month |
| Tavily | ❌ | Yes | AI-optimized, 1000 free/month |
The server detects CAPTCHA/challenge pages and gracefully degrades:
| Engine | Detection Method | Behavior |
|---|---|---|
| Bing | Scans HTML for challenge, solve the challenge, captcha (case-insensitive) | Returns empty results with warning log |
Scans HTML for captcha (case-insensitive) | Skips that domain, tries next domain variant (.com → .com.hk → .co.jp) |
CAPTCHA detection is a best-effort heuristic — it may not catch all challenge formats.
| Engine | Timeout | Notes |
|---|---|---|
| DuckDuckGo (API + HTML) | 10s | Per-request total timeout |
| Bing | 10s | Per-request total timeout, fallback to cn.bing.com on failure |
| 10s | Per-request total timeout, tries 3 domains in sequence | |
| SerpAPI | 30s | API call with JSON response |
| Tavily | 30s | API call with JSON response |
get_webpage_content | 10s | Single page fetch |
| Shared aiohttp session | 30s | Global fallback for any request without explicit timeout |
Two retry mechanisms exist, both with identical defaults:
| Method | Used By | Retries | Delay | Retryable Errors |
|---|---|---|---|---|
_safe_get_with_retry | Bing, Google | 1 (total 2 attempts) | 1.0s | TimeoutError, ClientError, ConnectionError, OSError |
_request_with_retry | DuckDuckGo (API + HTML) | 1 (total 2 attempts) | 1.0s | TimeoutError, ClientError, ConnectionError, OSError |
Paid engines (SerpAPI, Tavily) do NOT retry — they rely on their own API reliability.
| Scenario | Behavior |
|---|---|
| SSRF protection | Blocks private/loopback/link-local/reserved IPs. DNS rebinding: resolves hostname and checks resolved IPs before connecting. |
| Redirect loops | Tracks visited URLs, breaks on cycles. Bing-specific: strips mkt parameter and normalizes bing.com/cn.bing.com → www.bing.com. Max 5 redirects. |
| Unicode decode errors | Falls back to raw bytes.decode('utf-8', errors='replace') |
| Non-HTML content | get_webpage_content rejects PDF, images, etc. (checks Content-Type: text/html) |
| Empty response | Google skips pages shorter than 500 chars |
| Cache | 300s TTL, max 100 entries, LRU eviction. Avoids re-fetching within TTL window. |
| DuckDuckGo API fallback | If JSON API fails or returns empty, falls back to HTML scraping (html.duckduckgo.com) |
MIT