Deepseek R1 MCP Server is an implementation of the Model Context Protocol for the Deepseek R1 language model. This server enables you to integrate the powerful reasoning capabilities of Deepseek R1, which features an 8192-token context window, with applications like Claude Desktop.
# Clone and install
git clone https://github.com/66julienmartin/MCP-server-Deepseek_R1.git
cd deepseek-r1-mcp
npm install
# Set up environment
cp .env.example .env # Then add your API key
# Build and run
npm run build
Before using the Deepseek R1 MCP Server, you'll need:
By default, this server uses the deepseek-R1 model, but you can also use DeepSeek-V3 by modifying the model name:
// For DeepSeek-R1 (default)
model: "deepseek-reasoner"
// For DeepSeek-V3
model: "deepseek-chat"
.env
file with your API key:DEEPSEEK_API_KEY=your-api-key-here
Add the following to your Claude Desktop configuration:
{
"mcpServers": {
"deepseek_r1": {
"command": "node",
"args": ["/path/to/deepseek-r1-mcp/build/index.js"],
"env": {
"DEEPSEEK_API_KEY": "your-api-key"
}
}
}
}
The API accepts the following parameters:
{
"name": "deepseek_r1",
"arguments": {
"prompt": "Your prompt here",
"max_tokens": 8192, // Maximum tokens to generate
"temperature": 0.2 // Controls randomness
}
}
The default temperature is 0.2. Deepseek recommends different settings based on your use case:
The server provides detailed error messages for common issues including:
You can use these error messages to troubleshoot any problems that arise during usage.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "deepseek_r1" '{"command":"node","args":["/path/to/deepseek-r1-mcp/build/index.js"],"env":{"DEEPSEEK_API_KEY":"your-api-key"}}'
See the official Claude Code MCP documentation for more details.
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.
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_r1": {
"command": "node",
"args": [
"/path/to/deepseek-r1-mcp/build/index.js"
],
"env": {
"DEEPSEEK_API_KEY": "your-api-key"
}
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"deepseek_r1": {
"command": "node",
"args": [
"/path/to/deepseek-r1-mcp/build/index.js"
],
"env": {
"DEEPSEEK_API_KEY": "your-api-key"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect