
DeepSeek MCP Server
io.github.DMontgomery40由 GitHub 账号 DMontgomery40 发布v0.3.1更新于 Oct 24, 2026
Official DeepSeek MCP server for chat, completion, model listing, and balance endpoints.
概览
本地 MCP 服务器,让助手调用 DeepSeek 模型:文本与图片对话、Responses API、FIM 补全、模型列表、余额查询和文件上传。
- 可以做什么
- 执行文本或视觉对话补全,支持思考控制、函数工具、JSON 输出和可选的会话记忆
- 发起无状态 Responses API 调用,支持推理控制、结构化输出和 apply_patch 自定义工具
- 生成 FIM 补全,并列出可用模型及其上下文、输出限制和模态
- 查询账户余额与可用性
- 上传、列出、检索和删除可复用的图片文件
- 重置或列出本地内存中的会话
- 适用场景
- 适合希望在自己的客户端中直接调用 DeepSeek 模型、查看模型能力、检查剩余余额,或在多次请求间复用已上传图片的场景。它是模型访问通道,不是通用网页搜索或图像生成工具。
- 运行要求
- 通过 npx 以 stdio 在本地运行,需要 Node.js 20 或更高版本。必须在 DEEPSEEK_API_KEY 环境变量中提供 DeepSeek API 密钥。可选配置包括基础地址、请求超时、默认模型、HTTP 传输的主机、端口、来源白名单与 bearer 令牌,以及工具调用速率限制。
安装
在 SourceWeft 中
- 打开 控制台中的 DeepSeek MCP Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
DeepSeek MCP Server
[DeepSeek Official List] [Official MCP Registry] [npm version] [npm downloads] [Last published OCI package] [GitHub stars] [Glama MCP Listing]
An MCP server for DeepSeek V4.1 Flash and V4 Pro APIs: text and visual chat, the Responses API, FIM completion, Files API lifecycle operations, model discovery, balance checks, and bounded in-memory conversations.
Version 1.4.1 uses the stable MCP TypeScript SDK v2 and serves both the 2026-07-28 protocol and stateless legacy clients.
What's current
Checked against the official API docs on October 19, 2026:
- The canonical fast model is
deepseek-flash, now served by DeepSeek-V4.1-Flash-1017. The October 17 model update did not change its API calling method or model-token pricing. deepseek-v4-flashanddeepseek-v4-flash-vision-expare temporary aliases fordeepseek-flash.deepseek-v4-procontinues serving V4 Pro 0813. DeepSeek reversed its announced September rerouting plan; Pro remains available with unchanged billing.- V4.1 Flash accepts visual input through Chat Completions and Responses.
V4 Pro accepts text input. Use
list_modelsto check your account's live availability. - The Files API supports upload, list, retrieve, and delete for reusable image inputs.
- DeepSeek documents a 1M-token context window and up to 384K output tokens for
deepseek-flash.
“Multimodal” here means image understanding. This server does not generate images, video, or audio.
Tools
The server exposes eleven tools:
chat_completion: text or visual Chat Completions, thinking controls, function tools, JSON output, streaming aggregation, and optionalconversation_idmemory.create_response: stateless Responses API calls with text/images, reasoning controls, function tools, theapply_patchcustom tool, structured output, and semantic streaming aggregation.completion: FIM completion through/beta/completions.list_models: live model discovery, including display names, context/output limits, input/output modalities, effort levels, and API capabilities.get_user_balance: account availability and balances.upload_file: upload base64 JPEG, PNG, GIF, or WebP data and receive a reusable DeepSeekfile_id.list_files: list uploaded files with cursor, order, and purpose filters.retrieve_file: retrieve metadata for onefile_id.delete_file: delete one uploaded file.reset_conversation: clear one local in-memory conversation.list_conversations: list local in-memory conversation IDs.
Every tool declares an MCP output schema and behavior annotations. Full
provider payloads remain opt-in through include_raw_response=true.
API behavior
- Thinking is enabled by default. Canonical reasoning efforts are
none,low,high, andmax. Compatibility aliases are accepted:minimalmaps tolow;mediumandxhighmap tohigh; the thinking guide also acceptsultraas an alias formax. - Chat
stream_optionsrequiresstream=true. Chat forced tool choices (requiredor a named function) require thinking to be disabled. - Chat prefix completion (
prefix=true) and strict function tools (strict=true) automatically use/beta/chat/completions. Configured/v1and/betabases are normalized for beta requests. - Frequency and presence penalties remain accepted for compatibility, but DeepSeek ignores them.
- Responses calls are stateless: send full input history.
web_searchruns server-side withdeepseek-v4-pro; DeepSeek ignores it withdeepseek-flash. Other built-in tool types such asfile_search,code_interpreter, andmcpare ignored. The supported custom tool is{ "type": "custom", "name": "apply_patch" }. Returned calls appear incustom_tool_calls; the client is responsible for executing them and sendingcustom_tool_call_outputhistory.output_itemspreserves complete returned reasoning, message, and tool-call items for replay without enabling the full raw provider response. - FIM is beta and non-thinking. It supports streaming usage options;
echo=truecannot accompanysuffixorlogprobs. Its guide documents a 4K output limit, so do not assume the Chat output ceiling applies. DEEPSEEK_REQUEST_TIMEOUT_MSapplies to the complete request, including reading the response body and streaming output. Streams are aggregated into one MCP result; partial tokens are not forwarded as MCP notifications.
Search and Fetch billing notice
DeepSeek opened separate Search and Fetch APIs on October 17, 2026. Each costs $0.75 per 1,000 successful requests, billed by request rather than tokens or result count. A request is billable only if it returns HTTP 200 with a non-empty Search result or Fetch page content. These charges are separate from model-token charges.
DeepSeek says Search and Fetch calls made through server-side tools in DeepSeek Harness, Claude Code, and Codex are temporarily free for DeepSeek API users; per-request billing starts October 31, 2026 at 16:00 UTC (November 1 at 00:00 Beijing time). This announced waiver names those clients; do not assume it covers other integrations. Check DeepSeek's current pricing before enabling search in an agent.
This MCP server does not expose standalone Search or Fetch tools. Its
create_response tool already accepts web_search for Pro, which DeepSeek
runs on its server; Flash ignores it. The new raw JSON endpoints are
POST /v1/tools/search and POST /v1/tools/fetch. The server's
MCP_TOOL_RATE_LIMIT limits MCP invocations, not DeepSeek spending.
Install
Node.js 20 or newer is required.
Run directly over stdio:
Codex CLI:
Claude Code:
Example MCP client configuration:
Visual input
chat_completion accepts image URLs:
It also accepts a supported base64 data URL without first uploading it:
For reuse, call upload_file, then pass its returned ID:
The same uploaded file can be used with create_response:
Supported image formats are JPEG, PNG, GIF, and WebP. Detail may be low,
high, original, or auto.
Image limits
Inline images are limited to 32 MiB each, uploaded Files to 64 MiB, JSON request bodies to 48 MiB, and requests to 600 images. Local validation checks known inline sizes, image counts, and serialized UTF-8 body size. DeepSeek checks remote/downloaded and uploaded-file dimensions and aggregate sizes: 64 MiB total without file references, or 200 MiB including them. Dimensions are limited to 8192 pixels per side, dropping to 4096 when there are at least 15 images. External downloads must complete within 60 seconds.
The server does not fetch image URLs or read file metadata just to preflight these provider-side limits. Use the Files API for large or reused images.
Upload safety boundary
upload_file accepts raw base64 or a supported image data URL. It deliberately
does not accept local file paths and does not fetch arbitrary URLs on the
server. Decoded uploads are limited to 64 MiB, and the bytes are
signature-checked before upload. Uploaded data is stored by DeepSeek under your
account; use an expiry or delete_file when it should not persist. Expiry must
be between 3,600 and 2,592,000 seconds. DeepSeek storage is limited to 25 GiB
and 10,000 files per user. Its upload deadline is ten minutes; increase
DEEPSEEK_REQUEST_TIMEOUT_MS for large uploads when needed.
Streamable HTTP
Run a local HTTP endpoint:
The endpoint defaults to http://127.0.0.1:3001/mcp.
For browser clients, set an exact comma-separated origin allowlist:
Requests that include an Origin header are rejected with 403 unless the
origin is allowlisted. Native clients that omit Origin are unaffected.
HTTP authentication and admission limits
Local HTTP binds to loopback by default. To protect it with a shared bearer
token, set MCP_HTTP_AUTH_TOKEN; callers then send Authorization: Bearer <token>.
This is shared-token access control, not an OAuth authorization server.
Non-loopback binds now require either MCP_HTTP_AUTH_TOKEN or
MCP_HTTP_TRUST_AUTH_GATEWAY=true. Use gateway mode only when a reverse proxy
authenticates every MCP request and prevents direct access to the backend.
A browser origin allowlist is independent of authentication. Hosted installations
upgrading from 1.0.1 must explicitly configure one of these authentication paths.
MCP_TOOL_RATE_LIMIT defaults to 120 invocations per 60-second window, shared
across all tools and stateless HTTP request instances using the same provider
client. Rate-limit responses are MCP tool errors with error_type=tool_rate_limit
and retryable=true; denied calls do not reach DeepSeek or alter conversations.
MCP cancellation reaches the provider request. Cancelled replies are not saved
to conversation history. Reading a missing conversation resource returns the
protocol's -32602 error. Resource list-change notifications are not advertised.
Hosted endpoint
A separately deployed endpoint is available at
https://deepseek-mcp.ragweld.com/mcp using
Authorization: Bearer <token>. The hosted deployment has its own release
cycle and may lag the npm/GitHub release; inspect tools/list before relying
on a newly added tool.
Environment
Required:
Optional:
CONVERSATION_MAX_MESSAGES bounds the messages retained per conversation in
the process-local store. Restarting the process clears this store.
MCP compatibility
- Built on
@modelcontextprotocol/serverand@modelcontextprotocol/client2.3.1, with@modelcontextprotocol/node2.1.1. - Modern MCP 2026-07-28 is stateless: discovery uses
server/discover, requests carry protocol version and client capabilities in_meta, and completed results carryresultTypeand required caching fields. The SDK validates the corresponding HTTP headers. Stateless 2025-era handling remains available for older clients. - Stdio chooses the protocol era from the opening exchange and pins one server instance for that connection.
- Static discovery/list results carry one-hour public cache hints; dynamic resource lists, runtime data, live account data, and conversations remain private and short-lived or uncached.
- Explicit
conversation_idmemory is application state and works independently of transport session state.
Migrating from 0.6.0
- The default model changed from
deepseek-v4-flashtodeepseek-flash. - The MCP SDK moved from the monolithic v1 package to the split v2 packages.
MCP_HTTP_STATEFUL_SESSIONwas removed. HTTP protocol handling is now per-request/stateless; useconversation_idfor retained chat context.- Four Files API tools and visual inputs were added.
- Existing tool names and
include_raw_responsebehavior remain compatible.
Release 1.4.1
Preserves leading system instructions and removes orphaned tool results when
conversation history reaches its configured cap. Refreshes the MCP Node adapter
and locks @hono/node-server to 2.1.5 to clear GHSA-rmxm-3fg6-px4f. This server
does not use the affected serveStatic helper. HTTP startup supplies Node's Web
Crypto only when the global is missing. Node >=20 support is unchanged.
Release 1.4.0
This release refreshes MCP dependencies, corrects Pro availability and Responses
capabilities, adds apply_patch custom-tool results and FIM usage options, and
fixes beta routing, end-to-end request deadlines, split CRLF SSE boundaries,
stream error handling, and non-JSON provider errors. Existing tool names and
opt-in raw responses are preserved. The complete API/MCP audit also adds
vision request limits, complete Responses history, cancellation propagation,
truthful capabilities, missing-resource errors, tool admission limits,
reflected-credential redaction, and explicit remote HTTP authentication.
DEEPSEEK_DEFAULT_MODEL is now honored by all three generation tools.
Earlier 1.1.0–1.3.0 version identifiers were historically published and removed; npm cannot reuse them. The next available minor release is 1.4.0.
Development and verification
Credentialed smoke tests:
The live smoke covers model listing, balance, text chat, thinking streaming,
Responses, strict beta function calling, apply_patch custom-tool calls, FIM,
visual input, and a Files upload/retrieve/list/delete lifecycle with cleanup.
Registry identity
- MCP Registry:
io.github.DMontgomery40/deepseek - npm:
[email protected] - OCI:
docker.io/dmontgomery40/deepseek-mcp-server:0.5.0is the last published image and does not contain the current npm feature set.
Documentation audit
The release audit covers every supported DeepSeek endpoint reference and its current guides, plus all 31 pages and the authoritative schema of MCP 2026-07-28. Findings, coverage, source conflicts, optional capabilities, and verification limits are recorded in the API audit and the MCP audit. Anthropic-format provider APIs were read for context; this server exposes the OpenAI-compatible Chat, Responses, FIM, Files, model, and balance routes.
Official references
- DeepSeek changelog
- DeepSeek October 17 announcement
- DeepSeek Search and Fetch guide and billing
- DeepSeek Responses compatibility guide
- DeepSeek V4.1 Flash announcement
- DeepSeek pricing and model limits
- DeepSeek visual input guide
- DeepSeek Files API guide
- DeepSeek Chat Completions
- DeepSeek Responses API
- MCP 2026-07-28 specification
- MCP TypeScript SDK v2
- MCP SDK v2 migration guide
License
MIT
来源:README.md,提交 7a08656
工具
0版本历史
1- v0.3.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分