deepseek-websearch-mcp
You can search the web and fetch web pages through this MCP server, which exposes two tools.
web_search — Search the web via DeepSeek's search engine and get structured results with ranking scores, authority, and publish times.
Use advanced query syntax:
site:,-site:,"exact phrase",lang:zh,en,after:2025,before:2026,-exclude.Control results: return 1–50 items (default 10), provide the original question for better intent, set a localization IP, and optionally include page content (
need_content).web_fetch — Fetch a single web page and get its title plus Markdown body.
Fetch any valid HTTP/HTTPS URL (up to 8192 chars, no credentials), typically from a
web_searchresult, to read full content.
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-websearch-mcpsearch for recent MCP server security best practices and fetch the top result"
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-websearch-mcp
基于 DeepSeek 网页搜索与抓取 API 的 MCP server(stdio 传输),为支持 MCP 的 AI 客户端(Claude Code、Cursor、VS Code 等)提供两个工具:
web_search —— DeepSeek 自研搜索引擎,返回带相关性分数、权威性、发布时间的结构化结果,支持
site:、lang:、after:等搜索语法web_fetch —— 抓取单个网页,返回 Markdown 正文
前置要求
Node.js ≥ 20
DeepSeek API Key(Search/Fetch 按成功请求计费:5 元/千次)
Related MCP server: DeepSeek Search MCP
安装与配置
认证信息通过环境变量 DEEPSEEK_API_KEY 注入。
环境变量 | 必填 | 默认 | 说明 |
| 是 | - | DeepSeek API Key,缺失时启动即退出 |
| 否 |
| API 基址(自建网关/调试用) |
| 否 |
| 单次 HTTP 请求超时(毫秒) |
方式一:npx 直接运行(推荐)
npx -y @frankzhang.ai/deepseek-websearch-mcp方式二:全局安装
npm install -g @frankzhang.ai/deepseek-websearch-mcp
deepseek-websearch-mcp方式二备选:从 GitHub 安装(不经 npm registry)
npx -y github:xinzhuang/deepseek-websearch-mcp注意:npm v11 对
npm install -g github:...存在已知缺陷(安装后留下指向已清理临时目录的死链,见 npm/cli#1390 一类问题),如遇command not found请改用上方 registry 安装。
方式三:客户端配置
Claude Code
claude mcp add deepseek-websearch -s user -e DEEPSEEK_API_KEY=sk-你的key -- npx -y @frankzhang.ai/deepseek-websearch-mcpCursor / 通用 JSON(mcp.json)
{
"mcpServers": {
"deepseek-websearch": {
"command": "npx",
"args": ["-y", "@frankzhang.ai/deepseek-websearch-mcp"],
"env": { "DEEPSEEK_API_KEY": "sk-你的key" }
}
}
}VS Code(mcp.json)
{
"servers": {
"deepseek-websearch": {
"command": "npx",
"args": ["-y", "@frankzhang.ai/deepseek-websearch-mcp"],
"env": { "DEEPSEEK_API_KEY": "sk-你的key" }
}
}
}工具说明
web_search
参数 | 类型 | 必填 | 说明 |
| string | 是 | 1~128 字符;支持 |
| integer | 否 | 返回条数 1~50,默认 10 |
| string | 否 | 触发搜索的用户原始问题 |
| string | 否 | 本地化 IP |
| boolean | 否 | 返回网页正文,默认 false(正文较长,按需开启) |
web_fetch
参数 | 类型 | 必填 | 说明 |
| string | 是 | ≤8192 字符的 http/https URL,不允许携带用户名密码 |
错误处理
408/429/5xx 自动指数退避重试(最多 2 次);402 及其余 4xx 不重试
预期内错误以
isError工具结果返回模型可读消息;DEEPSEEK_API_KEY缺失时启动即报错退出限速:Search/Fetch 各 5 QPS(账号级)
开发
npm install
npm run typecheck # 类型检查
npm test # 单元 + stdio 端到端(全 mock,无需 Key)
DEEPSEEK_API_KEY=sk-xxx npm test # 额外运行真实 API 集成测试(会产生计费调用)
npm run build # tsc 构建到 dist/License
Available Tools
2 toolsweb_fetchA
抓取单个网页,返回页面标题与 Markdown 正文。适用于读取 web_search 结果中某个 URL 的完整内容。
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | 要抓取的网页地址,必须为含主机的 http/https URL,不允许携带用户名或密码 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full disclosure burden. It does state the return format (title + Markdown), but says nothing about auth, rate limits, JS-rendered pages, redirects, or failure behavior for a network-fetching tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences with zero filler; the capability statement is front-loaded and the usage note follows immediately.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter fetch with no output schema, the description covers what it does and what it returns at a high level. Error/edge-case behavior is unaddressed, but the core call contract is clear.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and there is a single param whose constraints (http/https, host required, no credentials) are fully documented in the schema. The description adds no further parameter detail, so baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Cites a specific verb+resource (抓取单个网页) and explicitly states the return payload (页面标题与 Markdown 正文). It also names the sibling web_search and contrasts the scopes, so an agent can distinguish fetch-full-content from search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives clear context: use it to read the full content of a URL sourced from web_search results. This routes the agent to the right sibling, but stops short of stating exclusions (e.g., when not to fetch, or non-HTML targets).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
web_searchB
使用 DeepSeek 搜索引擎搜索网页,返回带排序分数、权威性、发布时间的结构化结果。query 支持 site: / -site: / "精确短语" / lang:zh,en / after:2025 / before:2026 / -排除词 等语法。
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | 返回条数,1~50,默认 10 | |
| query | Yes | 搜索词,1~128 个字符,不能全为空白。支持搜索语法:site:github.com、-site:example.com、"精确短语"、lang:zh,en、after:2025-01-01、before:2026、-排除词 | |
| localization | No | 用于优先返回本地化搜索结果的 IP 地址(可选) | |
| need_content | No | 是否同时返回网页正文,默认 false。正文较长,仅在需要阅读全文时开启 | |
| ori_question | No | 触发搜索的用户原始问题(可选),有助于更好地理解搜索意图 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose the shape of the return (structured results with ranking score, authority, timestamp). However it says nothing about rate limits, auth, pagination, or result-count caps beyond what the schema states, so the behavioral picture remains partial for a no-annotation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with what the tool does and what it returns, followed by the query grammar. Dense and free of filler, though the second sentence substantially restates the schema's query description rather than earning new space.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description usefully compensates by naming the returned fields (ranking score, authority, publish time). It is largely sufficient for calling the tool correctly, with the main remaining gap being routing against the sibling web_fetch.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all five parameters are already documented in the schema, including the same query-syntax list. The description's syntax sentence largely duplicates the schema's query description and adds no extra semantics, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource ('使用 DeepSeek 搜索引擎搜索网页') and characterizes the return as structured results with ranking score, authority and publish time. It clearly reads as a search tool, implicitly distinct from the sibling web_fetch, but it never names or contrasts with that sibling explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no when-to-use or when-not-to-use guidance and no mention of the alternative web_fetch for retrieving a known page. The only hint of usage is the query-syntax enumeration, which describes how to query rather than when this tool is the right choice.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.0- First observed
web_fetch - First observed
web_search
TDQS
Scored across 2 tools
web_search and web_fetch have clearly distinct purposes: one searches, the other retrieves page content. No overlap in function, and descriptions explicitly reference how they complement each other.
Both tool names follow a consistent snake_case verb_noun pattern with a shared 'web_' prefix, making the relationship and action clear.
With only 2 tools, the set is thin for a websearch server. While each tool earns its place, the absence of additional operations (e.g., batch fetch or result pagination) makes the count borderline.
The core workflow of searching and fetching pages is covered, and search syntax is rich. Minor gaps like batch fetching or advanced result filtering keep it from being fully complete.
Maintenance
Related MCP Connectors
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Scrape, crawl and search the web for AI agents via MCP.
Web search API and MCP server for developers building AI agents.
Free web search for AI agents. No API key required. Hosted MCP in active development.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables MCP clients to run web searches via DeepSeek's open platform API, with optional web page fetching that returns Markdown content, and supports query syntax for source, language, and time filters.188 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to run web searches and fetch individual web pages as Markdown through DeepSeek's official Search/Fetch API, with freshness filtering, structured metadata such as publish date, authority and rerank scores, and raw structured output.87 npm2MIT
- AlicenseAqualityCmaintenanceEnables MCP clients to run ranked web searches with DeepSeek's search operators and to retrieve pages as titles and Markdown through DeepSeek's official Search and Fetch APIs, without invoking a chat model. Results are returned as structured content plus matching JSON text, with options for result count, page content, localization, and original-question context.250 npm3MIT
- AlicenseNot gradedqualityCmaintenanceEnables agents to run web searches and fetch HTTP(S) pages as Markdown via the DeepSeek Search/Fetch API, returning titles, URLs, summaries, publication dates, authority scores, and optional page content. Supports advanced query operators like site:, exact phrases, exclusion terms, lang:, and date-range filters, with retries, timeouts, and structured errors.1MIT