Deepseek R1 Mcp 服务器
概览
什么是 MCP-server-Deepseek_R1?
MCP-server-Deepseek_R1 是一个模型上下文协议(MCP)服务器实现,它将 Claude Desktop 与 DeepSeek 的语言模型连接起来,特别是 R1 和 V3 版本。该服务器促进了用户界面与 DeepSeek 的底层语言处理能力之间的无缝通信和交互,从而增强了功能性和用户体验。
MCP-server-Deepseek_R1 的特点
- 与 Claude Desktop 的集成:该服务器旨在直接与 Claude Desktop 配合使用,提供一个用户友好的界面以访问 DeepSeek 的语言模型。
- 支持多种模型:它支持 DeepSeek 的 R1 和 V3 版本语言模型,为用户提供灵活性和选择。
- 开源:该项目公开可用,允许开发者根据自己的需求进行贡献、修改和增强服务器。
- 活跃的社区:随着越来越多的星标和分支,该项目拥有一个活跃的社区,致力于其开发和改进。
如何使用 MCP-server-Deepseek_R1
- 安装:使用以下命令从 GitHub 克隆代码库:
git clone https://github.com/66julienmartin/MCP-server-Deepseek_R1.git
- 设置:按照 README 文件中的说明设置服务器环境和依赖项。
- 运行服务器:使用提供的脚本或命令启动服务器,确保所有配置在您的环境中正确设置。
- 连接到 Claude Desktop:一旦服务器运行,连接到 Claude Desktop,以开始利用语言模型进行各种应用。
常见问题解答
在这个上下文中 MCP 的目的是什么?
模型上下文协议(MCP)作为一个通信框架,允许不同的应用程序有效地与语言模型进行交互,确保在整个交互过程中保持上下文。
MCP-server-Deepseek_R1 适合生产使用吗?
是的,该服务器设计用于开发和生产环境,但用户应在特定用例中进行彻底测试,以确保稳定性和性能。
我如何为该项目做贡献?
您可以通过分叉代码库、进行更改并提交拉取请求来贡献。此外,报告问题或建议功能也是非常鼓励的。
运行 MCP-server-Deepseek_R1 的系统要求是什么?
系统要求可能会根据使用的具体配置和模型而有所不同。通常,建议使用现代服务器,具备足够的 RAM 和处理能力,以高效处理语言处理任务。
我在哪里可以找到有关该项目的更多信息?
有关更多详细信息、文档和更新,您可以访问 GitHub 代码库。
详情
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>
Quick Start
Installing manually
### 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
Prerequisites
- Node.js (v18 or higher)
- npm
- Claude Desktop
- Deepseek API key
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
:
// For DeepSeek-R1 (default)
model: "deepseek-reasoner"
// For DeepSeek-V3
model: "deepseek-chat"
Project Structure
deepseek-r1-mcp/
├── src/
│ ├── index.ts # Main server implementation
├── build/ # Compiled files
│ ├── index.js
├── LICENSE
├── README.md
├── package.json
├── package-lock.json
└── tsconfig.json
Configuration
- Create a
.env
file:
DEEPSEEK_API_KEY=your-api-key-here
- Update Claude Desktop configuration:
{
"mcpServers": {
"deepseek_r1": {
"command": "node",
"args": ["/path/to/deepseek-r1-mcp/build/index.js"],
"env": {
"DEEPSEEK_API_KEY": "your-api-key"
}
}
}
}
Development
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
API Usage
{
"name": "deepseek_r1",
"arguments": {
"prompt": "Your prompt here",
"max_tokens": 8192, // Maximum tokens to generate
"temperature": 0.2 // Controls randomness
}
}
The Temperature Parameter
The default value of temperature
is 0.2.
Deepseek recommends setting the temperature
according to your specific use case:
| USE CASE | TEMPERATURE | EXAMPLE | |-|-|| | Coding / Math | 0.0 | Code generation, mathematical calculations | | Data Cleaning / Data Analysis | 1.0 | Data processing tasks | | General Conversation | 1.3 | Chat and dialogue | | Translation | 1.3 | Language translation | | Creative Writing / Poetry | 1.5 | Story 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
Server配置
{
"mcpServers": {
"mcp-server-deepseek-r-1": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--66julienmartin--mcp-server-deepseek_r1--mcp-server-deepseek-r-1",
"npm run start"
],
"env": {
"DEEPSEEK_API_KEY": "deepseek-api-key"
}
}
}
}