Dbctx

•
1
•

Inspects relational databases to generate deterministic, versioned context for developers, CI pipelines, and AI coding tools.

Modern software projects increasingly leverage AI-assisted development, yet databases often remain challenging for automated understanding. Dbctx addresses this by providing a robust, open-source Rust library and CLI that focuses on producing trusted, structured, and versioned database context. Unlike tools that primarily offer DDL exports or ER diagrams, Dbctx prioritizes facts and deterministic output, making it an ideal solution for powering AI coding agents, integrating into CI pipelines, and assisting developers in navigating complex database schemas.

Key Features

01Provides flexible connection methods including Docker Compose autodiscovery, configuration files, and direct TCP.
02Includes an MCP server to expose schema metadata and tools to MCP clients over stdio or Streamable HTTP.
03Exports schema context into JSON, Markdown, and Mermaid ER diagram formats.
041 GitHub stars
05Supports inspecting MySQL, MariaDB, SQL Server, PostgreSQL, and SQLite databases.
06Offers schema validation, statistics, and diffing between two exported schemas.

Use Cases

01Automating the generation of accurate, structured database context for AI coding agents.
02Integrating deterministic database schema validation and context into CI/CD pipelines.
03Providing developers with human-readable and machine-readable insights into relational database structures.