Skip to main content
Glama
SAN-SHIa

DeepSeek Search MCP

by SAN-SHIa

DeepSeek Search MCP

一个零依赖的 Node.js MCP Server,为支持 MCP 的客户端提供 DeepSeek Web Search 和网页 Fetch工具。

功能

  • deepseek_web_search:搜索网页,返回标题、URL、日期、相关度和摘要。

  • deepseek_fetch:抓取指定 HTTP/HTTPS 网页,并以 Markdown 正文返回。

Related MCP server: mcp-web-search-server

准备工作

1. 获取 DeepSeek API Key

在 DeepSeek 控制台创建 API Key:

https://platform.deepseek.com/api_keys

API Key 只应通过环境变量或客户端配置注入。不要把真实 Key 写进源代码、提交到 Git,或发布到 npm。

2. 环境要求

  • Node.js >= 18(需要原生 fetch)

  • 一个支持 MCP 的客户端

在 Codex / ZCode 中配置

推荐:使用命令配置

先在当前终端设置 API Key,再执行:

export DEEPSEEK_API_KEY="你的 DeepSeek API Key"
codex mcp add deepseek-search \
  --env DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
  -- npx -y @ythirty/deepseek-search-mcp

如果使用本地源码:

export DEEPSEEK_API_KEY="你的 DeepSeek API Key"
codex mcp add deepseek-search \
  --env DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
  -- node /绝对路径/deepseek-search-mcp/server.mjs

查看是否添加成功:

codex mcp list

删除配置:

codex mcp remove deepseek-search

ZCode 如果使用 Codex 的 MCP 配置,也可以直接执行以上命令。

手动编辑配置文件

Codex 使用 TOML 配置文件:

~/.codex/config.toml

ZCode 如果兼容 Codex 的 MCP 配置,也使用同一文件。加入:

[mcp_servers.deepseek-search]
command = "npx"
args = ["-y", "@ythirty/deepseek-search-mcp"]

[mcp_servers.deepseek-search.env]
DEEPSEEK_API_KEY = "你的 DeepSeek API Key"

也可以直接运行本地源码:

[mcp_servers.deepseek-search]
command = "node"
args = ["/绝对路径/deepseek-search-mcp/server.mjs"]

[mcp_servers.deepseek-search.env]
DEEPSEEK_API_KEY = "你的 DeepSeek API Key"

修改配置后,重启客户端或重新建立会话。

在 Claude Code 中配置

Claude Code 支持直接使用命令配置 MCP:

export DEEPSEEK_API_KEY="你的 DeepSeek API Key"
claude mcp add deepseek-search \
  --transport stdio \
  --env DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
  -- npx -y @ythirty/deepseek-search-mcp

查看已配置的 MCP 服务:

claude mcp list

删除配置:

claude mcp remove deepseek-search

Claude Code 的用户级 MCP 配置通常保存在:

~/.claude.json

也可以使用本地源码:

claude mcp add deepseek-search \
  --transport stdio \
  --env DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
  -- node /绝对路径/deepseek-search-mcp/server.mjs

本地运行

DEEPSEEK_API_KEY="你的 DeepSeek API Key" node server.mjs

服务使用 stdio 传输。客户端启动服务后,会通过 MCP 的 tools/list 获取工具定义,再根据用户请求调用对应工具。

搜索参数

deepseek_web_search 支持:

  • query:必填,最多 128 个字符;支持 site:、-关键词、精确短语、lang:、after: 和 before:。

  • count:返回条数,1–50,默认 50。

  • need_content:是否返回网页正文。

  • ori_question:原始用户问题,可帮助搜索引擎理解意图。

  • localization:用于本地化结果的 IP 地址。

故障排查

  1. 确认 Node.js 版本不低于 18:node --version

  2. 确认 API Key 有效且账户余额充足。

  3. 确认客户端配置中的 command、args 和 env 格式正确。

  4. 修改配置后重启客户端。

  5. 若使用本地路径,args 中必须填写 server.mjs 的绝对路径。

许可证

MIT

Available Tools

2 tools
deepseek_fetchA

用 DeepSeek Fetch 抓取单个网页,以 Markdown 正文返回。适合读取某条搜索结果或指定文章的全文。

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes要抓取的 HTTP/HTTPS URL

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry behavioral disclosure. It adds useful output information (Markdown main content) and scope (single webpage), but does not cover permissions, rate limits, redirects, rendering behavior, or failure modes. This is adequate but leaves notable gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the core action and return format, followed by the usage context. No redundant or filler content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter fetch tool with no output schema, the description supplies the return format (Markdown main content) and the intended use case. It could do more on behavioral limits, but is largely complete for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the only parameter (url) is already documented as an HTTP/HTTPS URL. The description adds no further parameter semantics, making the baseline of 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: fetching a single webpage and returning Markdown main content. It distinguishes the tool's single-page scope from the sibling search tool by implying it is used to read a search result or specified article, though it does not explicitly name deepseek_web_search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear usage context: suitable for reading the full text of a search result or a specified article. It does not explicitly state when not to use it or name the search alternative, but the intended workflow is clear.

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.

  1. 2 tool updatesv1.0.0
    • First observeddeepseek_fetch
    • First observeddeepseek_web_search

TDQS

A3.8/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one searches the web and returns result lists, the other retrieves the full Markdown body of a single URL. There is no plausible scenario where an agent confuses discovery with retrieval, and the descriptions reinforce the boundary.

Naming Consistency4/5

Both names use the same deepseek_ prefix and snake_case convention, which is consistent and readable. The minor asymmetry is that one is qualified (web_search) while the other is bare (fetch), but the action verbs remain clear and predictable.

Tool Count3/5

Two tools is thin, sitting at the borderline of the 1-2 tool range that risks feeling under-built. However, for a search-and-retrieve service these are the two essential operations and neither is redundant, so it is defensible rather than deficient.

Completeness4/5

The search-plus-fetch pairing covers the standard research lifecycle end to end: find candidate pages, then read the full text of one. Nice-to-haves like batch fetching or paginated result continuation are absent, but agents can work around that with repeated calls.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    MCP server that provides web search scraping from DuckDuckGo (with Mojeek fallback) and URL content fetching as markdown/text or raw HTML.
    1
    -
  • A
    license
    A
    quality
    C
    maintenance
    Enables MCP clients to perform free web search and read web pages as markdown without paid APIs, Docker, or a background service, by querying multiple free search engines in parallel with optional fallbacks and extracting clean page content. Also supports fetching a site's llms.txt documentation files.
    3
    MIT