dspy-mcp
DSPyエージェントを外部のMCPツールサーバー(データベース、ファイルシステム、API、またはMCP互換サービス)に接続する必要があるときに使用します。ReActやCodeActエージェントにMCPツールを組み込む、実行時にMCPサーバーからツールを検出する、MCPツールをDSPyツールに変換する、リモートサーバーでホストされているツールを使用するエージェントを構築するといった一般的なシナリオに対応できます。関連機能としてdspy-tools、dspy-react、dspy-codeact、ai-taking-actionsなどがあります。dspy.Tool.from_mcp_tool、MCP with DSPy、DSPyエージェントで外部ツールをMCP経由で使用する機能にも対応しています。
description の原文を見る
Use when you need to connect DSPy agents to external MCP tool servers — databases, file systems, APIs, or any MCP-compatible service. Common scenarios - wiring MCP tools into a ReAct or CodeAct agent, discovering tools from an MCP server at runtime, converting MCP tools to DSPy tools, or building agents that use tools hosted on remote servers. Related - dspy-tools, dspy-react, dspy-codeact, ai-taking-actions. Also used for dspy.Tool.from_mcp_tool, MCP with DSPy, connect DSPy to MCP server, use MCP tools in DSPy agent, model context protocol DSPy, DSPy agent with external tools via MCP, MCP tool integration, StdioServerParameters, ClientSession, stdio_client, mcp tool discovery, async MCP connection, acall with MCP tools.
SKILL.md 本文
DSPyエージェントをMCPツールサーバーに接続する
DSPyエージェントをMCP(Model Context Protocol)サーバーに接続し、実行時にツールを検出し、ReActまたはCodeActエージェントに組み込む方法をユーザーにガイドします。
DSPyにおけるMCP統合とは
DSPyは dspy.Tool.from_mcp_tool() を使用して、任意のMCP互換サーバーからツールを使用できます。これにより、エージェントはデータベース、ファイルシステム、Web API、カスタムサービスなど、外部でホストされるツールを使用できます。各ツール用にPythonラッパーを記述する必要がありません。MCPサーバーが実行を処理し、DSPyが推論を処理します。
MCPを使用する場合
| MCPを使用する場合... | 標準的なdspy.Toolを使用する場合... |
|---|---|
| ツールが別プロセスまたはサーバーでホストされている | シンプルなPython関数を持っている |
| 複数のAIシステムでツールを再利用したい | ツールがこのDSPyプログラムに固有である |
| ツールは分離が必要である(ファイルシステムアクセス、DB接続) | 分離が必要ない |
...
詳細情報
- 作者
- lebsral
- ライセンス
- 不明
- 最終更新
- 2026/5/8
Source: https://github.com/lebsral/DSPy-Programming-not-prompting-LMs-skills / ライセンス: 未指定