DMontgomery40/deepseek-mcp-server
Model Context Protocol server for DeepSeek's advanced language models
DeepSeek MCP Server – What It Is
DeepSeek MCP Server is a small Node‑JS program that acts as a bridge between the Model Context Protocol (MCP) and DeepSeek’s V4.1 Flash and V4 Pro language‑model APIs. In practice it lets tools that understand MCP (for example Claude, Codex, or custom MCP‑aware clients) talk to DeepSeek without each client having to implement DeepSeek’s own HTTP API.
Core capabilities
| Feature | How it works | What you get |
|---|---|---|
| Chat completions | Sends a /v1/chat/completions request (or the beta endpoint) to DeepSeek, optionally with images. |
Text replies, JSON‑structured output, streaming, and optional in‑memory conversation memory (conversation_id). |
| Responses API | Calls DeepSeek’s Responses endpoint, which can return text or images. | Stateless calls that can include custom tool apply_patch and structured output. |
| FIM completion | Uses DeepSeek’s /beta/completions endpoint for fill‑in‑the‑middle generation. |
Text completions with optional streaming, limited to ~4 K output tokens. |
| Model discovery & balance | Wraps DeepSeek’s /models and /balance endpoints. |
Lists available models, their limits, and shows your account credit. |
| Files API | Uploads, lists, retrieves and deletes image files on DeepSeek’s storage. | Re‑usable file_ids for vision inputs, with size limits (64 MiB per file). |
| Conversation memory | Keeps a short‑lived, in‑process store of recent messages per conversation_id. |
Ability to continue a chat without resending the full history each request. |
| Rate‑limit & auth | Simple token‑based auth for the optional HTTP transport and a global tool‑rate‑limit. | Prevents accidental over‑use of your DeepSeek quota. |
How you run it
- STDIO mode (default) – launch with
npx deepseek-mcp-server@1and pipe MCP JSON messages over stdin/stdout. Ideal for local CLI tools. - HTTP mode – set
MCP_TRANSPORT=streamable-httpand specify host/port. The server then listens athttp://127.0.0.1:3001/mcpand can be called from browsers or other services.
Both modes require only one environment variable: DEEPSEEK_API_KEY.
Who would use this?
- Developers building MCP‑aware assistants (Claude, Codex, etc.) who want DeepSeek as a backend without writing DeepSeek‑specific request code.
- RAG or multimodal pipelines that need to send images to DeepSeek’s vision model; the server handles the file‑upload lifecycle for you.
- Testing or prototyping – the npm package ships with a live‑smoke‑test suite that exercises every tool against a real DeepSeek account.
What it does not do
- It never generates images, video, or audio – only text and image understanding.
- It is not a full‑featured gateway for arbitrary OpenAI‑compatible APIs; it only implements the endpoints DeepSeek currently offers.
Quick start (copy‑paste)
# 1️⃣ Install/run (Node 20+ required)
DEEPSEEK_API_KEY=YOUR_KEY npx -y deepseek-mcp-server@1
# 2️⃣ Example MCP client config (JSON)
{
"mcpServers": {
"deepseek": {
"command": "npx",
"args": ["-y", "deepseek-mcp-server@1"],
"env": {"DEEPSEEK_API_KEY": "YOUR_KEY"}
}
}
}
Now any MCP‑compatible client can call tools like chat_completion, list_models, or upload_file through the deepseek server.
Where to learn more
- Official DeepSeek docs – links in the README for model limits, pricing, and vision guide.
- MCP specification (2026‑07‑28) – the protocol this server implements.
- GitHub repo – contains the full source, tests, and audit documents (
docs/research/...).
License
MIT – you can freely use, modify, and redistribute the server.
Related
- Project
- Project
- Project
- Project
- Project