dspy-mcp-tool-integration
Installation
SKILL.md
DSPy MCP Tool Integration
Goal
Connect an MCP server with the MCP Python client, convert its tools to dspy.Tool, and use them in an async DSPy agent.
Install
pip install -U "dspy[mcp]>=3.2.1,<3.3"
DSPy converts tools but does not manage MCP connections. Keep the ClientSession alive for as long as the DSPy tools are in use.