# DB2TOON MCP

Extracts a database schema or parses a SQL dump into TOON for an MCP client. Use it when an agent needs to inspect tables and relationships.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5
- Author: kamil5b
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/kamil5b/db2toon
- Updated: 2026-08-12
- HTML: https://affpapa.org/en/nevibecode/mcp/db2toon-mcp

## What it does

The server exposes `db2toon.extract_schema`. Give it a database dialect and either a database connection or a plain-text SQL dump; it returns the schema in TOON. Dump files are parsed offline, not run as SQL. Supported dialects include PostgreSQL, SQLite, DuckDB, MySQL, MariaDB, CockroachDB, SQL Server, and Oracle.

Extraction is read-only. The default operation timeout is 30 seconds, and responses are capped at 4 MiB; both limits can be lowered through `options`. Claude Code setup runs the server in Docker. DuckDB needs `libduckdb` at runtime, so check that dependency before using that dialect.

## Requirements
- Needs: Docker

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add db2toon-mcp -- docker run -i --rm ghcr.io/kamil5b/db2toon:v1.4.4
```

### Codex

**Platform CLI**
```bash
codex mcp add db2toon-mcp -- docker run -i --rm ghcr.io/kamil5b/db2toon:v1.4.4
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "db2toon-mcp": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/kamil5b/db2toon:v1.4.4"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "db2toon-mcp": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/kamil5b/db2toon:v1.4.4"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add db2toon-mcp docker run -i --rm ghcr.io/kamil5b/db2toon:v1.4.4
```

## When to use it
- inspect tables and columns in a database
- parse a SQL dump without executing it
- give an agent schema relationships and indexes
- produce a TOON schema for documentation

## Example prompts
- Inspect the PostgreSQL schema in `./schema.sql` and explain how its tables relate.
- Review `./schema.db` and list the SQLite tables with their columns.
- Parse `./schema.sql` as a MySQL dump and return its schema in TOON.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89899
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16730
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40459
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27844
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49863

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
