Skip to content

Installation

Before you can start using MD-Models, install it with uv:

Terminal window
uv pip install mdmodels

If you do not have uv installed yet:

Terminal window
curl -LsSf https://astral.sh/uv/install.sh | sh

Install only the features you need:

Terminal window
# LLM tools
uv pip install "mdmodels[chat]"
# Graph database tools
uv pip install "mdmodels[graph]"
# SQL backends
uv pip install "mdmodels[postgres]"
uv pip install "mdmodels[mysql]"
uv pip install "mdmodels[sqlserver]"
# Vector search (pgvector + embeddings)
uv pip install "mdmodels[pgvector]"
# API integrations
uv pip install "mdmodels[rest]"
uv pip install "mdmodels[graphql]"
# MCP integration
uv pip install "mdmodels[mcp]"

If you’re working in a Jupyter notebook or similar environment, you may also want to run this helper function to ensure async operations work correctly:

import mdmodels
mdmodels.patch_nest_asyncio()

This is particularly important if you’re loading models from remote URLs or GitHub, as these operations use async I/O under the hood.

Once you have MD-Models installed, you’re ready to start parsing your markdown data models. Continue to the next guide to learn how to load your data models from various sources.