pydantic-mcp
@rectalogic
About pydantic-mcp
Model Context Protocol tool calling support for Pydantic AI
Overview
What is pydantic-mcp?
pydantic-mcp is a Python package that enables Model Context Protocol (MCP) tool calling support for Pydantic AI. It converts an MCP client session into a list of pydantic_ai.Tool instances for use with Pydantic AI agents. The package is now superseded by built-in MCP support in PydanticAI.
How to use pydantic-mcp?
Create an mcp.ClientSession and call tools = await mcptools(session) to get a list of pydantic_ai.Tool instances for the supported MCP tools. The package is runnable as a demo against Groq’s llama-3.1-8b-instant model using an environment variable GROQ_API_KEY.
Key features of pydantic-mcp
- Converts MCP tools to Pydantic AI Tool instances
- Works with any MCP-compliant server (e.g., filesystem)
- Simple one-call integration:
mcptools(session) - Provides a ready-to-run demo using Groq LLM
Use cases of pydantic-mcp
- Connect an LLM agent to MCP‑enabled tools (e.g., file system, databases)
- Read and summarize files via a secure MCP filesystem server
- Leverage Pydantic AI’s tool‑calling with any MCP server
FAQ from pydantic-mcp
Is pydantic-mcp still maintained?
No. PydanticAI now includes native support for MCP servers. Users should migrate to ai.pydantic.dev/mcp/ instead.
What models does the demo work with?
The demo is shown with Groq’s llama-3.1-8b-instant model; any model supported by Pydantic AI can be used with the Tool instances obtained.
How do I install pydantic-mcp?
The README does not include explicit installation instructions, but it uses uv run tests/demo.py and assumes a GROQ_API_KEY.
Does it support any MCP server?
Yes. The package converts any mcp.ClientSession — the demo uses a secure filesystem server, but any MCP server can be used.
Is there a pricing or license?
The package is distributed under the MIT License (as indicated in the demo summary of the LICENSE file).
Basic information
Category
Other
Author
More Other MCP clients
Aura AI
auraai.appAccess 20+ AI video and image models from Google, OpenAI, xAI, ByteDance, and more. Generate and edit videos with Veo 3.1, Sora 2, Seedance, Kling O3, and images with FLUX, Nano Banana, Seedram 4, GPT Image — all in one

Banks to AI
upx.comBanks to AI gives any MCP-compatible agent (Claude, Cursor, or your own) secure, read-only access to real bank data — 12,000+ financial institutions across the US, Canada and beyond. How it works: authenticate via OAuth
tinyagents
albertvillanovaTiny Agents: LLM + MCP Tools
MCP 聊天应用
machaojin1917939763基于MCP(Model Context Protocol)的智能聊天应用,支持Web和桌面环境。集成OpenAI/Anthropic API,提供MCP服务器的所有工具能力。简洁现代的UI设计,支持跨平台部署。
Llama MCP Streamlit
nikunj2003AI assistant built with Streamlit, NVIDIA NIM (LLaMa 3.3:70B) / Ollama, and Model Control Protocol (MCP).
Comments