The DeepSeek MCP Server enables seamless integration of DeepSeek's powerful language models with MCP-compatible applications like Claude Desktop. It acts as a bridge between DeepSeek's API and any application that supports the Model Context Protocol.
For automatic installation with Claude Desktop:
npx -y @smithery/cli install @dmontgomery40/deepseek-mcp-server --client claude
Install the server globally via npm:
npm install -g deepseek-mcp-server
Add the server configuration to your claude_desktop_config.json
file:
{
"mcpServers": {
"deepseek": {
"command": "npx",
"args": [
"-y",
"deepseek-mcp-server"
],
"env": {
"DEEPSEEK_API_KEY": "your-api-key"
}
}
}
}
The server responds to natural language requests to change settings:
If the primary model (deepseek-reasoner, R1) is unavailable, the server automatically falls back to deepseek-chat (v3).
The server maintains complete message history and context throughout conversations, which is especially useful for:
The FIM tool helps with code completion, refactoring, and filling in missing code blocks.
The tool accepts these parameters:
prefix
(required): Text before the missing sectionsuffix
(required): Text after the missing sectionmodel
(optional, default: deepseek-fim
)temperature
(optional, default: 0.7)max_tokens
(optional, default: 1024)top_p
(optional, default: 1.0)frequency_penalty
(optional, default: 0.1)presence_penalty
(optional, default: 0)stream
(optional, default: false){
"tool": "fim_completion",
"params": {
"prefix": "def add(a, b):\n return a + b\n\ndef multiply(a, b):\n ",
"suffix": "\n return result\n",
"temperature": 0.2,
"max_tokens": 64
}
}
To test the server locally:
Build the server:
npm run build
Run with MCP Inspector:
npx @modelcontextprotocol/inspector node ./build/index.js
The inspector interface allows you to test chat completions, view available tools, debug responses, and monitor performance.
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 > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.