DeepSeek Search MCP
by CaelixOrbit
README.md
# DeepSeek Search MCP
[English](README.en.md)
非官方的本地 MCP Server,使用 DeepSeek 开放平台 API Key 调用联网搜索和网页抓取接口。仅支持 stdio。
## 环境要求
- Node.js 22 或更新版本
- npm
- DeepSeek 开放平台 API Key,可在 [API Key 管理页面](https://platform.deepseek.com/api_keys)创建
## 安装与启动
推荐使用 npm 全局安装,适合日常使用,启动开销较低且无需自行构建。npx 配置方便,适合快速试用,但启动开销较高;源码构建适合需要修改代码的用户。
以下以已安装的 DeepSeek Harness (DSH) 为例:选择与安装方式和操作系统对应的 YAML 配置,保存为 `deepseek-search.cordis.yml`,替换 API Key 占位符。然后通过独立补丁文件启动 DSH:
```shell
dsh web --patch ./deepseek-search.cordis.yml
```
配置使用官方 [MCP Client 插件](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/mcp/mcp-client/README.md)。DSH 会清理父进程中的敏感环境变量,请保留示例中的显式 `env`。其他 MCP 客户端请按各自文档调整配置格式。
保存配置后,如工具未出现在 MCP 列表中,或配置变更未生效,可尝试重启客户端。
### npm 全局安装(推荐)
```shell
npm install -g deepseek-search-mcp@latest
```
安装完成后,使用以下启动配置:
- Windows:
```yaml
- insert:
- id: mcp-deepseek-search
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: deepseek-search
transport: stdio
command: cmd
args: ['/c', 'deepseek-search-mcp']
env:
DEEPSEEK_API_KEY: 'YOUR_DEEPSEEK_API_KEY'
DEEPSEEK_ENABLE_WEB_FETCH: 'false'
toolCallTimeoutMs: 80000
```
- macOS / Linux:
```yaml
- insert:
- id: mcp-deepseek-search
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: deepseek-search
transport: stdio
command: deepseek-search-mcp
args: []
env:
DEEPSEEK_API_KEY: 'YOUR_DEEPSEEK_API_KEY'
DEEPSEEK_ENABLE_WEB_FETCH: 'false'
toolCallTimeoutMs: 80000
```
### npx 快速试用
无需全局安装或自行编译,配置方便,但启动开销高于全局安装。
- Windows:
```yaml
- insert:
- id: mcp-deepseek-search
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: deepseek-search
transport: stdio
command: cmd
args: ['/c', 'npx', '-y', 'deepseek-search-mcp@latest']
env:
DEEPSEEK_API_KEY: 'YOUR_DEEPSEEK_API_KEY'
DEEPSEEK_ENABLE_WEB_FETCH: 'false'
toolCallTimeoutMs: 80000
```
- macOS / Linux:
```yaml
- insert:
- id: mcp-deepseek-search
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: deepseek-search
transport: stdio
command: npx
args: ['-y', 'deepseek-search-mcp@latest']
env:
DEEPSEEK_API_KEY: 'YOUR_DEEPSEEK_API_KEY'
DEEPSEEK_ENABLE_WEB_FETCH: 'false'
toolCallTimeoutMs: 80000
```
首次启动需要联网下载包。
### 从源码构建
从 [GitHub 仓库](https://github.com/CaelixOrbit/deepseek-search-mcp) 下载源码,在项目根目录执行:
```shell
npm ci
npm run build
```
构建产物位于 `dist`。使用下方 YAML 配置,替换 API Key 和项目绝对路径,并按上面的命令加载该补丁文件。Windows 示例:
```yaml
- insert:
- id: mcp-deepseek-search
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: deepseek-search
transport: stdio
command: node
args: ['C:/path/to/deepseek-search-mcp/dist/index.js']
env:
DEEPSEEK_API_KEY: 'YOUR_DEEPSEEK_API_KEY'
DEEPSEEK_ENABLE_WEB_FETCH: 'false'
toolCallTimeoutMs: 80000
```
macOS / Linux 使用相同配置,将 `args` 改为实际路径,例如 `/path/to/deepseek-search-mcp/dist/index.js`。
## 工具
| MCP 工具 | 对应接口 |
| --- | --- |
| `deepseek_search` | [联网搜索](https://api-docs.deepseek.com/zh-cn/api/search),`POST /v1/tools/search` |
| `deepseek_web_fetch` | [网页抓取](https://api-docs.deepseek.com/zh-cn/api/fetch),`POST /v1/tools/fetch`,默认关闭 |
搜索支持通过 `query` 中的 `site:`、`lang:`、`after:`、`before:` 等语法限制来源、语言和时间。可选参数未提供时直接省略,由官方 API 使用默认行为;搜索结果及网页 Markdown 内容原样返回。
完整参数、搜索语法和计费规则见 [DeepSeek 联网搜索指南](https://api-docs.deepseek.com/guides/search/)及上方接口文档。
## 环境变量
| 变量 | 规则 |
| --- | --- |
| `DEEPSEEK_API_KEY` | 必填,DeepSeek 开放平台 API Key |
| `DEEPSEEK_ENABLE_WEB_FETCH` | 设为 `"true"` 时启用 `deepseek_web_fetch`,默认关闭 |
考虑到不少 Agent 软件已经自带网页抓取功能,需要付费使用的 `deepseek_web_fetch` 默认关闭,也不会出现在客户端的工具列表中。需要时,可将 `DEEPSEEK_ENABLE_WEB_FETCH` 设置为 `"true"` 来开启。
## 超时与错误
本地 HTTP 请求超时为 70 秒,客户端工具等待时间应更长。示例中的 `toolCallTimeoutMs: 80000` 为 DSH MCP Client 配置字段,其他客户端请使用各自的超时设置。本服务不向 DeepSeek API 添加额外的超时参数。
API 请求失败时,工具返回 HTTP 状态和官方错误中的 `message`、`type`、`code`;响应包含 `x-request-id` 时一并返回,便于排查。
## 费用
调用使用 DeepSeek 开放平台账户额度。具体价格和计费规则见 [DeepSeek 联网搜索指南](https://api-docs.deepseek.com/guides/search/)。
## 许可证
MIT,Copyright (c) 2026 Caelix。
TDQS
B3.2/5.0
Scored across 1 tool
Disambiguation5/5
With a single tool there is no possibility of misselection or overlap; its purpose is unambiguous. The name and description align cleanly, leaving nothing to confuse.
Naming Consistency5/5
The lone tool uses a clear snake_case verb_noun style (deepseek_search) that matches its server identity. No mixed conventions exist since there is only one name.
Tool Count3/5
A one-tool surface is borderline thin even for a search server; typical search MCPs expose pagination, filtering, or multiple content types. It works but leaves little room for user control.
Completeness3/5
Core web search is covered, but there are no options for result count, pagination, freshness, or filtering, which are common expectations. The surface is functional yet notably shallow for a search domain.
Maintenance
ActivityMaintained
ResponsivenessNo issues