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
伺服器配置
{
"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"
}
}
}
}