deepseek-mcp
Bridges MCP clients to the DeepSeek API for chat completions and model discovery, with an optional locked-down bridge that delegates prompts to local CLI harnesses like Claude, Codex, or opencode.
README
deepseek-mcp
An MCP server that bridges CLI harnesses to the DeepSeek API. Callers (Claude Code, Codex, opencode, or any MCP client) connect over stdio and get DeepSeek chat completions — plus the option to hand work back to a local harness session.
Quickstart
One-shot install straight from the repo (clone lives in ~/.deepseek-mcp, override with DEEPSEEK_MCP_HOME). Fresh installs prompt for your API key — it opens the key page and reads a hidden paste. Updates keep your existing .env untouched:
curl -fsSL https://raw.githubusercontent.com/Korck-lab/deepseek-mcp/main/scripts/install.sh | bash
Prefer reviewing the script first, or hit terminal weirdness (no controlling tty: SSH without -t, CI)? Download then run — stdin stays yours, no pipe tricks:
curl -fsSL https://raw.githubusercontent.com/Korck-lab/deepseek-mcp/main/scripts/install.sh -o /tmp/deepseek-mcp-install.sh
bash /tmp/deepseek-mcp-install.sh
Manual clone:
git clone https://github.com/Korck-lab/deepseek-mcp
cd deepseek-mcp
npm install
npm run build
cp .env.example .env # paste your DEEPSEEK_API_KEY
npm run install:cli # interactive: pick claude/codex/opencode + scope
Then run claude mcp list, codex mcp list, or opencode mcp list to confirm the deepseek server shows Connected, and use it from that client. See Interactive installer for flags and scope details.
Features
- Chat completions — OpenAI-style
messages→ DeepSeek. Supportsdeepseek-v4-flash/deepseek-v4-proreasoning models, includingreasoning_content. - Model discovery —
list_modelsfetches available model ids from the API. - Harness bridge —
use_harnessruns a prompt in a headless host CLI (claude -p,codex exec,opencode run, or any command you configure), letting the DeepSeek model drive local agents, skills, plugins, and MCP tools configured on that host. - Locked by default — the bridge is off until you explicitly allowlist hosts.
- Zero shell — harness commands run as
spawnargument arrays, never through a shell. Prompts are positional args, so no injection surface. dotenvconfig — keys and harness commands live in.env.
Tools
| Tool | Description |
|---|---|
chat |
Send a chat completion request; returns assistant text (reasoning + answer for reasoning models). |
list_models |
List models available on the DeepSeek API. |
use_harness |
Run a prompt in a configured host CLI. Host must be allowlisted. |
list_harnesses |
Show configured harness hosts and their commands. |
Setup
npm install
cp .env.example .env # add your DEEPSEEK_API_KEY
npm run build
npm test # protocol smoke test + live API + harness bridge
Run the server:
npm start
Configuration
| Variable | Default | Purpose |
|---|---|---|
DEEPSEEK_API_KEY |
— | Required. DeepSeek API key. |
DEEPSEEK_BASE_URL |
https://api.deepseek.com |
API base URL. |
DEEPSEEK_MODEL |
deepseek-chat |
Default model for chat. |
HARNESS_ALLOW_HOSTS |
(empty = locked) | Comma-separated hosts the bridge may drive. |
HARNESS_CMD_<HOST> |
— | Headless command for a host, e.g. HARNESS_CMD_CLAUDE=claude -p. |
Example bridge config (opencode is a TUI and needs a PTY wrapper on macOS):
HARNESS_ALLOW_HOSTS=claude,codex,opencode
HARNESS_CMD_CLAUDE=claude -p
HARNESS_CMD_CODEX=codex exec --skip-git-repo-check
HARNESS_CMD_OPENCODE=script -q /dev/null opencode run
MCP client config
{
"mcpServers": {
"deepseek": {
"command": "node",
"args": ["/absolute/path/to/deepseek-mcp/dist/index.js"]
}
}
}
Interactive installer
Register the server with Claude Code, Codex, and/or opencode — no manual config editing:
npm run install:cli
Prompts ask which CLI(s) to install and the scope:
- global — your user config (
~/.claude.json,~/.codex/config.toml,~/.config/opencode/opencode.json) - project — local to this repo (Claude
--scope local,.codex/config.toml,./opencode.json; gitignored)
Optionally embeds DEEPSEEK_API_KEY into the client config (recommended for global scope, so the server works outside this repo). Scriptable:
npm run install:cli -- --clis claude,codex,opencode --scope global --embed key --yes
Flags: --clis a,b,c, --scope global|project, --embed key|skip, --yes.
Auto-versioning
Local git hooks bump the version and tag releases automatically from conventional commit messages — no manual version edits, no CI needed.
npm run hooks:install # git config core.hooksPath .githooks (per-repo)
On every commit it reads the commit message and:
| Commit type | Example | Bump |
|---|---|---|
| breaking | feat!: drop node 18, or BREAKING CHANGE in body |
major |
feat: |
feat: add installer |
minor |
fix: / perf: |
fix: opencode pty wrapper |
patch |
| anything else | docs:, chore:, test:, refactor: |
none |
After the commit is created, a post-commit hook reads the real message from COMMIT_EDITMSG (the message is not available earlier — pre-commit runs before it exists), bumps package.json (+package-lock.json), amends the commit so the bump is included, then creates an annotated tag vX.Y.Z. Merge commits never re-bump; amends do re-bump (tag already exists, so it just skips). Run npm version manually at any time to override.
Security
- The bridge is disabled until you allowlist hosts. With
HARNESS_ALLOW_HOSTSempty,use_harnesserrors. - Harness commands run without a shell; the prompt is a single positional argument.
- The API key lives only in
.env(gitignored) and is sent only to the DeepSeek API. - Each harness call spawns a fresh headless session — no access to the calling client's session state. Note that a harness CLI runs with its own configured tools and credentials; only allowlist hosts you trust.
Development
npm run build— compilesrc/→dist/npm run dev— run from source withtsxnpm test— MCP protocol smoke test (handshake, tools/list, live chat, model list, harness bridge)
Requires Node.js >= 20.
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。