deepseek-mcp-server
The server's base URL is configurable, so it can be pointed at a local Ollama (or other OpenAI-compatible) instance instead of DeepSeek — e.g. baseUrl http://localhost:11434/v1 with a chatModel such as deepseek-r1:14b — letting all chat, reasoning, session and file-analysis tools run against locally hosted models.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@deepseek-mcp-server review src/auth.ts for bugs and suggest a refactor"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
deepseek-mcp-server
A complete, unrestricted Model Context Protocol server for the DeepSeek API. It exposes DeepSeek's whole surface — chat, reasoning, fill-in-the-middle, prefix completion, function calling, JSON mode, logprobs, streaming — to any MCP client: VS Code, Claude Code, Claude Desktop, Cursor, Windsurf, or your own.
12 tools, 7 prompt templates, 5 resources
No client-side caps. No token ceiling, no output truncation, no path allowlist by default. Every limit is an opt-in environment variable.
A raw passthrough tool, so endpoints and parameters added to the DeepSeek API after this server was written are reachable without a code change.
One direct dependency (
@modelcontextprotocol/sdk— which brings its own transitive tree, about 95 packages in total) and no build step.MIT licensed.
Install
git clone https://github.com/sengarcia32-ux/deepseek-mcp-server.git
cd deepseek-mcp-server
npm installRegister it with every MCP client on the machine:
node install/register.mjs --applyOn Windows you can run the whole thing in one step:
powershell -ExecutionPolicy Bypass -File install\install.ps1Then add your API key — grab one at https://platform.deepseek.com/api_keys:
powershell -ExecutionPolicy Bypass -File install\set-key.ps1or edit ~/.deepseek-mcp/config.json by hand:
{ "apiKey": "sk-your-key-here" }Verify everything end to end:
node bin/deepseek-mcp.js --doctorRestart VS Code and any Claude client so they pick up the new server.
What register.mjs touches
It merges into existing config and backs up every file it writes (*.bak-<timestamp>).
Client | File | Key added |
VS Code / Insiders / VSCodium |
|
|
VS Code (trust) |
|
|
Claude Code |
|
|
Claude Code (trust) |
|
|
Claude Desktop |
|
|
Cursor |
|
|
Windsurf |
|
|
Clients that aren't installed are skipped. Remove it all again with
node install/register.mjs --apply --remove.
No API key is written into any client config. Every client points at the same single source of
truth, ~/.deepseek-mcp/config.json, so the key lives in exactly one file.
Related MCP server: DeepSeek MCP Server
Tools
Tool | What it's for |
|
|
|
|
| Task-oriented coding: |
| Fill-in-the-middle. Give code before the cursor as |
| Force the reply to begin with text you supply, then continue. Pins output format, resumes truncated answers. |
| Read files, directories or globs and ask about them. Walks recursively, skips |
| Manage multi-turn conversations: |
| List model ids available to your key. |
| Remaining account credit per currency. |
| Estimate token count from DeepSeek's published character ratios. |
| Resolved config, request statistics, and an optional live connection test. Run this first when something breaks. |
| Any endpoint, any method, any body, raw JSON back. Auth, retries and timeouts still handled for you. |
Multi-turn sessions
Pass the same session_id to any chat tool and prior turns are prepended automatically:
{ "prompt": "What is a monad?", "session_id": "fp-lesson" }
{ "prompt": "Now show me one in TypeScript.", "session_id": "fp-lesson" }Sessions persist to ~/.deepseek-mcp/sessions/. Reasoning traces are deliberately not fed back
on later turns, which is what the DeepSeek API requires.
The extra escape hatch
Every chat tool accepts an extra object that is merged into the request body last, so it
overrides anything the server set:
{ "prompt": "hi", "extra": { "seed": 42, "some_new_param": true } }Prompts
deepseek-code-review, deepseek-debug, deepseek-explain, deepseek-write-tests,
deepseek-optimize, deepseek-reason, deepseek-translate.
In VS Code these appear as / commands in the chat input once the server is running.
Resources
deepseek://config, deepseek://models, deepseek://sessions, deepseek://stats,
deepseek://log.
Configuration
First match wins: process environment → <package>/.env → ~/.deepseek-mcp/config.json
→ built-in default.
Variable | JSON key | Default | Notes |
|
| — | Required. |
|
|
| Point at any OpenAI-compatible endpoint. |
|
|
| Used by FIM and prefix completion. |
|
|
| |
|
|
| |
|
|
| 15 minutes, for long reasoning runs. |
|
|
| Exponential backoff, honours |
|
|
|
|
|
|
|
|
|
|
| Set |
|
| (empty) | Empty means unrestricted. Set to confine reads to specific directories. |
|
|
|
|
|
|
|
|
|
|
| |
|
|
| Oldest turns are dropped past this. |
|
|
|
|
|
|
| Rotates at 5 MB. |
|
|
|
config.json also takes extraHeaders and defaultBody objects, applied to every request.
Running against a different provider
baseUrl is not validated, so the server works against anything speaking the OpenAI chat
completions shape — DeepSeek, a local Ollama or vLLM instance, OpenRouter, a gateway of your own:
{ "baseUrl": "http://localhost:11434/v1", "apiKey": "ollama", "chatModel": "deepseek-r1:14b" }CLI
node bin/deepseek-mcp.js # run the MCP server on stdio (what clients do)
node bin/deepseek-mcp.js --doctor # print config and test the connection
node bin/deepseek-mcp.js --list-tools
node bin/deepseek-mcp.js --versionTests
npm testLaunches the real server over stdio with an MCP client and runs 27 protocol-level checks. No API key needed — the key-dependent path is asserted to fail with actionable guidance instead.
A note on "unrestricted"
The defaults here are permissive on purpose: no token caps, no output truncation, and
deepseek_analyze_files can read anywhere the Node process can. That means an MCP client driving
this server can send the contents of local files to DeepSeek's API. That is the point of the tool,
but it is worth knowing.
If you want it narrower, the knobs are all there:
{
"allowFs": true,
"fsRoots": ["C:\\Users\\you\\projects"],
"maxBytesTotal": 1000000
}Or "allowFs": false to turn local file reads off entirely. Prompts, file contents and responses
are not logged at info level; raise to debug or trace only when you need it, and note that
trace puts request bodies in the log file.
License
MIT. See LICENSE.
Not affiliated with or endorsed by DeepSeek or Anthropic.
Available Tools
12 toolsdeepseek_analyze_filesDeepSeek file and codebase analysisA
Read local files, directories or globs and ask DeepSeek a question about them. Directories are walked recursively, skipping node_modules, .git, build output and binaries. Use this for codebase questions, cross-file review, config auditing, log analysis or document summarisation. Reads are enabled by default with no path restriction; set DEEPSEEK_FS_ROOTS to confine it or DEEPSEEK_ALLOW_FS=0 to disable reads entirely.
Inputs: paths (required), stop, extra, model, +23 more.
deepseek_balanceDeepSeek account balanceA
Show the remaining credit on the DeepSeek account behind your API key, per currency.
Inputs: no named parameters.
deepseek_chatDeepSeek chat (V3)A
Send a prompt to deepseek-chat, DeepSeek's fast general-purpose model. Supports the full API surface: system prompts, multi-turn message arrays, sampling controls, stop sequences, JSON mode, function calling, logprobs, streaming, persistent sessions, and an extra escape hatch for any parameter not modelled here. No client-side token or length caps.
Inputs: stop, extra, model, tools, +18 more.
deepseek_codeDeepSeek code assistantA
Task-oriented coding helper. Pick a task (generate, review, refactor, explain, test, debug, document, optimize, convert) and pass code inline and/or as file paths. Routes to deepseek-reasoner for debug/review/optimize and deepseek-chat otherwise, unless you override model.
Inputs: task (required), code, stop, error, +22 more.
deepseek_count_tokensEstimate DeepSeek token countA
Estimate the token count of some text using DeepSeek's published ratios (about 0.3 tokens per English character, 0.6 per CJK character). An estimate for budgeting, not an exact tokenizer.
Inputs: text (required).
deepseek_fimDeepSeek fill-in-the-middleA
Fill-in-the-middle completion against the DeepSeek beta endpoint. Give the code before the cursor as prompt and the code after it as suffix; the model writes the middle. This is the right tool for inline code completion, filling a function body, or finishing a partial block - it is not a chat call and returns no commentary.
Inputs: prompt (required), echo, stop, extra, +9 more.
deepseek_modelsList DeepSeek modelsA
List the model ids available to your API key. Useful for discovering new models without updating this server.
Inputs: no named parameters.
deepseek_prefixDeepSeek prefix completionA
Beta prefix completion: force the model's reply to begin with text you supply, then let it continue. Use it to pin output format (start with '```python' to guarantee a code block), to resume a truncated answer, or to steer a refusal-prone completion. The prefix is included in the returned text.
Inputs: prefix (required), stop, extra, model, +13 more.
deepseek_raw_requestRaw DeepSeek API requestA
Call any DeepSeek API endpoint directly with a body you control, and get the unmodified JSON back. This is the unrestricted escape hatch: it covers endpoints and parameters that the typed tools above do not model, including anything DeepSeek adds after this server was written. Authentication, retries, timeouts and base-URL resolution are still handled for you. Examples: path '/chat/completions' with your own body, path '/models' with method GET, path '/completions' with beta true.
Inputs: path (required), beta, body, query, +4 more.
deepseek_reasonDeepSeek reasoner (R1 thinking mode)A
Send a prompt to deepseek-reasoner, which produces an explicit chain of thought before its answer. Best for hard maths, logic, debugging and multi-step planning. Returns the reasoning trace and the final answer separately. Sampling parameters are ignored by this model and are dropped automatically.
Inputs: stop, extra, model, tools, +18 more.
deepseek_sessionManage DeepSeek conversation sessionsA
Inspect and manage the persistent conversations used by the session_id parameter on the chat tools. Actions: list every session, get one session's full transcript, clear its messages while keeping the id, delete it outright, set its standing system prompt, or import a transcript wholesale.
Inputs: action (required), system, messages, session_id.
deepseek_statusDeepSeek server status and self-testA
Show the resolved configuration (API key masked), request statistics for this process, and session count. Pass test_connection to make a live one-token call that verifies the key, base URL and network path end to end. Run this first whenever something is not working.
Inputs: test_connection.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools have clearly distinct purposes: chat, reason, FIM, prefix, file analysis, session management, account status, and raw API access are easy to tell apart. There is some overlap between deepseek_chat, deepseek_reason, and deepseek_code, since deepseek_code is a task wrapper that routes to the other models, and deepseek_raw_request can technically replicate any typed tool. Descriptions largely resolve this, but the boundaries are not perfectly crisp.
Every tool uses the same deepseek_ prefix followed by a lowercase snake_case descriptor, producing a highly predictable namespace. The suffixes mix resource names (models, balance, session, status) and actions (chat, reason, analyze_files), but the overall convention is consistent and readable.
Twelve tools is well within a reasonable range for a model-provider wrapper that exposes chat, reasoning, coding, completion, file analysis, session, account, diagnostics, and raw API surfaces. Each tool appears to earn its place rather than being redundant filler.
The surface covers the major DeepSeek workflows: general chat, reasoning, coding tasks, FIM and prefix completion, model discovery, balance, file-based analysis, session lifecycle, token estimation, diagnostics, and an unrestricted raw-request escape hatch. The raw tool ensures any unmodelled endpoint or future API addition remains reachable, so there are no obvious dead ends.
Related MCP Connectors
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables using DeepSeek models as a small, cheap supervised worker from any MCP-compatible client, providing fast flash and deep reasoning tools for bounded tasks.256MIT
- AlicenseNot gradedqualityDmaintenanceConnects MCP clients to DeepSeek API, including DeepSeek-R1 reasoning with visible chain-of-thought. Provides four tools: generate, chat, reason, and list models.1MIT
- AlicenseAqualityBmaintenanceBridges MCP clients to the DeepSeek API for chat completions and model discovery, with an optional locked-down bridge that delegates prompts to local CLI harnesses like Claude, Codex, or opencode.446 npmMIT
- AlicenseNot gradedqualityCmaintenanceLets any MCP-capable AI coding harness route code reviews and codebase questions through DeepSeek's web chat, exposing review, ask, and status tools with read-only repository access by default.1MIT