deepseek-web-search
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-searchsearch the web for recent DeepSeek API search documentation updates after 2025-01"
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
把 DeepSeek 的 Web Search 和 Fetch 接口暴露给 AI 客户端的本地 stdio MCP server。原样返回 DeepSeek 的 JSON,不过滤、不重排、不截断。
安装
要求 Node.js >= 22.12。
npm install
npm run buildRelated MCP server: websearch-deepseek
配置
server 只从环境变量读 Key,不读 .env。Key 已在 shell 中 export 时,一条命令完成注册:
claude mcp add-json --scope user deepseek-web-search \
'{"type":"stdio","command":"/home/redrocker/.nvm/versions/node/v22.23.2/bin/node","args":["/home/redrocker/File/deepseek-web-search-mcp/dist/index.js"],"env":{"DEEPSEEK_API_KEY":"${DEEPSEEK_API_KEY}"},"timeout":180000}'也可以把 ${DEEPSEEK_API_KEY} 换成实际 Key。
--scope:user全局可用,local仅当前项目(默认),project写入仓库.mcp.json并会提交 Key。timeout:单次工具调用上限,fetch 最坏 180 秒,保留该字段。command:node 绝对路径,避免取到 PATH 里系统自带的旧版本。
其他客户端用等价的 JSON 配置(timeout 字段可以删):
{
"mcpServers": {
"deepseek-web-search": {
"type": "stdio",
"command": "/home/redrocker/.nvm/versions/node/v22.23.2/bin/node",
"args": ["/home/redrocker/File/deepseek-web-search-mcp/dist/index.js"],
"env": { "DEEPSEEK_API_KEY": "sk-..." },
"timeout": 180000
}
}
}工具名:mcp__deepseek-web-search__search、mcp__deepseek-web-search__fetch。改了 src/ 要重新 npm run build 并重启会话。
工具
search
参数 | 类型 | 默认 | 说明 |
| string | 必填 | 1~128 字符,支持 |
| integer | 10 | 1~50 |
| boolean | false | 返回网页正文,可能非常大 |
| string | — | 用户原始问题 |
| string[] | — | 限定 / 排除站点,多站点用 |
| string[] | — | 如 |
| string | — |
|
| string | — | 精确匹配短语 |
| string[] | — | 排除包含这些词的网页 |
结构化参数追加到 query 后面,与 query 里手写的操作符叠加,不去重。
fetch
参数 | 类型 | 说明 |
| string | 绝对 HTTP/HTTPS URL,≤8192 字符,不能带凭据 |
返回与错误
HTTP 2xx:一个 text block,DeepSeek 响应体原文。
HTTP 非 2xx:两个 text block(
HTTP <status>+ 原文),isError: true。配置、参数、网络错误:一个 text block 说明原因,
isError: true。不截断:
need_content=true或抓取长页面时结果可能很大。
环境变量
变量 | 必填 | 说明 |
| 是 | 缺失时 server 仍能启动,调用工具返回配置错误 |
| 否 | 默认 |
超时与重试
单次超时:search 30 秒,fetch 60 秒;总上限 90 / 180 秒。
仅 408、429、5xx 重试,最多 2 次,指数退避 + 抖动,尊重
Retry-After(上限 30 秒)。其他 4xx、网络错误、超时不重试。
限速 search 100 QPS、fetch 25 QPS;5 元 / 1000 次成功请求。
开发
npm run typecheck
npm test
npm run dev
DEEPSEEK_INTEGRATION=1 DEEPSEEK_API_KEY=... npm run test:integration集成测试通过 stdio 启动 dist/index.js,实际发起 1 次 search + 1 次 fetch;未设置 DEEPSEEK_INTEGRATION=1 时跳过。
安全
Key 只从环境变量读取,不写入日志或工具输出;stdio 下 stdout 只承载 MCP 协议,日志走 stderr;除非设置 DEEPSEEK_BASE_URL,只连接 api.deepseek.com。
License
MIT
Available Tools
2 toolsfetchFetch URL as MarkdownARead-only
Fetch a URL through DeepSeek and return the raw JSON response exactly as received.
The response is a JSON object with title (string) and content (Markdown). The content is not truncated by this server.
The URL must be an absolute HTTP/HTTPS URL of at most 8192 characters and must not contain credentials.
Billing: 5 CNY per 1,000 successful fetches. Rate limit: 25 QPS.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute HTTP/HTTPS URL to fetch. Must not contain credentials. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Goes well beyond the readOnly/openWorld annotations: it discloses that content is not truncated by the server, the return shape, billing at 5 CNY per 1,000 successful fetches, and a 25 QPS rate limit. Those cost/throughput facts are exactly the operational context annotations cannot carry.
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?
Four short sentences, each doing a job: what it does, what returns, validity constraints, cost/rate. Nothing is padded, though the URL constraints duplicate the schema rather than adding value.
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?
There is no output schema, and the description compensates by describing the returned object's fields and the no-truncation guarantee. Cost and rate limits round out everything an agent needs to call this predictably.
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 coverage is 100% and the single `url` parameter is already fully documented in the schema (absolute HTTP/HTTPS, no credentials, maxLength 8192). The description restates the same constraints without adding format examples or edge-case handling, so this is textbook baseline territory.
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?
States a specific verb and resource ('Fetch a URL through DeepSeek') and says what comes back (raw JSON with title and Markdown content). The one blemish is the title saying 'as Markdown' while the body says 'raw JSON', which could briefly confuse, though the body reconciles it. It does not contrast with the `search` sibling.
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?
The description gives hard input constraints (absolute HTTP/HTTPS, no credentials, 8192 chars) but never says when to reach for this tool versus `search` or when not to use it. An agent is left to infer that this is for a known URL rather than discovery.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
searchDeepSeek Web SearchARead-only
Search the web with DeepSeek's search API and return the raw JSON response exactly as received.
The response is a JSON object with a results array; fields include rerank_score, title, url, snippet, summary, content, site_name, site_icon, date, and authority.
Set need_content=true to include full page content (can be very large). Prefer the fetch tool for a specific URL.
query supports DeepSeek search syntax: site:github.com, -site:example.com, -term, "exact phrase", lang:zh,en, after:2025-01-01, before:2026. Structured filters are appended to query. Results are not filtered or truncated by this server. Billing: 5 CNY per 1,000 successful requests that produce results. Rate limit: 100 QPS.
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Preferred languages, for example ["zh", "en"]. | |
| site | No | Only include these sites. Multiple sites are joined with OR. | |
| after | No | Only results published after this date: YYYY, YYYY-MM, or YYYY-MM-DD. | |
| count | No | Number of results to return, 1-50. Default: 10. | |
| query | Yes | Search text, 1-128 Unicode characters. Supports DeepSeek syntax: site:github.com, -site:example.com, -term, "exact phrase", lang:zh,en, after:2025-01-01, before:2026. | |
| before | No | Only results published before this date: YYYY, YYYY-MM, or YYYY-MM-DD. | |
| exact_phrase | No | Require this exact phrase. | |
| need_content | No | Include full page content in each result. Default: false. Responses can be very large. | |
| ori_question | No | The user's original question, 1-128 characters. Helps the search service understand intent. | |
| exclude_sites | No | Exclude these sites. | |
| exclude_terms | No | Exclude pages containing these terms. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations only cover readOnly/openWorld; the description adds real operational context the agent cannot otherwise know: billing (5 CNY/1,000 requests producing results), a 100 QPS rate limit, and the fact that results are neither filtered nor truncated server-side. It also warns that need_content output can be very large.
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?
Well front-loaded — what it is, what comes back, the key flag, then syntax and billing. Dense with no filler, though the response-field list and syntax list make it longer than strictly necessary since the schema already repeats the query syntax.
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 an 11-parameter, no-output-schema search tool, the description covers return shape (results array with named fields), size risk, cost, rate limits, and syntax. Nothing an agent needs to call this correctly is missing.
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 coverage is 100%, so the baseline is 3. The description still adds value by documenting DeepSeek query-syntax support and by clarifying a cross-parameter behavior not visible in the schema: structured filters are appended to the query string.
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?
States a specific verb and resource ('Search the web with DeepSeek's search API') and specifies the return contract ('raw JSON response exactly as received'). It also distinguishes itself from the sibling by naming 'fetch' for single-URL retrieval.
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?
Explicitly routes single-URL needs to the 'fetch' tool and gives a condition for need_content ('can be very large'). It stops short of describing when *not* to use search at all, but the alternative framing is clear enough to guide selection.
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
fetch - First observed
search
TDQS
Scored across 2 tools
search and fetch have clearly distinct purposes: discovery via query vs. retrieval of a specific known URL. The search description even explicitly redirects agents to fetch for a specific URL, eliminating any overlap.
Both tools use a single lowercase verb with no mixed conventions (no camelCase, no noun-only names). The pattern is fully predictable across the two-tool surface.
Two tools is on the thin side, but for a narrowly scoped search-and-retrieve proxy it is exactly the right surface — no tool feels extraneous and none is missing. Slightly below 5 only because the count leaves no room for filter/parameter discovery aids.
Search plus fetch covers the full web-retrieval lifecycle with no dead ends, and both tools return raw upstream JSON. Minor gap: structured filters are mentioned as being 'appended to query' without explicit parameters, so agents must guess the syntax.
Maintenance
Related MCP Connectors
Docs: https://docs.keenable.ai/mcp-server Keenable is a free, remote MCP server that gives agents access to the web index. Search the web with ranked results and date/site filters, then fetch any indexed page as clean markdown. Works out of the box with no account or API key.
Free web search for AI agents. No API key required. Hosted MCP in active development.
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseAqualityDmaintenanceA general MCP server providing web search capabilities using DeepSeek's native online search API.130 npm33MIT
- AlicenseAqualityCmaintenanceAn MCP server that provides web search powered by DeepSeek's native search API, returning AI-generated answers with source links. Integrates with MCP-compatible clients like Claude Code and Cursor.1MIT
- AlicenseAqualityCmaintenanceExposes DeepSeek's Search and Fetch REST APIs as two read-only MCP tools, letting any MCP-capable agent run ranked web searches and retrieve individual pages as truncated Markdown. Works with whichever model the host runs, over stdio or Streamable HTTP.2MIT
- AlicenseNot gradedqualityCmaintenanceExposes DeepSeek's web search and page-fetch tools to any MCP client, letting any LLM run searches with quality signals like rerank score and source authority, plus advanced query syntax. It also retrieves single pages as Markdown, with built-in throttling, retries, and size-conscious summaries.MIT