mcp_proxy_pydantic_agent
Language:
Python
Stars:
14
Forks:
5
Sample to show to integrate MCP (Model Context Protocol) servers with Pydantic.AI
Parts of this example uses content from : https://github.com/modelcontextprotocol/quickstart-resources.git - Esp. the weather 'server' code
Code uses two different LLMs just for demonstration. The Proxy Agent uses gpt-4o and the tool uses sonnet. So, export OPENAI_API_KEY as well as ANTHROPIC_API_KEY - OR - modify the code to suit your models
The pyproject.toml assumes you are using 'uv' package manager
Steps to run
- Clone this repo
- uv sync
- cd mc-client
- uv run client.py
(Alternatively try client2.py - this uses only PydanticAI - no direct dep on Anthropic libs)
Now, try interacting with some questions like:
What is the time in NY when it is 7:30pm in Bangalore?
What is the Weather currently in Chicago?
(and quit when done)
Publisher info
More MCP servers built with Python
Unified Context Layer (UCL) is a multi-tenant Model Context Protocol (MCP) server that enables AI agents, automation platforms, and applications to connect to over 1,000 SaaS tools—such as Slack, Jira, Gmail, Shopify, Notion, and more—via a single standardized /command endpoint.
Bridge the gap between design and code. Send pixel-perfect website components directly to Cursor or Claude Code using Model Context Protocol (MCP). No more screenshots or descriptions needed.