MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
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:
- Clone the repository:
git clone https://github.com/66julienmartin/MCP-server-Deepseek_R1.git
cd deepseek-r1-mcp
- Install dependencies:
npm install
- Prepare environment:
cp .env.example .env
- 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
- Build the project for production:
npm run build
- Run in development (watch mode):
npm run dev
- 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"
}
}
}
}
- 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
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.
alibabacloud-iqs-tongxiao
MCP server from aliyun/alibabacloud-iqs-tongxiao-mcp-server