Get the FREE Ultimate OpenClaw Setup Guide →

MCP -Deepseek_R1

A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio 66julienmartin-mcp-server-deepseek_r1 node /path/to/deepseek-r1-mcp/build/index.js \
  --env DEEPSEEK_API_KEY="your-api-key"

How to use

This MCP server implements the Deepseek R1 language model within the MCP framework. It exposes an API compatible with the MCP protocol, allowing clients (such as Claude Desktop or other MCP clients) to send prompts and receive structured responses from the Deepseek R1 model. By default, it uses the deepseek-reasoner model with an 8192-token context window and supports configurable parameters like max_tokens and temperature. The server is designed to work by loading your Deepseek API key via environment variables and routing requests to the Deepseek API, returning results in the MCP response format.

To use it, set up your environment with the required API key and point your client at the server’s endpoint. In Claude Desktop, you typically add an MCP server configuration that mirrors the example in the README, providing the command path and environment variable for DEEPSEEK_API_KEY. Clients then construct MCP requests with a prompt and optional parameters (max_tokens, temperature) and the server returns the generated text along with any structured metadata the MCP protocol specifies.

The server supports both Deepseek R1 and, if modified, the Deepseek V3 model by adjusting the model name in the source (default: deepseek-reasoner). You can tune generation behavior through the API payload and the server’s internal configuration, enabling use cases from code generation and math to general conversation and translation, all within the MCP framework.

How to install

Prerequisites:

  • Node.js v18 or higher
  • npm
  • Claude Desktop (for MCP integration)
  • A Deepseek API key

Installation steps:

  1. Clone the repository:
git clone https://github.com/66julienmartin/MCP-server-Deepseek_R1.git
cd deepseek-r1-mcp
  1. Install dependencies:
npm install
  1. Prepare environment:
cp .env.example .env
  1. Add your Deepseek API key to the environment file or via the key directly in your MCP config:
  • Create or edit the .env file (if used by local dev):
DEEPSEEK_API_KEY=your-api-key-here
  1. Build the project for production:
npm run build
  1. Run in development (watch mode):
npm run dev
  1. Configure Claude Desktop (or your MCP client) to point to the server with the appropriate environment variable. For example, use the provided config snippet:
{
  "mcpServers": {
    "deepseek_r1": {
      "command": "node",
      "args": ["/path/to/deepseek-r1-mcp/build/index.js"],
      "env": {
        "DEEPSEEK_API_KEY": "your-api-key"
      }
    }
  }
}
  1. Start serving requests once the build step completes and the server is running.

Additional notes

Tips and notes:

  • Ensure your DEEPSEEK_API_KEY is kept secure and not committed to version control.
  • The default model is deepseek-reasoner; to switch to DeepSeek-V3, update the model name in src/index.ts (build accordingly).
  • If you encounter authentication errors, verify that your API key is correct and has access to the Deepseek service.
  • The MCP server supports standard MCP request/response payloads; adjust max_tokens and temperature to fit your use case.
  • For Claude Desktop integration, keep the environment variable configuration in sync with your client’s expected environment.
  • If upgrading dependencies, re-run npm install and rebuild to ensure compatibility with the updated TypeScript/Node versions.

Related MCP Servers

Sponsor this space

Reach thousands of developers