Skip to main content
Glama
Sheshiyer
by Sheshiyer

DeepSeek MCP サーバー

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

特徴

  • 言語固有のサポートを備えたコード生成

  • コンテキスト認識によるコード補完

  • 複数のターゲットでのコード最適化

  • 複雑な操作のためのツールチェーン

  • コスト最適化のための組み込みキャッシュ

  • 完全な型安全性を備えたTypeScript実装

Related MCP server: AI Development Assistant MCP Server

ツール

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

Resources

Looking for Admin?

Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.

Latest Blog Posts

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