deepseek-web-search-mcp
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-web-search-mcp search the web for recent news about AI regulation in the EU"
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 Web Search MCP
基于 Python(uv + FastMCP)实现的独立 Model Context Protocol (MCP) 服务,直接封装 DeepSeek 官方独立的网页搜索(Search)与网页抓取(Fetch)工具 API。
让你在 Antigravity、Claude Desktop、Cursor、Cline、Claude Code 等任意支持 MCP 的客户端中,复用已有的 DeepSeek API Key 获得低延迟、低成本的实时联网搜索与网页 Markdown 正文提取能力,不消耗对话模型 Token。
核心特性
双工具闭环:
deepseek_search:调用POST /v1/tools/search,支持site:、-site:、lang:、after:/before:、精确短语等搜索语法,支持summary(600~800 字模型友好长摘要)/snippet/full三档返回粒度与min_score质量过滤。deepseek_fetch:调用POST /v1/tools/fetch,抓取单个网页并转为干净的 Markdown 正文,带最大字符截断保护。
官方计费友好:直接调用工具接口(官方标准定价 5 元 / 1,000 次成功请求,失败或空结果不计费;不走对话模型推理)。
健壮与安全:
自动截断超过 128 字符的
query/ori_question,避免触发 HTTP 400。严格校验
deepseek_fetchURL(仅允许http/https、禁止携带userinfo、限制最大 8192 字符)。针对
408、429(支持Retry-After)、5xx及网络超时自动指数退避重试;401/402/404快速失败并给出清晰提示,绝不泄露 API Key。严格分离
stdio协议输出与stderr日志,杜绝 JSON-RPC 解析损坏;在返回结果头部标注外部网页为不可信参考数据。
零克隆一键运行:支持
uvx --from git+https://github.com/LS-King/deepseek-web-search-mcp直接拉起。
Related MCP server: DeepSeek Search MCP
前置准备
已安装
uv(包含uvx)且系统具备 Python 3.11+。在 DeepSeek 开放平台 申请一个
DEEPSEEK_API_KEY,并确保账户有可用余额。
快速配置(MCP 客户端)
方式 A:使用 uvx 直接从 GitHub 启动(推荐,无需手动克隆)
在任意支持标准 mcpServers 配置的客户端中填入以下配置:
{
"mcpServers": {
"deepseek-web-search": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/LS-King/deepseek-web-search-mcp",
"deepseek-web-search-mcp"
],
"env": {
"DEEPSEEK_API_KEY": "sk-your-deepseek-api-key"
}
}
}
}方式 B:本地克隆后通过 uv run 启动(适合本地二次开发)
git clone https://github.com/LS-King/deepseek-web-search-mcp.git
cd deepseek-web-search-mcp
uv sync客户端配置示例(请将路径替换为你的实际克隆目录):
{
"mcpServers": {
"deepseek-web-search": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/deepseek-web-search-mcp",
"deepseek-web-search-mcp"
],
"env": {
"DEEPSEEK_API_KEY": "sk-your-deepseek-api-key"
}
}
}
}常见客户端配置路径
客户端 | 配置文件位置 / 添加方式 |
Antigravity | 全局 |
Claude Desktop | Windows: |
Cursor | Settings → MCP → Add New MCP Server |
Claude Code |
|
工具说明
1. deepseek_search
调用 DeepSeek 独立 Search API 搜索互联网。
参数 | 类型 | 必填 | 默认值 | 说明 |
|
| 是 | — | 搜索词(1~128 Unicode 字符,超长会自动截断)。支持 |
|
| 否 |
| 返回条数(1~50)。 |
|
| 否 |
|
|
|
| 否 |
| 最低 |
|
| 否 |
| 触发搜索的用户原始问题(最多 128 字符),有助于理解意图。 |
|
| 否 |
| 可选 IP 地址字符串,用于优先返回本地化搜索结果。 |
2. deepseek_fetch
调用 DeepSeek 独立 Fetch API 抓取单个网页并返回 Markdown 正文。
参数 | 类型 | 必填 | 默认值 | 说明 |
|
| 是 | — | 完整的 |
|
| 否 |
| 返回 Markdown 的最大字符数(≥500),超出时自动截断并提示总长度。 |
环境变量与自检命令
环境变量 | 必填 | 默认值 | 说明 |
| 是 | — | DeepSeek 开放平台 API Key( |
| 否 |
| 自定义 API 地址(用于企业网关或私有代理)。 |
| 否 |
| 单次 HTTP 请求超时秒数。 |
| 否 |
| 遇到 |
| 否 |
|
|
运行配置自检(不发网络请求、不扣费,并对 Key 自动脱敏):
DEEPSEEK_API_KEY=sk-your-key uv run deepseek-web-search-mcp --check本地开发与测试
# 安装运行与开发依赖
uv sync --dev
# 代码风格与静态检查
uv run ruff check src tests
# 运行全部单元测试与 FastMCP 协议测试(全离线,无需真实 API Key)
uv run pytest -vLicense
Available Tools
2 toolsdeepseek_fetchDeepSeek Web FetchARead-onlyIdempotent
Fetch a single webpage and return its cleaned Markdown content (/v1/tools/fetch).
Inputs: url (required), max_chars. Returns: result
deepseek_searchDeepSeek Web SearchCRead-onlyIdempotent
Search the web using DeepSeek's standalone Search API (/v1/tools/search).
Inputs: query (required), count, min_score, detail_level, +2 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
deepseek_search and deepseek_fetch target clearly distinct actions: querying a search endpoint versus retrieving and cleaning a single known URL. There is no plausible scenario where an agent would confuse the two.
Both tools follow an identical namespace_verb snake_case pattern (deepseek_search, deepseek_fetch), matching the server name and each other perfectly. No mixed conventions.
Two tools is on the thin side, but for a search-and-fetch API wrapper they are exactly the two primitives needed, so each earns its place. The surface is minimal rather than padded.
Search plus fetch covers the standard discover-then-read workflow with no dead ends. Minor gaps exist (no batch fetch, crawling, or result-pagination control), but agents can work around them with repeated calls.
Maintenance
Related MCP Connectors
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Web search, structured extraction, page monitor, link check & CVE scan for AI agents over MCP.
Search the web, fetch any URL and map a site as clean, LLM-ready Markdown.
Live web search results and web pages as Markdown; page fetches use a residential network.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to perform multi-engine web search, fetch web pages, and extract clean Markdown content via MCP, with no API keys required.380 PyPI12MIT
- AlicenseAqualityCmaintenanceEnables MCP-compatible clients to search the web and fetch HTTP/HTTPS pages as Markdown, returning result metadata such as titles, URLs, dates, relevance, and summaries.233 npm1MIT
- AlicenseAqualityBmaintenanceEnables MCP-capable AI clients to run web searches through DeepSeek's search engine and fetch individual webpages as Markdown. Search results include relevance scores, authority, and publication times, and support advanced query syntax such as site:, lang:, and date filters.252 npm1Apache 2.0
- AlicenseAqualityCmaintenanceEnables any MCP-compatible AI agent to search the live web and fetch pages as clean Markdown, including batch fetching with rate limiting, retries, and context-safe truncation.3MIT