# DeepSeek MCP Server [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/DMontgomery40/deepseek-mcp-server  
**GitHub Stars:** 364  
**npm Downloads (last month):** 2227  
**Views:** 11  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/deepseek-mcp-server

## Description
Official DeepSeek MCP server for chat, completion, model listing, and balance endpoints.

## Tools
Capabilities this server exposes over MCP:

- **chat_completion** — Primary DeepSeek V4.1 chat tool for text, images, and multi-turn generation. Defaults to `deepseek-flash`. Provide either `message` (a text string or text/image/file content parts) or `messages` (full chat history); if both are provided, `messages` is used. Images may use an HTTP(S) URL, supported base64 data URL, or Files API `file_id`. Thinking is enabled by default; use `reasoning_effort` for current effort controls. Use `conversation_id` for explicit in-memory context. Set `include_raw_response=true` only for provider-payload debugging.
- **completion** — DeepSeek FIM completion tool for prompt/suffix fill-in-the-middle workflows. Defaults to `deepseek-flash` in non-thinking mode. Use this when you need raw completion text instead of chat message formatting. Set `include_raw_response=true` only when you need the full provider payload for debugging.
- **create_response** — Create a stateless DeepSeek V4.1 response using the OpenAI-compatible Responses API. Defaults to `deepseek-flash` and accepts text, image URLs, base64 images, and Files API `file_id` inputs. Use `reasoning.effort` for thinking control, `tools` for function or server-side web-search tools, and `stream=true` for semantic SSE aggregation. Send full input history for multi-turn work. Set `include_raw_response=true` only for provider-payload debugging.
- **list_models** — List available DeepSeek models for model selection and validation. This tool takes no parameters. Use it before passing an explicit model ID to generation tools.
- **get_user_balance** — Return the current DeepSeek account balance and availability status. This tool takes no parameters and is read-only. Use it for account health checks when diagnosing provider-side failures.
- **upload_file** — Upload a JPEG, PNG, GIF, or WebP image to DeepSeek and return a reusable `file_id`. Supply base64 image data directly; server-local file paths are intentionally not accepted. Optional expiry is 3,600 to 2,592,000 seconds.
- **list_files** — List images uploaded to the DeepSeek Files API. Supports cursor pagination, creation-time order, and the `user_data` purpose filter.
- **retrieve_file** — Retrieve metadata for one DeepSeek Files API image by `file_id`.
- **delete_file** — Delete one uploaded DeepSeek image by `file_id`. This permanently removes that provider-side file reference.
- **reset_conversation** — Delete stored in-memory chat history for a `conversation_id`. Use this when you want to keep the same ID but start a fresh thread. This only affects server-side memory in the current MCP process.
- **list_conversations** — List all conversation IDs currently stored in this MCP process memory. This tool takes no parameters and does not call the DeepSeek API. Useful for debugging conversation persistence behavior.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "deepseek-mcp-server": {
    "command": "npx",
    "args": ["-y","deepseek-mcp-server"],
    "env": {
      "DEEPSEEK_API_KEY": "",
      "DEEPSEEK_REQUEST_TIMEOUT_MS": "",
      "MCP_TOOL_RATE_LIMIT": ""
    }
  }
}
```

**Requires environment variables:** `DEEPSEEK_API_KEY`, `DEEPSEEK_REQUEST_TIMEOUT_MS`, `MCP_TOOL_RATE_LIMIT` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What DeepSeek MCP Server does

DeepSeek MCP Server connects MCP clients to DeepSeek V4.1 Flash and V4 Pro APIs. It covers conversational generation, visual image understanding, Responses API requests, fill-in-the-middle completion, model discovery, account balance checks, and image file management.

The conversational tools support text and image inputs, reasoning controls, structured output, function tools, and aggregated streaming results. `chat_completion` can optionally associate requests with a local in-memory `conversation_id`. `create_response` instead expects the caller to provide the full input history for each stateless request.

Image understanding is available through image URLs, supported base64 data URLs, or reusable file IDs. The service does not generate images, video, or audio.

## How it works

The package communicates with an MCP client over stdio. Requests are sent to DeepSeek using the configured API key, and streamed provider responses are aggregated into one MCP result rather than forwarded as partial MCP notifications. Each tool declares an MCP output schema and behavior annotations; full provider payloads can be requested with `include_raw_response=true`.

`list_models` reports live account availability and model details such as display names, context and output limits, modalities, effort levels, and API capabilities. `deepseek-flash` supports visual input through Chat Completions and Responses, while `deepseek-v4-pro` accepts text input and can run `web_search` inside `create_response`. DeepSeek ignores `web_search` when the selected model is Flash.

The Responses integration supports the custom `apply_patch` tool. When DeepSeek returns a custom tool call, the client must execute it and send the resulting `custom_tool_call_output` as part of later history. Other built-in Responses tool types, including `file_search`, `code_interpreter`, and `mcp`, are ignored.

## Setup and configuration

Node.js 20 or newer is required. Launch the server with `npx` and provide `DEEPSEEK_API_KEY`:

```bash
DEEPSEEK_API_KEY="your-deepseek-key" npx -y deepseek-mcp-server
```

A typical stdio client configuration uses `npx` as the command, passes the package as an argument, and places the API key in the client’s environment configuration. Codex CLI and Claude Code can add the server from their MCP commands while supplying the same environment variable.

`DEEPSEEK_REQUEST_TIMEOUT_MS` controls the complete request lifetime, including response-body reads and streamed output. `MCP_TOOL_RATE_LIMIT` limits MCP tool invocations rather than DeepSeek spending.

## Tools and capabilities

- `chat_completion`: Send text or visual chat requests with thinking controls, JSON output, function tools, optional memory, and streaming aggregation.
- `create_response`: Make stateless text or image Responses API calls with reasoning, structured output, function tools, `apply_patch`, and semantic stream aggregation.
- `completion`: Run non-thinking FIM completion through the beta completions endpoint.
- `list_models`: Inspect live models and their capabilities.
- `get_user_balance`: Check account availability and balances.
- `upload_file`, `list_files`, `retrieve_file`, and `delete_file`: Manage reusable DeepSeek image files.
- `reset_conversation` and `list_conversations`: Clear or inspect local in-memory conversation IDs.

Inline images can be up to 32 MiB, uploaded files up to 64 MiB, and JSON request bodies up to 48 MiB. JPEG, PNG, GIF, and WebP are supported. FIM has a documented 4K output limit, and forced chat tool choices require thinking to be disabled.

## Limitations and notes

DeepSeek’s frequency and presence penalty parameters are accepted for compatibility but ignored by the provider. Chat prefix completion and strict function tools use the beta chat endpoint automatically. `stream_options` requires streaming to be enabled.

The Files API is intended for reusable image inputs. Search and Fetch are not exposed as standalone MCP tools; only the Responses `web_search` option is available, and it is handled server-side by DeepSeek Pro. Check DeepSeek pricing before enabling search because its billing is separate from model-token charges.

Local conversations are in-memory and bounded, so they are not a persistent conversation store. Responses calls also do not retain history on the server.

_Full upstream README: https://allmcps.com/mcp/deepseek-mcp-server/readme_

