Getting Started
Documentation for the dbctx CLI and the MCP tools served by the dbctx platform.
dbctx ships AI-ready context about your PostgreSQL database to the dbctx platform, then exposes that context to coding agents over MCP. This documentation has two parts:
CLI
The dbctx CLI connects to your database, introspects schema and planner statistics, optionally samples values, and ships the resulting context bundle to your account. Commands:
generate— connect and generate context (default command).list— pick from databases in your account.login— authenticate via browser.logout— clear the stored auth token.
MCP Tools
The MCP server exposes a Streamable HTTP endpoint at /mcp. Agents authenticate with a Bearer JWT (OAuth) or an API key, then call any of 12 tools to navigate schema, search semantically, inspect statistics, and validate SQL.
- Schema discovery:
list_databases,list_revisions,get_overview,list_relations,get_relations. - Semantic search:
search_relations,search_attributes. - Statistics & joins:
get_column_stats,find_join_paths. - Change tracking:
get_changelogs. - Validation:
validate_sql.