DeepSeek MCP Server
About
An MCP server for the DeepSeek API, providing code review, file management, and account management.
Explore
- Multi-Model Support: Choose from various DeepSeek models including DeepSeek Chat and DeepSeek Coder
- Code Review Focus: Built-in system prompt for detailed code analysis with markdown output
- Automatic File Handling: Built-in file management with direct path integration
- API Account Management: Check balance and estimate token usage
- JSON Mode Support: Request structured JSON responses for easy parsing
- Advanced Error Handling: Graceful degradation with structured error logging
- Improved Retry Logic: Automatic retries with configurable exponential backoff for API calls
- Security: Configurable file type restrictions and size limits
- Performance Monitoring: Built-in metrics collection for request latency and throughput
- Go 1.21+
- DeepSeek API key
- Basic understanding of MCP protocol
export DEEPSEEK_API_KEY=your_api_key
export DEEPSEEK_MODEL=deepseek-chat
./bin/mcp-deepseek
| Variable | Description | Default |
|----------|-------------|---------|
| DEEPSEEK_API_KEY | DeepSeek API key | Required |
| DEEPSEEK_MODEL | Model ID from available models | deepseek-chat |
| DEEPSEEK_SYSTEM_PROMPT | System prompt for code review | Default code review prompt |
| DEEPSEEK_SYSTEM_PROMPT_FILE | Path to file containing system prompt | Empty |
| DEEPSEEK_MAX_FILE_SIZE | Max upload size (bytes) | 10485760 (10MB) |
| DEEPSEEK_ALLOWED_FILE_TYPES | Comma-separated MIME types | [Common text/code types] |
| DEEPSEEK_TIMEOUT | API timeout in seconds | 90 |
| DEEPSEEK_MAX_RETRIES | Max API retries | 2 |
| DEEPSEEK_INITIAL_BACKOFF | Initial backoff time (seconds) | 1 |
| DEEPSEEK_MAX_BACKOFF | Maximum backoff time (seconds) | 10 |
| DEEPSEEK_TEMPERATURE | Model temperature (0.0-1.0) | 0.4 |
Example .env:
DEEPSEEK_API_KEY=your_api_key
DEEPSEEK_MODEL=deepseek-chat
DEEPSEEK_SYSTEM_PROMPT="Your custom code review prompt here"
To run tests:
bashgo test -v ./...
bashgolangci-lint run
```
Currently, the server provides the following tools:
A production-grade MCP server integrating with DeepSeek's API, featuring advanced code review capabilities, efficient file management, and API account management.
Features
- Multi-Model Support: Choose from various DeepSeek models including DeepSeek Chat and DeepSeek Coder
- Code Review Focus: Built-in system prompt for detailed code analysis with markdown output
- Automatic File Handling: Built-in file management with direct path integration
- API Account Management: Check balance and estimate token usage
- JSON Mode Support: Request structured JSON responses for easy parsing
- Advanced Error Handling: Graceful degradation with structured error logging
- Improved Retry Logic: Automatic retries with configurable exponential backoff for API calls
- Security: Configurable file type restrictions and size limits
- Performance Monitoring: Built-in metrics collection for request latency and throughput
Prerequisites
- Go 1.21+
- DeepSeek API key
- Basic understanding of MCP protocol
Installation & Quick Start
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



