Skip to content
MCP server

dbprint

Gives coding agents a repo-committed snapshot of a database's schema, values and joins

Runs locallyStatus and history
Pricing
Open source
Platforms
CLI, self-hosted, Linux
Runs
Locally
Version
0.21.0
Listing updated
3 days ago

About dbprint

dbprint is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.

Migrations show a database's shape but not what its values mean. dbprint measures a database once and writes plain-text YAML to commit next to the code: each table's DDL, its joins (declared, or inferred where the schema declares none) and per-column statistics such as null shares, complete value lists with every spelling, ranges and distributions. The measuring step supports PostgreSQL, MySQL, Snowflake, BigQuery, Databricks, Redshift, ClickHouse, DuckDB and SQLite.

Notes on meaning come from a person or an agent. The annotate command gives an agent one table's measurements plus the questions they leave open, such as what a code stands for, and writes the answers into files dbprint never overwrites. An annotate --check run flags a note the data contradicts. Because everything is text in git, schema or data changes show up in review, and dbprint check can gate them in CI.

The MCP server serves that snapshot offline, so the agent has no database connection and holds no credentials. In the project's own tests across multiple codebases, agents reading an annotated print got 80% fewer answers wrong at 17% lower cost per correct answer.

Install

Run in a terminal

claude mcp add dbprint -- uvx dbprint

Add to claude_desktop_config.json

{
  "mcpServers": {
    "dbprint": {
      "command": "uvx",
      "args": [
        "dbprint"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "dbprint": {
      "command": "uvx",
      "args": [
        "dbprint"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "dbprint": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "dbprint"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "dbprint": {
      "command": "uvx",
      "args": [
        "dbprint"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "dbprint": {
      "command": "uvx",
      "args": [
        "dbprint"
      ]
    }
  }
}

What it does

Offline schema context
Agents read DDL, joins and statistics with no database connection.
Complete value lists
Every spelling of a column's values is listed, which exposes near-duplicates.
Inferred joins
Joins are inferred where the schema declares none.
Agent-written notes
Meaning notes live in files that regeneration never overwrites.
Contradiction check
annotate --check flags notes the data disagrees with.
CI gate
dbprint check shows schema or data drift in review.

Good for

  • Let an agent write correct SQL without querying a warehouse
  • Record what a status code or sentinel date means once for every later session
  • Catch schema or data drift in pull requests
  • Reduce repeated exploratory queries and token spend

Pricing

Open source

Prices change. Check jakubro.github.io before you buy.

dbprint FAQ

Does the agent need database credentials?

No. It reads the committed snapshot through the MCP server, a packaged skill or dbprint context.

Which databases can be measured?

PostgreSQL, MySQL, Snowflake, BigQuery, Databricks, Redshift, ClickHouse, DuckDB and SQLite.

How is it installed?

pip install 'dbprint[postgres]' for example, followed by dbprint init and dbprint generate.

Where do the notes live?

In plain YAML files with a published schema, committed beside the code.

Is dbprint free?

Yes. dbprint is open source, so you can use and self-host it for free.

How do I add dbprint to Claude Code?

Run this command in your terminal: claude mcp add dbprint -- uvx dbprint

What are the best alternatives to dbprint?

The closest alternatives to dbprint are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to dbprint

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools