deepseek — Claude Code MCP server: what it does, how to install
Connects DeepSeek models to AI coding tools via MCP. Enables reasoning mode, fill-in-the-middle completions, and session tracking.
claude mcp add deepseek -e DEEPSEEK_API_KEY=<DEEPSEEK_API_KEY> -- npx -y @arikusi/deepseek-mcp-serverWhat deepseek does
The server provides access to deepseek-flash and deepseek-v4-pro with a 1M-token context window. It exposes the deepseek_chat tool, deepseek_fim for code completion between existing blocks, and deepseek_sessions for stateful multi-turn history. It supports chain-of-thought reasoning alongside JSON schema validation with retry limits and ReDoS protection.
Under the hood, it features circuit breakers for fallback between models and cache-aware expense calculation based on peak rates. Running it locally demands Node.js 22 or newer and a valid DEEPSEEK_API_KEY. Without an API key, requests will fail.
What it helps with
- query deepseek-flash and deepseek-v4-pro directly from coding assistants
- complete source code between a prefix and suffix via fill-in-the-middle
- retain conversation history across steps using session_id
- monitor API expenses with cache hit tracking and peak-rate calculations
Example prompts for the agent
- Use DeepSeek to analyze this algorithm with thinking mode turned on.
- Fill the missing code between the start and end of this function using deepseek_fim.
- Check current token usage and costs via deepseek://usage.
How to install deepseek
Platform CLI
claude mcp add deepseek -e DEEPSEEK_API_KEY=<DEEPSEEK_API_KEY> -- npx -y @arikusi/deepseek-mcp-serverReplace <…> with your own values
Platform CLI
codex mcp add deepseek --env DEEPSEEK_API_KEY=<DEEPSEEK_API_KEY> -- npx -y @arikusi/deepseek-mcp-serverReplace <…> with your own values
Config file
{
"mcpServers": {
"deepseek": {
"command": "npx",
"args": [
"-y",
"@arikusi/deepseek-mcp-server"
],
"env": {
"DEEPSEEK_API_KEY": "<DEEPSEEK_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"deepseek": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@arikusi/deepseek-mcp-server"
],
"env": {
"DEEPSEEK_API_KEY": "<DEEPSEEK_API_KEY>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e DEEPSEEK_API_KEY=<DEEPSEEK_API_KEY> deepseek npx -y @arikusi/deepseek-mcp-serverReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about deepseek
How to install deepseek in Claude Code?
Run claude mcp add deepseek -e DEEPSEEK_API_KEY=<DEEPSEEK_API_KEY> -- npx -y @arikusi/deepseek-mcp-server. Replace <DEEPSEEK_API_KEY> with your key from the DeepSeek platform.
What does deepseek MCP server do?
It connects MCP clients to DeepSeek models for chat, reasoning, and fill-in-the-middle code completion. It also manages conversation sessions and validates structured JSON output.
What are the requirements for local use?
You need Node.js 22 or higher and an API key from platform.deepseek.com. You can also connect to the hosted HTTP endpoint without installing Node.js locally.