Skip to content

Commit fe59435

Browse files
committed
Adds Pydantic MCP client integration
It looks and acts like all the other client integrations, but for PydanticAI. The only real difference is how PydanticAI handles tools and tool calling.
1 parent 121c656 commit fe59435

File tree

5 files changed

+1297
-44
lines changed

5 files changed

+1297
-44
lines changed

packages/mcp/pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ crewai = [
3838
"crewai>=0.86.0",
3939
"nest-asyncio>=1.6.0",
4040
]
41+
pydantic-ai = [
42+
"pydantic-ai>=0.2.0",
43+
]
4144
test = [
4245
"pytest>=8.4.1",
4346
"pytest-asyncio>=1.1.0",
@@ -49,6 +52,7 @@ test = [
4952
"langchain>=1.0.5",
5053
"langchain-openai>=1.0.2",
5154
"crewai>=0.86.0",
55+
"pydantic-ai>=0.2.0",
5256
]
5357

5458
[project.urls]

packages/mcp/src/keycardai/mcp/client/integrations/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,10 @@
3939
except ImportError:
4040
pass
4141

42+
# Try to import Pydantic AI integration
43+
try:
44+
from . import pydantic_agents # noqa: F401
45+
__all__.extend(["pydantic_agents"])
46+
except ImportError:
47+
pass
48+

0 commit comments

Comments
 (0)