mcpField
M
MCP-SERVER-DS

MCP-SERVER-DS

ローカル
github.com/codejie開発ツール079 週間前に更新

MCP-SERVER-DS について

MCP-SERVER-DSは、DeepSeekとのチャットとMCPツール呼び出しを説明するデモです。DeepSeekチャット用ツールと、ツール実行を示す加算関数を例として定義しています。

主な機能

  1. 01DeepSeekチャットAPIツール
  2. 02加算ツールの例
  3. 03MCP Inspectorでのデモ
  4. 04Cline拡張機能でのデモ

活用シーン

  1. 01ツール経由でDeepSeekチャットを試す
  2. 02MCPツール呼び出しのテスト
  3. 03MCP Inspectorでサーバーを確認
  4. 04VSCodeのCline拡張機能で試用

MCP 対応

このMCPサーバーはDeepSeekチャットツールと加算ツールを提供します。READMEではMCP InspectorとVSCodeのCline拡張機能での利用例を示しています。

設定

ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。

インストール方法は未掲載です

このサーバーのパッケージやリモートエンドポイントはまだ取得できていません。プロジェクトの README の手順に従ってください。

リポジトリ

ツール

ツール一覧はまだ取得されていません

ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。

詳細

MCP-SERVER-DS

deepseek とチャットする方法、および MCP のツール呼び出しを使用する方法を説明する MCP サーバーのデモです。

MCP

ModelContextProtocol.io

MCP helps you build agents and complex workflows on top of LLMs. LLMs frequently need to integrate with data and tools, and MCP provides:

- A growing list of pre-built integrations that your LLM can directly plug into
- The flexibility to switch between LLM providers and vendors
- Best practices for securing your data within your infrastructure
README の画像
MCP ツール
Tools are a powerful primitive in the Model Context Protocol (MCP) that enable servers to expose executable functionality to clients. Through tools, LLMs can interact with external systems, perform computations, and take actions in the real world.

コード

ツールの定義
// tools.ts
// define deepseek chat api
  {
    name: "ds_chat",
    description: 'forward message to deepseek chat api.',
    paramSchema: {
      messages: z.array(
        z.object({
          role: z.enum(['user', 'assistant', 'system']).default('user'),
          content: z.string() 
        })
      )
    },
    cb: async (args) => {
      const resp = await ds.request_chat(args.messages)
      return {
        content: [
          {
            type: 'text',
            text: resp.choices[0].message.content
          }
        ]
      }
    }
  }
// define add() function
  {
    name: "add",
    description: "a function that adds two numbers, with a WRONG result for testing.",
    paramSchema: {
      a: z.number(),
      b: z.number()
    },
    cb: async ({a, b}) => {
      return { 
        content: [
          {
            type: 'text',
            text: `${a} + ${b} = ${a + b + 1}`
          }
        ]
      }
    }
  }

デモ

MCP Inspector を使用
~/Code/mcp-server-ds>npm run inspect

> [email protected] inspect
> npx @modelcontextprotocol/inspector node dist/index.js

Starting MCP inspector...
⚙️ Proxy server listening on port 6277
🔍 MCP Inspector is up and running at http://127.0.0.1:6274 🚀

inspector

VSCode の Cline Extension を使用

cline

コメント

MCP は初めてですか?

プロトコルの概要から最初のサーバーの導入まで、よくある疑問にまとめて答えます。

AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。