npm deepseek-mcp-serverstdioMITupdated 20d ago
Model Context Protocol server for the current DeepSeek V4 API.
DeepSeek MCP Server 能做什么?
DeepSeek MCP Server
Model Context Protocol server for the current DeepSeek V4 API.
As of August 18, 2026, DeepSeek's public API reference documents:
POST /chat/completionswithdeepseek-v4-flashanddeepseek-v4-proPOST /responseswith native OpenAI Responses API request and response shapesPOST /beta/completionsfor V4 Pro FIM completionGET /modelsGET /user/balance
This server exposes only those documented API surfaces. It does not ship a V4 monitor, speculative image/video/upload tools, or automatic model substitution.
Tools
chat_completion: DeepSeek V4 chat. Defaults todeepseek-v4-flash. Supportsthinking: { "type": "enabled" | "disabled" },reasoning_effort: "low" | "high" | "max", JSON output, function tools, logprobs, streaming, and conversation memory.create_response: Stateless native Responses API calls with text or structured input, reasoning effort controls, function tools, server-side web search, structured output, and semantic streaming.completion: DeepSeek V4 Pro FIM completion. Defaults todeepseek-v4-pro.list_models: Reads the live DeepSeek model list.get_user_balance: Reads account balance and availability.reset_conversation: Clears an in-memory conversation.list_conversations: Lists in-memory conversation IDs.
Hosted Remote
- URL:
https://deepseek-mcp.ragweld.com/mcp - Auth:
Authorization: Bearer <token>
Codex CLI:
export DEEPSEEK_MCP_AUTH_TOKEN="REPLACE_WITH_TOKEN"
codex mcp add deepseek --url https://deepseek-mcp.ragweld.com/mcp --bearer-token-env-var DEEPSEEK_MCP_AUTH_TOKEN
Claude Code:
export DEEPSEEK_MCP_AUTH_TOKEN="REPLACE_WITH_TOKEN"
claude mcp add --transport http deepseek https://deepseek-mcp.ragweld.com/mcp --header "Authorization: Bearer $DEEPSEEK_MCP_AUTH_TOKEN"
Cursor:
node -e 'const fs=require("fs"),p=process.env.HOME+"/.cursor/mcp.json";let j={mcpServers:{}};try{j=JSON.parse(fs.readFileSync(p,"utf8"))}catch{};j.mcpServers={...(j.mcpServers||{}),deepseek:{url:"https://deepseek-mcp.ragweld.com/mcp",headers:{Authorization:"Bearer ${env:DEEPSEEK_MCP_AUTH_TOKEN}"}}};fs.mkdirSync(process.env.HOME+"/.cursor",{recursive:true});fs.writeFileSync(p,JSON.stringify(j,null,2));'
Local Stdio
DEEPSEEK_API_KEY="REPLACE_WITH_DEEPSEEK_KEY" npx -y deepseek-mcp-server
Docker:
docker pull docker.io/dmontgomery40/deepseek-mcp-server:0.5.0
docker run --rm -i -e DEEPSEEK_API_KEY="REPLACE_WITH_DEEPSEEK_KEY" docker.io/dmontgomery40/deepseek-mcp-server:0.5.0
Environment
Required:
DEEPSEEK_API_KEY=your-api-key
Optional:
DEEPSEEK_BASE_URL=https://api.deepseek.com
DEEPSEEK_REQUEST_TIMEOUT_MS=120000
DEEPSEEK_DEFAULT_MODEL=deepseek-v4-flash
MCP_TRANSPORT=stdio
MCP_HTTP_HOST=127.0.0.1
MCP_HTTP_PORT=3001
MCP_HTTP_PATH=/mcp
MCP_HTTP_STATEFUL_SESSION=false
MCP_HTTP_ALLOWED_ORIGINS=https://app.example.com,http://localhost:3000
CONVERSATION_MAX_MESSAGES=200
MCP_HTTP_ALLOWED_ORIGINS is only needed for browser-based clients. Streamable HTTP requests that send an Origin header are rejected with 403 unless the exact origin appears in this comma-separated allowlist; normal MCP clients that omit Origin are unaffected.
Verification
npm run build
npm test
DEEPSEEK_API_KEY="REPLACE_WITH_DEEPSEEK_KEY" npm run test:live
DEEPSEEK_MCP_AUTH_TOKEN="REPLACE_WITH_TOKEN" npm run test:remote
The live smoke test performs real DeepSeek requests for model listing, balance, non-thinking chat, thinking streaming chat with reasoning_content, a native Responses API call, FIM completion, and MCP tool calls.
Protocol Compatibility
This release uses the supported @modelcontextprotocol/sdk v1 line and the 2025-era MCP initialization flow. Migrating to the split v2 packages and the 2026-07-28 protocol era is intentionally outside this maintenance update because it changes lifecycle and packaging contracts rather than being a drop-in dependency bump.
Registry Identity
- MCP Registry name:
io.github.DMontgomery40/deepseek - npm package:
deepseek-mcp-server - OCI package:
docker.io/dmontgomery40/deepseek-mcp-server:0.5.0
Official References
- DeepSeek chat completions: https://api-docs.deepseek.com/api/create-chat-completion
- DeepSeek Responses API: https://api-docs.deepseek.com/api/create-response
- DeepSeek FIM completions: https://api-docs.deepseek.com/api/create-completion
- DeepSeek models: https://api-docs.deepseek.com/api/list-models
- DeepSeek balance: https://api-docs.deepseek.com/api/get-user-balance
- MCP specification: https://modelcontextprotocol.io/specification/2026-07-28
- MCP TypeScript SDK v2 migration guide: https://github.com/modelcontextprotocol/typescript-sdk/blob/main/docs/migration/upgrade-to-v2.md
License
MIT
安装
把 DeepSeek MCP Server 添加到你的客户端。选择你正在使用的那个。
claude mcp add deepseek-mcp-server -- npx -y deepseek-mcp-servercodex mcp add deepseek-mcp-server -- npx -y deepseek-mcp-serveramp mcp add deepseek-mcp-server -- npx -y deepseek-mcp-server{
"mcpServers": {
"deepseek-mcp-server": {
"command": "npx",
"args": [
"-y",
"deepseek-mcp-server"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"deepseek-mcp-server": {
"command": "npx",
"args": [
"-y",
"deepseek-mcp-server"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"deepseek-mcp-server","command":"npx","args":["-y","deepseek-mcp-server"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"deepseek-mcp-server": {
"command": "npx",
"args": [
"-y",
"deepseek-mcp-server"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"deepseek-mcp-server": {
"command": "npx",
"args": [
"-y",
"deepseek-mcp-server"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"deepseek-mcp-server": {
"command": "npx",
"args": [
"-y",
"deepseek-mcp-server"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"deepseek-mcp-server": {
"type": "local",
"command": "npx",
"args": [
"-y",
"deepseek-mcp-server"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"deepseek-mcp-server": {
"command": {
"path": "npx",
"args": [
"-y",
"deepseek-mcp-server"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y deepseek-mcp-serverRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
6 个工具
DeepSeek MCP Server 向已连接的智能体提供 6 个工具。
- chat_completion
- DeepSeek V4 chat. Defaults to `deepseek-v4-flash`. Supports `thinking: { "type": "enabled" | "disabled" }`, `reasoning_effort: "low" | "high" | "max"`, JSON output, function tools, logprobs, streaming, and conversation memory.
- create_response
- Stateless native Responses API calls with text or structured input, reasoning effort controls, function tools, server-side web search, structured output, and semantic streaming.
- list_models
- Reads the live DeepSeek model list.
- get_user_balance
- Reads account balance and availability.
- reset_conversation
- Clears an in-memory conversation.
- list_conversations
- Lists in-memory conversation IDs.
评分
75 / 100
良好
- 文档25/25
- 维护19/25
- 可信度13/20
- 能力6/15
- 安装体验12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 13 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 6 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
版本历史
| 版本 | 发布于 |
|---|---|
| 0.3.1最新 | 2026年2月23日 |