deepseek
v2.5.1MCP 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.
| Parameter | Type | Description |
|---|---|---|
messages * | array | Array 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_mode | boolean | Enable JSON output mode. The model will output valid JSON. Include the word "json" in your prompt for best results. Supported by both models. |
max_tokens | number | Maximum tokens to generate. V4 models support up to 384000 output tokens. |
model | string | Model 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_effort | string | Reasoning effort while thinking mode is active: "low" (fewer reasoning tokens), "high" (default) or "max". Only applies when thinking is enabled. |
response_schema | object | JSON 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_id | string | Session 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… |
stream | boolean | Enable streaming mode. Returns full response after streaming completes. |
temperature | number | Sampling temperature (0-2). Higher = more random. Default: 1.0. Ignored when thinking mode is enabled. |
thinking | object | Toggle 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_choice | Controls which tool the model calls. "auto" (default), "none", "required", or {type:"function",function:{name:"..."}} | |
tools | array | Array 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.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | The prefix text that comes before the content to generate. Required. For code completion, this is the code up to the cursor. |
max_tokens | number | Maximum tokens to generate. FIM completions are capped at 4096 tokens by the API. |
model | string | Model 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… |
stop | Optional stop sequence(s). Generation stops when any is produced. A single string or an array of up to 16 strings. | |
suffix | string | Optional suffix text that comes after the content to generate. The model fills the gap between prompt and suffix. |
temperature | number | Sampling 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.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform. "list": show all active sessions, "clear": remove all sessions, "delete": remove a specific session (requires session_id) |
session_id | string | Session ID to delete (required when action is "delete") |