Demonstrates integrating Model Context Protocol (MCP) servers with Pydantic Agents for language model interactions.
This example showcases how to connect MCP servers to Pydantic Agents, enabling interaction with language models. It utilizes a weather server example adapted from the Model Context Protocol quickstart resources and demonstrates the use of two different LLMs (gpt-4o and sonnet) for proxy agent and tool functionality. The code provides sample clients to interact with the server using either direct Anthropic library calls or a pure PydanticAI approach.
Key Features
0112 GitHub stars
Use Cases
01Interacting with a weather server using natural language queries.
02Using language models to process and respond to requests through a proxy agent.
03Demonstrating the integration of MCP servers with Pydantic Agents.