DeepSeek MCP server

Integrates DeepSeek's language models, enabling AI-powered chat completions with customizable parameters for tasks like writing assistance and code generation.
Back to servers
Setup instructions
Provider
DMontgomery40
Release date
Jan 22, 2025
Language
TypeScript
Package
Stats
4.4K downloads
264 stars

DeepSeek MCP Server allows you to integrate DeepSeek's powerful language models with MCP-compatible applications like Claude Desktop. It acts as a bridge between the DeepSeek API and applications that support the Model Context Protocol.

Installation Options

Via Smithery

The easiest way to install DeepSeek MCP Server for Claude Desktop is through Smithery:

npx -y @smithery/cli install @dmontgomery40/deepseek-mcp-server --client claude

Manual Installation

Alternatively, you can install the server globally using npm:

npm install -g deepseek-mcp-server

Configuration

Setting Up with Claude Desktop

To connect the server with Claude Desktop, add the following to your claude_desktop_config.json file:

{
  "mcpServers": {
    "deepseek": {
      "command": "npx",
      "args": [
        "-y",
        "deepseek-mcp-server"
      ],
      "env": {
        "DEEPSEEK_API_KEY": "your-api-key"
      }
    }
  }
}

Be sure to replace "your-api-key" with your actual DeepSeek API key.

Using the Server

Natural Language Configuration

The server handles natural language requests for configuration changes. Here are some examples of what you can ask:

  • "What models are available?"
  • "What configuration options do I have?"
  • "What is the current temperature setting?"
  • "Start a multi-turn conversation with deepseek-chat model, make it not too creative, and allow 8000 tokens."

Available Features

The server provides several customizable parameters:

  • Model selection: Choose between available DeepSeek models
  • Temperature control: Adjust from 0.0 to 2.0
  • Max tokens limit: Set the maximum output length
  • Top P sampling: Adjust from 0.0 to 1.0
  • Presence penalty: Configure from -2.0 to 2.0
  • Frequency penalty: Set between -2.0 to 2.0

Automatic Model Fallback

If the primary model (deepseek-reasoner) is unavailable, the server automatically falls back to the alternate model (deepseek-chat).

  • You can manually switch models by including "use deepseek-reasoner" or "use deepseek-chat" in your prompt
  • The deepseek-chat model (v3) is recommended for general-purpose use
  • The deepseek-reasoner model (R1) is better for technical and complex queries but may be slower and use more tokens

Multi-turn Conversation Support

The server maintains complete message history throughout conversations, preserving:

  • Full conversation context across multiple exchanges
  • Configuration settings for the duration of the conversation
  • Complex dialogue flows and follow-up chains

This feature is particularly valuable for:

  1. Training & Fine-tuning custom DeepSeek models with properly formatted conversation data
  2. Complex Interactions where context from earlier messages impacts later responses, such as:
    • Multi-step reasoning problems
    • Interactive troubleshooting sessions
    • Detailed technical discussions

Testing Locally

You can test the server using the MCP Inspector tool:

npm run build
npx @modelcontextprotocol/inspector node ./build/index.js

The inspector will open in your browser, allowing you to:

  • View available tools
  • Test chat completions with different parameters
  • Debug server responses
  • Monitor performance

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "deepseek" '{"command":"npx","args":["-y","deepseek-mcp-server"],"env":{"DEEPSEEK_API_KEY":"your-api-key"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "deepseek": {
            "command": "npx",
            "args": [
                "-y",
                "deepseek-mcp-server"
            ],
            "env": {
                "DEEPSEEK_API_KEY": "your-api-key"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "deepseek": {
            "command": "npx",
            "args": [
                "-y",
                "deepseek-mcp-server"
            ],
            "env": {
                "DEEPSEEK_API_KEY": "your-api-key"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later