MCP ExplorerExplorer

Pydanticai Mcp Demo

@Finndersenon a year ago
11 MIT
FreeCommunity
AI Systems
Demonstrate using MCP with Pydantic AI framework

Overview

What is Pydanticai Mcp Demo

pydanticai_mcp_demo is a demonstration project that showcases how to integrate the Model Context Protocol (MCP) with the Pydantic AI framework, enabling enhanced capabilities for AI agents.

Use cases

Use cases include automating file management tasks, developing intelligent assistants that can manipulate files, and creating applications that require dynamic interaction with the file system.

How to use

To use pydanticai_mcp_demo, clone the repository and install the necessary dependencies by running ‘make install’. Configure your API keys for OpenAI, Anthropic, or Gemini, and then start the interactive CLI with ‘make run’ to interact with the agent.

Key features

Key features include the ability for the agent to read, write, edit, and move files, create and list directories, and search for files, all through an MCP server interface.

Where to use

pydanticai_mcp_demo can be used in various fields such as AI development, automation scripts, and any application requiring file system interaction through an AI agent.

Content

AI Agent with MCP Demo

This is a demonstration of how to use Model Context Protocol (MCP) to add capabilties to a Pydantic AI Agent.
Currently the framework does not natively support MCP or even directly specifying tool definition schemas, so it’s not so straightforward.

The agent will be provided tools for interacting with the filesystem, via an MCP server based on the official reference implementation here.

See the article here for more context!

Requirements

Installation

Clone this repo then run:

make install

Usage

Coonfigure your OPENAI_API_KEY, ANTHROPIC_API_KEY or GEMINI_API_KEY, then run the interactive CLI:

make run

Tell the agent what you would like it to do! It will have access to the following tools:

  • read file(s)
  • write/edit/move files
  • create & list directories
  • search files

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers