Enables automated web searching via DuckDuckGo to retrieve search engine results, extract page content, and perform multi-level deep crawling.
Provides capabilities to perform Google searches, allowing for SERP parsing, full-text extraction from result pages, and deep-link crawling with automatic engine fallback.
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., "@Web Search MCPsearch for 'fastapi tutorial' using DuckDuckGo and extract page content"
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.
Web Search MCP
基于 Camoufox + FastAPI 的高性能 Web 搜索服务,将搜索引擎结果转换为结构化 JSON / Markdown 输出。支持多层深度抓取与并发执行。
功能特性
三大搜索引擎:Google、Bing、DuckDuckGo
多层深度抓取:SERP 解析 → 正文提取 → 外链抓取
双格式输出:JSON / Markdown
反检测浏览器:Camoufox 真实浏览器指纹(geoip、humanize、locale)
并发执行:浏览器池 + asyncio 信号量控制
引擎自动回退:主引擎无结果时自动切换备选引擎
搜索深度
depth | 行为 | 说明 |
| SERP 解析 | 默认。提取标题、链接、摘要 |
| SERP + 正文 | 进入每个结果链接,提取页面正文 |
| SERP + 正文 + 外链 | 继续抓取正文中的外部链接内容 |
快速开始
安装
启动服务
服务启动后访问 http://localhost:8000/health 确认状态:
API 使用
GET /search
参数说明:
参数 | 类型 | 默认值 | 说明 |
| string | 必填 | 搜索关键词(1-500 字符) |
| string |
| 搜索引擎: |
| int |
| 抓取深度:1-3 |
| string |
| 输出格式: |
| int |
| 最大结果数(1-50) |
| int |
| 超时秒数(5-120) |
POST /search
响应示例
JSON 格式(depth=1):
JSON 格式(depth=2,包含正文内容):
Markdown 格式:
引擎状态
引擎 | 状态 | 说明 |
DuckDuckGo | 稳定可用 | 推荐使用,搜索质量高,无地域限制 |
受限 | 部分 IP 会触发验证码,自动回退到 DuckDuckGo | |
Bing | 可用 | 使用 |
Google 被拦截时会自动按 DuckDuckGo → Bing 顺序回退,响应中的
engine字段标识实际使用的引擎。
MCP 模式使用(curl 调用示例)
MCP 服务默认监听 http://127.0.0.1:8897,使用 Streamable HTTP 传输协议。
启动 MCP 服务
初始化 MCP 会话
调用 web_search 工具
调用 get_page_content 工具
列出可用搜索引擎
带 API Key 认证
Camoufox 指纹浏览器配置
通过环境变量配置 Camoufox 高级功能:
环境变量 | 说明 | 示例 |
| 浏览器并发数 |
|
| 代理服务器 |
|
| 目标 OS 指纹 |
|
| 自定义字体列表 |
|
| 阻止 WebGL 指纹 |
|
| Firefox 插件路径 |
|
内置功能(默认启用):
GeoIP 伪装 — 基于真实 IP 自动匹配地理位置指纹
人性化操作 — 模拟真实鼠标移动和点击行为
图片阻止 — 加速页面加载
Locale 匹配 — 浏览器语言与地区一致
测试
项目结构
技术栈
组件 | 技术 |
Web 框架 | FastAPI + Uvicorn |
浏览器引擎 | Camoufox(反检测 Firefox,Playwright 驱动) |
异步运行时 | asyncio + Semaphore 并发控制 |
HTML 解析 | BeautifulSoup4 + lxml |
内容转换 | markdownify(HTML → Markdown) |
数据校验 | Pydantic v2 |
Claude Code

License
MIT