DeepSeek MCP Server
MCP server that connects DeepSeek V4.1 Flash and V4 Pro to Claude Code and Codex with images, FIM and the Responses API
- 366 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The server sends text, code and uploaded images to the external DeepSeek API
- The DeepSeek API key is passed in an environment variable and requests spend a paid balance
- Uploaded files stay in your DeepSeek account until they expire or you delete them
Install
- Works in
Manual install
claude mcp add deepseek --env DEEPSEEK_API_KEY=REPLACE_WITH_DEEPSEEK_KEY -- npx -y deepseek-mcp-server@1Substitute your DeepSeek API key. Requires Node.js 20 or newer.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The server sends text, code and uploaded images to the external DeepSeek API
- The DeepSeek API key is passed in an environment variable and requests spend a paid balance
- Uploaded files stay in your DeepSeek account until they expire or you delete them
This is third-party code. Review the repository files before installing.
What it does
The MCP server gives an agent eleven tools for the DeepSeek API. With chat_completion the agent sends text or text with an image, controls reasoning depth, calls functions and gets JSON output. create_response uses the stateless Responses API and can call a custom apply_patch tool. completion continues code from a prefix and suffix through FIM. The remaining tools are utilities. list_models shows the models your account can use with their context limits, and get_user_balance returns the balance. For images there are upload_file, list_files, retrieve_file and delete_file: an uploaded file gets a file_id that you can pass to chat and Responses. Conversations are told apart by conversation_id: list_conversations lists them and reset_conversation clears one. The server starts through npx over stdio or as a local HTTP endpoint. The default model is deepseek-flash, served by V4.1 Flash, with deepseek-v4-pro available alongside. Multimodal here means image understanding only: the server cannot generate images, video or audio.
Who it is for. For developers with a DeepSeek API key who want to call DeepSeek models, complete code through FIM and watch the balance from Claude Code or Codex.
Good fit when
- You want to hand DeepSeek a side task from Claude Code: a second opinion on code, a draft test, a short file summary
- The agent has to read a screenshot or a diagram: the image goes as a link or a data URL
- You want to check your DeepSeek balance and the list of available models in one message without opening the dashboard
- You need FIM code completion on a prefix and suffix through the completion tool
- You are setting up a local HTTP endpoint with a shared token for several clients in a trusted network
Not a fit when
- You need image, video or audio generation: the server reads images but cannot create them
- You need DeepSeek's standalone Search and Fetch: the server has no tools for them, and search is available only as web_search inside create_response on Pro
- You need conversation memory across restarts: conversations live in process memory and vanish after a restart
- You have no DeepSeek API key: the server will not start without one
Example request
Send the diff from the last commit to DeepSeek, ask it to find bugs, then show the answer and the remaining balanceMCP
- Transport
- stdio, http
- Authentication
- API key
Environment variables
DEEPSEEK_API_KEYrequired, secret- DeepSeek API key from the developer dashboard
DEEPSEEK_DEFAULT_MODEL- Default model, usually deepseek-flash
MCP_HTTP_AUTH_TOKENsecret- Shared token that protects HTTP mode
Limitations
- Requests go to DeepSeek's paid API and are billed per token. MCP_TOOL_RATE_LIMIT counts tool calls and does not cap spending on DeepSeek's side.
- DeepSeek bills Search and Fetch separately at 0.75 dollars per thousand successful requests. Until October 31, 2026 calls from DeepSeek Harness, Claude Code and Codex are free, and the waiver does not cover other clients.
- A streamed reply is assembled whole and arrives as one result: partial tokens are not forwarded to the agent.
- The Docker image in the registry is outdated and matches version 0.5.0, so install the npm package.
How to disable. Run claude mcp remove deepseek in Claude Code or codex mcp remove deepseek in Codex. Revoke the key you passed in the environment variable in the DeepSeek dashboard. Uploaded images stay in your DeepSeek account; delete them with the delete_file tool.
FAQ
How do I connect DeepSeek to Claude Code through MCP?
Run claude mcp add deepseek --env DEEPSEEK_API_KEY=your_key -- npx -y deepseek-mcp-server@1. Node.js 20 or newer is required. For Codex CLI the command is the same, starting with codex mcp add.
Which model is the default?
deepseek-flash. The names deepseek-v4-flash and deepseek-v4-flash-vision-exp remain as temporary aliases. DEEPSEEK_DEFAULT_MODEL changes the default, and a single request can name another model such as deepseek-v4-pro.
How do I send DeepSeek an image?
Pass chat_completion an image_url block with a link or a file as a base64 data URL. For reuse, call upload_file first and pass the returned file_id. JPEG, PNG, GIF and WebP are supported, and one inline file may not exceed 32 MiB.
How do I secure the server's HTTP mode?
By default HTTP listens on 127.0.0.1 only. Other addresses need MCP_HTTP_AUTH_TOKEN, so clients send an Authorization: Bearer header, or MCP_HTTP_TRUST_AUTH_GATEWAY=true behind a reverse proxy that authenticates every request. For browser clients add an MCP_HTTP_ALLOWED_ORIGINS list.
Does the server keep conversation history?
Only in process memory. When you pass the same conversation_id the server replays earlier messages, up to 200 by default (CONVERSATION_MAX_MESSAGES). The history disappears on restart, and the Responses API is stateless.
Discussion
No questions or reviews yet.
Related
MCP serversAn MCP server that runs DeepSeek or your own local model as a sub-agent in Claude Code and Codex with its own tool loop.
An MCP server that gives Claude Code and Codex a cheap DeepSeek helper for classification, summaries and text cleanup.
An MCP server that gives text models sight: it takes a clipboard image, sends it to Qwen-VL and returns a text description.
Long-term memory for DeepSeek Harness with an MCP server: the same memories reachable from Claude Code, Cursor and Codex
Local memory for Claude Code, Codex and Cursor Agent: learns from your activity on a Mac and gives agents context with source receipts over MCP
Codex MCP Server: Codex inside Claude Code
Codex MCP Server
An MCP server that hands tasks to the Codex CLI from inside Claude Code: code questions, change review, web search and resumable sessions
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| DeepSeek MCP Server (this card) | no | API key | 366 | |
| DeepSeek Bridge for Claude Code | no | API key | 2 | hands bulk file work to a local DeepSeek agent and makes no direct API calls |
| DeepSeek Harness | yes | 279,346 | DeepSeek's own agent with its own interface, with no bridge into the API from another agent |
README in short
Beyond installation the project goes into the details of the DeepSeek API: reasoning mode rules, FIM and file size limits. It closes with notes for anyone upgrading from version 0.6.0.