Labsco
66julienmartin logo

Deepseek R1

โ˜… 69

from 66julienmartin

An MCP server for the Deepseek R1 model, using the Deepseek API.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

MseeP.ai Security Assessment Badge

Deepseek R1 MCP Server

A Model Context Protocol (MCP) server implementation for the Deepseek R1 language model. Deepseek R1 is a powerful language model optimized for reasoning tasks with a context window of 8192 tokens.

Why Node.js? This implementation uses Node.js/TypeScript as it provides the most stable integration with MCP servers. The Node.js SDK offers better type safety, error handling, and compatibility with Claude Desktop.

<a href="https://glama.ai/mcp/servers/qui5thpyvu"><img width="380" height="200" src="https://glama.ai/mcp/servers/qui5thpyvu/badge" alt="Deepseek R1 Server MCP server" /></a>

Model Selection

By default, this server uses the deepseek-R1 model. If you want to use DeepSeek-V3 instead, modify the model name in src/index.ts:

Copy & paste โ€” that's it
// For DeepSeek-R1 (default)
model: "deepseek-reasoner"

// For DeepSeek-V3
model: "deepseek-chat"

Project Structure

Copy & paste โ€” that's it
deepseek-r1-mcp/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ index.ts             # Main server implementation
โ”œโ”€โ”€ build/                   # Compiled files
โ”‚   โ”œโ”€โ”€ index.js
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ package-lock.json
โ””โ”€โ”€ tsconfig.json

Development

Copy & paste โ€” that's it
npm run dev     # Watch mode
npm run build   # Build for production

Features

  • Advanced text generation with Deepseek R1 (8192 token context window)
  • Configurable parameters (max_tokens, temperature)
  • Robust error handling with detailed error messages
  • Full MCP protocol support
  • Claude Desktop integration
  • Support for both DeepSeek-R1 and DeepSeek-V3 models

The Temperature Parameter

The default value of temperature is 0.2.

Deepseek recommends setting the temperature according to your specific use case:

USE CASETEMPERATUREEXAMPLE
Coding / Math0.0Code generation, mathematical calculations
Data Cleaning / Data Analysis1.0Data processing tasks
General Conversation1.3Chat and dialogue
Translation1.3Language translation
Creative Writing / Poetry1.5Story writing, poetry generation

Error Handling

The server provides detailed error messages for common issues:

  • API authentication errors
  • Invalid parameters
  • Rate limiting
  • Network issues

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT