Skip to main content
Glama
deepseek-mcp-server

deepseek-mcp-server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DEEPSEEK_API_KEYYesRequired. DeepSeek API key. Can also be set as the apiKey key in ~/.deepseek-mcp/config.json.
DEEPSEEK_ALLOW_FSNoWhether local file reads are allowed. Set to 0 to block all local file reads.true
DEEPSEEK_BASE_URLNoBase URL for the DeepSeek or any OpenAI-compatible API.https://api.deepseek.com
DEEPSEEK_FS_ROOTSNoDirectories to confine file reads to. Empty means unrestricted.
DEEPSEEK_LOG_FILENoLog file path. Rotates at 5 MB.~/.deepseek-mcp/deepseek-mcp.log
DEEPSEEK_LOG_LEVELNoLog level: silent, error, warn, info, debug, or trace.info
DEEPSEEK_CHAT_MODELNoModel used for chat completions.deepseek-chat
DEEPSEEK_MAX_TOKENSNoDefault max_tokens value. 0 means send no max_tokens and let the API use its own maximum.0
DEEPSEEK_TIMEOUT_MSNoRequest timeout in milliseconds. Default is 15 minutes for long reasoning runs.900000
DEEPSEEK_LOG_TO_FILENoWhether logging to a file is enabled.true
DEEPSEEK_MAX_RETRIESNoMaximum number of retries with exponential backoff. Honours Retry-After.4
DEEPSEEK_BETA_BASE_URLNoBeta base URL used by fill-in-the-middle and prefix completion.<baseUrl>/beta
DEEPSEEK_REASONER_MODELNoModel used for reasoning completions.deepseek-reasoner
DEEPSEEK_MAX_BYTES_TOTALNoMaximum total bytes read. 0 means unlimited.8000000
DEEPSEEK_MAX_OUTPUT_CHARSNoMaximum output characters for tool results. 0 means never truncate.0
DEEPSEEK_PERSIST_SESSIONSNoWhether multi-turn sessions are persisted to disk.true
DEEPSEEK_MAX_BYTES_PER_FILENoMaximum bytes read per file. 0 means unlimited.2000000
DEEPSEEK_SESSION_MAX_MESSAGESNoMaximum messages retained in a session. Oldest turns are dropped past this.200

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

DeepSeek MCP server. deepseek_chat for fast general work, deepseek_reason for hard multi-step problems (returns its chain of thought), deepseek_code for task-oriented coding help, deepseek_fim for fill-in-the-middle code completion, deepseek_prefix to force a reply's opening text, deepseek_analyze_files to read local files or whole trees and ask about them, deepseek_session for multi-turn memory, and deepseek_raw_request to reach any endpoint or parameter not modelled by the typed tools. Run deepseek_status with test_connection first if anything misbehaves.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}
prompts
{}
resources
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
deepseek_chatA

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.

deepseek_reasonA

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.

deepseek_codeA

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.

deepseek_fimA

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.

deepseek_prefixA

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.

deepseek_analyze_filesA

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.

deepseek_sessionA

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.

deepseek_modelsA

List the model ids available to your API key. Useful for discovering new models without updating this server.

deepseek_balanceA

Show the remaining credit on the DeepSeek account behind your API key, per currency.

deepseek_count_tokensA

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.

deepseek_statusA

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.

deepseek_raw_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.

Prompts

Interactive templates invoked by user choice

NameDescription
deepseek-code-reviewAsk DeepSeek for a severity-ordered review of a block of code: correctness, security, performance.
deepseek-debugGive DeepSeek code plus an error and get a root-cause diagnosis and fix.
deepseek-explainGet a clear walkthrough of what a piece of code does and why.
deepseek-write-testsProduce a thorough runnable test suite for some code.
deepseek-optimizeFind the real bottleneck and get optimised code with the trade-offs named.
deepseek-reasonSend a maths, logic or planning problem to the reasoning model.
deepseek-translateTranslate text, preserving tone and formatting.

Resources

Contextual data attached and managed by the client

NameDescription
Resolved configurationThe configuration this server is actually running with, API key masked.
Available modelsLive model list from the DeepSeek API for your key.
Conversation sessionsIndex of stored multi-turn sessions.
Request statisticsRequest, retry, failure and token counters for this process.
Server log tailThe last 200 lines of the server log.

TDQS

A4.1/5.0

Scored across 12 tools

Disambiguation4/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness5/5

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.