DeepSeek MCP Server

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.

Integrations

  • Supports running the MCP server on Node.js, with requirements specifying Node.js >= 18.0.0 for proper execution of the TypeScript implementation.

  • Enables code generation in Python through the DeepSeek API, allowing users to create Python programs with language-specific optimizations.

  • Provides code generation and completion capabilities with language-specific support for TypeScript, enabling users to generate, complete, and optimize TypeScript code with full type safety.

DeepSeek MCP サーバー

ツールチェーンとコスト最適化をサポートする、DeepSeek API を使用したコード生成および補完機能を提供する MCP サーバー実装。

特徴

  • 言語固有のサポートを備えたコード生成
  • コンテキスト認識によるコード補完
  • 複数のターゲットでのコード最適化
  • 複雑な操作のためのツールチェーン
  • コスト最適化のための組み込みキャッシュ
  • 完全な型安全性を備えた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互換クライアント

ライセンス

ISC

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

ツールチェーンとコスト最適化をサポートする、DeepSeek API を使用したコード生成および補完機能を提供します。

  1. Features
    1. Tools
      1. 1. generate_code
      2. 2. complete_code
      3. 3. optimize_code
      4. 4. execute_chain
    2. Installation
      1. Usage
        1. Tool Chaining
          1. Cost Optimization
            1. Development
              1. Requirements
                1. License
                  ID: 1b8v5vz9gl