deepseek-search-mcp
This server provides multi-backend web search and URL content fetching via MCP, powered by DeepSeek V4-Flash and Xiaomi MiMo.
web_search: Standard DeepSeek search with automatic query planning, source verification, and cited results.
web_search_fast: Fast search for time-sensitive queries; concise answers after 1–2 searches.
web_search_deep: Deep search that breaks queries into sub-queries, cross-verifies, and synthesizes comprehensive cited answers.
fetch_page: Fetches and extracts content from URLs, converting HTML/JSON to text with SSRF protection.
mimo_search / raw retrieval: Raw web retrieval similar to Tavily, returning structured source lists and summaries without further orchestration.
health: Checks API keys and search/fetch functionality.
Also supports location-aware searching, automatic fallback from DeepSeek to MiMo, and configuration of API keys, models, timeouts, and output lengths.
Provides web search integration with Xiaomi's MiMo API, enabling raw search results with structured sources, summaries, location-based customization, and fallback search support.
Click on "Deploy 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., "@deepseek-search-mcp What are the latest developments in quantum computing?"
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.
deepseek-search-mcp
多后端联网搜索 MCP 服务器:DeepSeek V4-Flash 全自动搜索 + 小米 MiMo 原始检索 + fetch_page 来源验证,带自动降级链与位置定制化搜索。
零依赖:纯 Python 标准库(≥3.9),无第三方包
协议自实现:stdio + JSON-RPC 2.0,兼容 Claude Desktop / Codex / Cherry Studio / Hermes 等客户端
自动降级:
BACKEND=auto时 DeepSeek 失败自动切 MiMo,结果标注实际后端位置搜索:
location参数(结构化对象或自由文本)本地化检索
架构
MCP 客户端(LLM 决策与提问)
│ stdio, JSON-RPC 2.0
▼
deepseek_web_search_mcp.py(入口)→ mcp_search 包
├─ providers.py DeepSeekClient(全自动)· MimoClient(raw)· FallbackChain
├─ models.py 统一模型:Location / Citation / SearchResult
├─ fetch.py fetch_page(HTML/JSON → 文本,SSRF 防护)
└─ server.py MCP 协议 + 工具注册 + 深搜编排
│
├─ DeepSeek Responses API(原生 web_search 工具,多轮核实 + 带引用合成)
└─ MiMo Chat Completions API(web_search 工具,结构化来源 + user_location)Related MCP server: Percival Deep Research
工具
工具 | 模式 | 用途 | 耗时 |
| DeepSeek 全自动 | 日常查询、新闻、事实确认 | 30–60s |
| 快速 | 时效敏感的快查 | 3–8s |
| 深搜 | 事实核查、调研报告(子查询拆解 + 交叉核验) | 3–10 分钟 |
| raw 检索 | 类似 Tavily:结构化来源列表 + 摘要,不编排 | 20–40s |
| 基础 | 抓取 URL 验证来源真实内容 | 1–10s |
| 诊断 | 验证各后端与 fetch 链路 | 30–60s |
参数
location(三个搜索工具通用,可选):{"country":"中国","region":"湖北","city":"武汉"}或"湖北省武汉市"/"Wuhan, Hubei, China"。MiMo 映射user_location(实测显著提升本地结果),DeepSeek 注入查询上下文。web_search_deep的enrich_mimo(可选,默认 false):每路子查询额外注入 MiMo raw 结果作为补充来源,DeepSeek 定"准确性"、MiMo 补"覆盖面"。mimo_search的fast/max_keyword/limit(可选):控制检索成本(默认 5/5,fast 减半)。fetch_page的max_chars(可选,默认 20000):提取文本上限。
快速开始
export DEEPSEEK_API_KEY="sk-..." # DeepSeek 全自动搜索(必填其一)
export MIMO_API_KEY="sk-..." # MiMo raw 检索 / 降级兜底
python deepseek_web_search_mcp.py --health # 健康检查
python deepseek_web_search_mcp.py # 作为 MCP 服务器运行(stdio)配置
变量 | 默认 | 说明 |
|
|
|
| — | DeepSeek API Key |
|
| Responses API 目前仅支持该模型 |
|
| HTTP 超时(秒) |
|
| 标准/深搜合成答案的最大输出 token |
|
| 快速模式最大输出 token |
| — | 小米 MiMo API Key(platform.xiaomimimo.com) |
|
| 联网搜索支持 |
|
| 强制联网搜索(不依赖模型意图判断) |
|
| 每轮搜索关键词数 / 结果条数(fast 减半) |
|
| 搜索时 prompt 会拼接结果,过小会截断( |
|
| fetch_page 超时与提取上限 |
|
| 设为 |
|
| 设为 |
MCP 客户端接入
以 Claude Desktop 的 claude_desktop_config.json 为例:
{
"mcpServers": {
"deepseek-search": {
"command": "python",
"args": ["/absolute/path/to/deepseek_web_search_mcp.py"],
"env": {
"DEEPSEEK_API_KEY": "sk-...",
"MIMO_API_KEY": "sk-...",
"BACKEND": "auto"
}
}
}
}超时:标准模式 30–60s、深搜最长 10 分钟,客户端侧超时需配置足够长(opencode 为
experimental.mcp_timeout,单位毫秒)。
开发与测试
mcp_search/ # models / providers / fetch / server
tests/ # 99 个用例:单元(mock)+ 集成(本地 HTTP)+ stdio 端到端
mcp_client.py # 通用 MCP stdio 客户端,可调任意工具# 全量测试(配置任一 API Key 后自动包含真实搜索用例)
python -m unittest discover -s tests -p "test_*.py"
# 手动调用示例
python mcp_client.py --cmd "python" --args "deepseek_web_search_mcp.py" \
--tool mimo_search --params-file params.json \
--env "MIMO_API_KEY=sk-..." --env "BACKEND=auto" --timeout 600可靠性设计:网络错误/5xx/429/空结果自动重试;深搜规划失败自动回退默认子查询拆解、综合失败降级为结果汇总;断连自动走降级链。详见 TESTING.md。
已知限制
DeepSeek Responses API 仅支持
deepseek-v4-flash;MiMo 联网搜索需mimo-v2.5系列并在控制台启用联网插件(启停有约 5 分钟缓存期)。MiMo 请求显式禁用 thinking(默认开启时偶发返回空 content)。
fetch_page无法提取 JS 动态渲染页(SPA)正文,返回明确提示;SSRF 防护默认拒绝内网地址。mimo_search的答案摘要可能被截断(finish_reason: length),需更长输出请调大MIMO_MAX_OUTPUT。notifications/initialized无响应,客户端不能同步等待。
许可证
MIT
Available Tools
4 toolshealthA
健康检查:验证 DeepSeek API key 与联网搜索能力是否可用。
Inputs: no named parameters.
web_searchA
联网搜索(标准模式)。基于 DeepSeek V4-Flash 原生联网搜索:自动规划多次搜索、阅读并核实来源、返回带引用的结构化答案。适合日常查询、新闻、事实确认。
Inputs: query (required).
web_search_deepA
深度联网搜索(高准确性模式)。先把问题拆解为多个子查询分别检索,再由 DeepSeek V4-Flash 交叉核验、综合成带引用的最终答案。适合事实核查、研究报告、技术调研、需要多来源验证的场景。耗时更长。
Inputs: query (required).
web_search_fastA
联网搜索(快速模式)。使用低推理强度 + 精简指令优先响应速度,通常 1-2 轮搜索后直接给出简洁答案。适合对时效敏感、无需深度核验的查询。
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The three search variants are clearly differentiated by depth and use case (standard, fast, deep), though an agent might occasionally hesitate between web_search and web_search_deep. health is obviously distinct.
Names use a consistent web_search_* pattern with fast/deep modifiers, plus a single health tool. Minor deviation: health doesn't follow the web_search prefix, but it's a different concern.
Four tools is appropriate for a search-focused server, covering three modes of the core operation and one utility. No bloat or thinness.
The domain is web search, and the server provides standard, fast, and deep modes plus health. No obvious missing capability within that scope, though one could imagine a continuous or batch mode.
Maintenance
Related MCP Connectors
Web search API and MCP server for developers building AI agents.
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
One MCP server for all web data. Scrape, search, crawl, and AI research in one install.
Academic research MCP server for paper search, citation checks, graphs, and deep research.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that utilizes LangGraph and Google Gemini to conduct comprehensive research through multi-iteration deep searches and quick results. It provides high-quality analysis with automated citations and grounding metadata for thorough investigations.2MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that provides autonomous, multi-source web research capabilities for AI agents. It delivers comprehensive, validated information through deep research tools while maintaining security and compatibility with various LLM providers.MIT
- AlicenseAqualityDmaintenanceA general MCP server providing web search capabilities using DeepSeek's native online search API.137 npm33MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that performs iterative deep research using Google Gemini 2.5 Flash with search grounding and URL context, producing professional Markdown reports.70MIT