Skip to main content
Glama

DeepSeek MCP Server

by Sheshiyer

DeepSeek MCP 服务器

MCP 服务器实现使用 DeepSeek API 提供代码生成和完成功能,并支持工具链和成本优化。

特征

  • 具有特定语言支持的代码生成
  • 具有上下文感知的代码完成
  • 多目标代码优化
  • 复杂操作的工具链
  • 内置缓存,用于成本优化
  • 具有完全类型安全性的 TypeScript 实现

工具

1. 生成代码

使用具有特定语言支持的 DeepSeek API 生成代码。

{ "name": "generate_code", "params": { "prompt": "Write a function that sorts an array", "language": "typescript", "temperature": 0.7 } }

2. 完整代码

根据现有上下文获取智能代码完成。

{ "name": "complete_code", "params": { "code": "function processData(data) {", "prompt": "Add input validation and error handling", "temperature": 0.7 } }

3. 优化代码

优化现有代码的性能、内存使用率或可读性。

{ "name": "optimize_code", "params": { "code": "your code here", "target": "performance" } }

4. 执行链

按顺序执行一系列工具,并在步骤之间传递上下文。

{ "name": "execute_chain", "params": { "steps": [ { "toolName": "generate_code", "params": { "prompt": "Create a REST API endpoint", "language": "typescript" } }, { "toolName": "optimize_code", "params": { "target": "performance" } } ] } }

安装

  1. 克隆存储库
  2. 安装依赖项:
npm install
  1. 构建项目:
npm run build
  1. 在 MCP 设置文件中配置您的 DeepSeek API 密钥:
{ "mcpServers": { "deepseek": { "command": "node", "args": ["/path/to/deepseek-mcp/build/index.js"], "env": { "DEEPSEEK_API_KEY": "your-api-key" } } } }

用法

该服务器可与任何兼容 MCP 的客户端配合使用。以下是使用 MCP CLI 的示例:

mcp use deepseek generate_code --params '{"prompt": "Write a hello world program", "language": "python"}'

工具链

工具链允许您将多个操作组合成一个工作流。链中的每个工具都可以通过链上下文访问前面工具的结果。

示例链:

  1. 生成初始代码
  2. 完成带有错误处理的代码
  3. 优化最终结果
{ "steps": [ { "toolName": "generate_code", "params": { "prompt": "Create a user authentication function", "language": "typescript" } }, { "toolName": "complete_code", "params": { "prompt": "Add input validation and error handling" } }, { "toolName": "optimize_code", "params": { "target": "security" } } ] }

成本优化

服务器实施了几种策略来优化 API 成本:

  1. 使用 TTL 进行请求缓存
  2. 链式结果缓存
  3. 智能提示构造
  4. 用于使用情况分析的元数据跟踪

发展

开始开发:

npm run dev

清理并重建:

npm run rebuild

要求

  • Node.js >= 18.0.0
  • DeepSeek API 密钥
  • MCP 兼容客户端

执照

国际学习中心

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

使用 DeepSeek API 提供代码生成和完成功能,并支持工具链和成本优化。

  1. 特征
    1. 工具
      1. 生成代码
      2. 完整代码
      3. 优化代码
      4. 执行链
    2. 安装
      1. 用法
        1. 工具链
          1. 成本优化
            1. 发展
              1. 要求
                1. 执照

                  Related MCP Servers

                  • -
                    security
                    A
                    license
                    -
                    quality
                    Provides deep source code analysis for Unreal Engine codebases, allowing AI assistants to understand C++ class structures, search code, and analyze subsystems.
                    Last updated -
                    71
                    TypeScript
                    MIT License
                  • -
                    security
                    F
                    license
                    -
                    quality
                    Provides code completion, bug fixing, and test generation for multiple programming languages, integrating with the Mistral Codestral API to enhance code development processes.
                    Last updated -
                    2
                    TypeScript
                  • A
                    security
                    A
                    license
                    A
                    quality
                    Provides LLM Agents with AI-powered mentorship for code review, design critique, writing feedback, and brainstorming using the Deepseek API, enabling enhanced output in various development and strategic planning tasks.
                    Last updated -
                    5
                    15
                    TypeScript
                    Apache 2.0
                  • -
                    security
                    F
                    license
                    -
                    quality
                    This server integrates DeepSeek and Claude AI models to provide enhanced AI responses, featuring a RESTful API, configurable parameters, and robust error handling.
                    Last updated -
                    13
                    TypeScript

                  View all related MCP servers

                  MCP directory API

                  We provide all the information about MCP servers via our MCP API.

                  curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sheshiyer/deepseek-mcp-with-MoE'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server