deepseek

v2.5.1
io.github.arikusi/deepseek Checked 5 hours ago Published 5 days ago

MCP server for DeepSeek AI with chat, reasoning, sessions, function calling, and cost tracking

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

deepseek_chat DeepSeek Chat Completion

Chat with DeepSeek models. deepseek-flash (V4.1 Flash, fast and economical) and deepseek-v4-pro (V4 Pro), both 1M context with optional chain-of-thought thinking mode. deepseek-v4-flash, deepseek-chat and deepseek-reasoner are legacy names, still accepted for backward compatibility (they resolve to deepseek-flash); prefer deepseek-flash. Features: multi-turn sessions (session_id), function calling (tools parameter), thinking mode, JSON output mode, multimodal input (when enabled), automatic cost tracking, and model fallback with circuit breaker resilience.

ParameterTypeDescription
messages *arrayArray of conversation messages. Each message has role (system/user/assistant/tool) and content (string or array of content parts for multimodal). Tool messages require tool_call_id.
json_modebooleanEnable JSON output mode. The model will output valid JSON. Include the word "json" in your prompt for best results. Supported by both models.
max_tokensnumberMaximum tokens to generate. V4 models support up to 384000 output tokens.
modelstringModel to use. deepseek-flash (default, V4.1 Flash, fast/economical) or deepseek-v4-pro (V4 Pro), both 1M context, up to 384K output. Non-thinking by default for speed; pass thinking:{type:"enabled"} t…
reasoning_effortstringReasoning effort while thinking mode is active: "low" (fewer reasoning tokens), "high" (default) or "max". Only applies when thinking is enabled.
response_schemaobjectJSON Schema to validate the model output against. Implies JSON output mode. The server validates the parsed result and, on failure, issues up to RESPONSE_SCHEMA_MAX_RETRIES repair retries (feeding the…
session_idstringSession ID for multi-turn conversations. When provided, previous messages from this session are prepended to the current messages. If the session does not exist, it is created automatically. Omit for…
streambooleanEnable streaming mode. Returns full response after streaming completes.
temperaturenumberSampling temperature (0-2). Higher = more random. Default: 1.0. Ignored when thinking mode is enabled.
thinkingobjectToggle chain-of-thought thinking mode. Use {type: "enabled"} to reason, {type: "disabled"} for a fast direct answer (the default here). When enabled, temperature/top_p are ignored.
tool_choiceControls which tool the model calls. "auto" (default), "none", "required", or {type:"function",function:{name:"..."}}
toolsarrayArray of tool definitions for function calling. Each tool has type "function" and a function object with name, description, and parameters (JSON Schema).

deepseek_fim DeepSeek FIM Completion

Fill-in-the-Middle (FIM) completion with DeepSeek. Provide a prompt (prefix) and an optional suffix; the model completes the text in between. Ideal for code completion and content infilling. Runs in non-thinking mode on the Beta endpoint; output is capped at 4K tokens. The legacy names deepseek-v4-flash, deepseek-chat and deepseek-reasoner are still accepted and resolve to deepseek-flash (FIM has no thinking mode). Includes automatic cost tracking and model fallback with circuit breaker resilience.

ParameterTypeDescription
prompt *stringThe prefix text that comes before the content to generate. Required. For code completion, this is the code up to the cursor.
max_tokensnumberMaximum tokens to generate. FIM completions are capped at 4096 tokens by the API.
modelstringModel to use. deepseek-flash (default, V4.1 Flash, fast/economical) or deepseek-v4-pro (V4 Pro). Legacy names deepseek-v4-flash / deepseek-chat / deepseek-reasoner are still accepted and resolve to de…
stopOptional stop sequence(s). Generation stops when any is produced. A single string or an array of up to 16 strings.
suffixstringOptional suffix text that comes after the content to generate. The model fills the gap between prompt and suffix.
temperaturenumberSampling temperature (0-2). Higher = more random. Default: 1.0.

deepseek_sessions DeepSeek Session Management

Manage multi-turn conversation sessions. List active sessions, delete a specific session, or clear all sessions. Sessions store conversation history for use with the session_id parameter in deepseek_chat.

ParameterTypeDescription
action *stringAction to perform. "list": show all active sessions, "clear": remove all sessions, "delete": remove a specific session (requires session_id)
session_idstringSession ID to delete (required when action is "delete")