# dbprint

> dbprint is an open-source MCP server for databases. Gives coding agents a repo-committed snapshot of a database's schema, values and joins. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, Linux, macOS, Windows
- **Website:** https://jakubro.github.io/dbprint/
- **Repository:** https://github.com/jakubro/dbprint
- **MCP Registry name:** io.github.jakubro/dbprint
- **Categories:** databases, developer tools
- **Listing updated:** 2026-11-14

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
claude mcp add dbprint -- uvx dbprint
```

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "dbprint": {
      "command": "uvx",
      "args": [
        "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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/dbprint
