Get the FREE Ultimate OpenClaw Setup Guide →

pydantic-ai-docs

Pydantic AI Documentation Server, inspired by Mastra Docs MCP

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio omniwaifu-pydantic-ai-docs-server python -m pydantic_ai_docs_server

How to use

The Pydantic AI Documentation Server exposes a set of MCP tools that give you programmatic access to the Pydantic AI documentation repository. It can clone or update the docs repo, fetch specific documents by path, list topics within the docs directory, and access historical changelogs. This enables automated workflows, testing, or client-side tooling to query documentation content without manual navigation. Tools are designed to be called via MCP clients using standard JSON request/response messages over stdio or IPC as described in the MCP protocol.

Key capabilities include: updating or cloning the documentation repository, retrieving a document file by its path under docs/, listing the contents of docs/ (or a subpath), listing available changelog files under docs/history/, and retrieving the content of a specific changelog. The server communicates through newline-delimited JSON messages; to discover available tools, you can request a list of tools, and to execute a tool you provide its name and arguments in a call-tool request.

How to install

Prerequisites:

  • Python 3.12 or newer
  • Access to the internet to clone the documentation repository

Step-by-step:

  1. Clone this repository and navigate into it:
git clone <repository_url>  # Replace with the actual URL of this server's repository
cd pydantic-ai-docs-server
  1. Create and activate a Python virtual environment (recommended):
python -m venv .venv
# macOS/Linux
source .venv/bin/activate
# Windows
.venv\Scripts\activate
  1. Install dependencies in editable mode so changes reflect immediately:
uv pip install -e .
# If uv is not available and you prefer plain pip:
# pip install -e .
  1. Run the server:
python -m pydantic_ai_docs_server

Alternatively, if you prefer to use uv to run the module as a project (depending on your setup):

uv run -m pydantic_ai_docs_server

Additional notes

Tips and notes:

  • This server requires cloning the Pydantic AI docs repo and using the update_documentation tool to keep content current.
  • If you plan to run in a production-like environment, consider mounting a persistent volume for the docs repository to retain changes across restarts.
  • Common issues include missing dependencies or permission errors when cloning large repos. Ensure network access and appropriate git credentials if the repo is private.
  • The MCP tools rely on stdio-based IPC; ensure your client can stream newline-delimited JSON requests and responses.
  • Environment variables you might encounter or set (placeholders):
    • PYDANTIC_AI_DOCS_REPO_PATH: path to the local docs repository (if you manually set a location)
    • LOG_LEVEL: e.g., DEBUG, INFO, WARNING

Related MCP Servers

Sponsor this space

Reach thousands of developers