PydanticAI MCP Experiment
@eschmidt42
About PydanticAI MCP Experiment
Minimalist examples to provide your own MCP servers to your local llm models.
Config
No standard config provided
This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.
RepositoryTools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is PydanticAI MCP Experiment?
PydanticAI MCP Experiment provides minimalist examples for running your own MCP servers with local LLM models. It uses pydantic_ai and local models via Ollama, offering four different transport configurations under the examples/ folder. This project is aimed at developers who want to get hands‑on experience with MCP clients and servers.
How to use PydanticAI MCP Experiment?
The project is managed with uv. After cloning, run uv sync to install dependencies. Then change into any example folder (e.g., examples/0_subprocess) and start the server with python server.py, followed by python client.py in another terminal. The setup uses Logfire for logging, which will prompt for authentication on first run.
Key features of PydanticAI MCP Experiment
- Four transport examples: stdio, HTTP via mcp.run, FastAPI, and Starlette
- Uses
pydantic_aiand local Ollama models - Minimal, self‑contained client/server pairs per example
- Logging integration with Logfire (optional)
- Managed with
uvfor reproducible environments
Use cases of PydanticAI MCP Experiment
- Experimenting with MCP servers on a local machine
- Comparing different transport protocols (stdio vs HTTP)
- Prototyping MCP‑based AI assistants with
pydantic_ai - Learning how to integrate MCP with local LLM models
FAQ from PydanticAI MCP Experiment
What is required to run the examples?
You need Python and uv. The project also assumes you have a local Ollama instance available for the LLM models.
How do I set up the project?
Run uv sync in the root directory to install all dependencies. No additional configuration is required.
How do I run an example?
Change to the example folder (e.g., examples/0_subprocess), start the server with python server.py, then in another terminal run python client.py.
What logging is used and can I change it?
The project uses Logfire by default. You will be asked to authenticate on first run. You can switch to an alternative OpenTelemetry backend like otel‑tui, but the README notes that prompt and response messages may not be displayed that way.
What MCP transport protocols are available?
The examples include stdio (via subprocess) and three HTTP variants: using mcp.run, FastAPI, and Starlette.
Frequently asked questions
What is required to run the examples?
You need Python and `uv`. The project also assumes you have a local Ollama instance available for the LLM models.
How do I set up the project?
Run `uv sync` in the root directory to install all dependencies. No additional configuration is required.
How do I run an example?
Change to the example folder (e.g., `examples/0_subprocess`), start the server with `python server.py`, then in another terminal run `python client.py`.
What logging is used and can I change it?
The project uses Logfire by default. You will be asked to authenticate on first run. You can switch to an alternative OpenTelemetry backend like `otel‑tui`, but the README notes that prompt and response messages may not be displayed that way.
What MCP transport protocols are available?
The examples include stdio (via subprocess) and three HTTP variants: using `mcp.run`, FastAPI, and Starlette.
Basic information
More Other MCP servers

DeepMark
DeepMark helps teachers deliver rapid, consistent marking with meaningful feedback for every student — in a fraction of the time. What once took a week, now takes one free period.
ghidraMCP
LaurieWiredMCP Server for Ghidra

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
Reactive Resume
amruthpillaiA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
Comments