Skip to content
Documentation

Govern, query and audit the data you already have.

TDB is a self-hosted gateway that turns your databases into read-only REST, SQL and MCP endpoints. Every query is audited, and results are sized for an agent's context window, so its tokens go on your answer rather than on overhead.

  1. 01RegisterSources, credentials, schemas
  2. 02GovernIdentity, roles, read-only checks
  3. 03QueryMCP, REST and the Postgres gateway
  4. 04LeanFewer tokens, same answers
  5. 05AuditHash-chained evidence you own

Evaluating rather than deploying?

The free community edition runs one CSV source in a single Docker command, with the same read-only enforcement and the same audit log. It is the fastest way to answer "does this work for us?" — start at Community Edition, or compare the two at Editions.

Start here

Your data is already scattered across PostgreSQL, MySQL, SQL Server, Snowflake, and CSV files — and every team now wants AI agents to query it. TDB makes that existing, multi-source data safely accessible on your own infrastructure, without moving it into a single cloud warehouse or routing it through a SaaS copilot, and with a tamper-evident audit log you own.


Features

  • Connectors


    PostgreSQL, MySQL, SQL Server, Snowflake, Parquet files and DuckDB databases. Database-wide or single-table registration per source, and multiple simultaneous registered sources.

    All connectors

  • Auth & API


    Static API keys plus DB-managed keys (create / rotate / revoke), role-based access control (read / readwrite / admin), JWT, OAuth 2.1 with PKCE on MCP, single sign-on and SCIM, per-API-key rate limiting and CORS configuration.

    Authentication

  • Query & views


    A REST query endpoint (SELECT and CTEs only, row ceiling enforced), YAML-defined named views with typed parameters, and auto schema detection.

    Query API

  • MCP for AI tools


    Seven MCP tools — query_source, schema_source, preview_source, filter_source, aggregate_source, list_views, run_view, plus run_approved where query approvals apply — on one endpoint that speaks the 2026-07-28 specification and the earlier handshake-era revisions. Tools are marked read-only and return structured output, with prompt-injection filtering and per-key tool allow-lists. Claude Code connects on the newest revision, and a free VS Code extension sets TDB up in one command.

    MCP reference

  • Lean by design


    Every token an agent spends reading a result is a token it can't spend on your question. Lean Mode cuts a 100-row answer from 10,412 to 6,868 tokens and a 30-table schema from 5,235 to 3,025, with the same answers on our 21-question check. Agents can also aggregate and filter in the database instead of pulling rows, and a scoped key lists only its own tools. Set it per call, per key or server-wide.

    Saving tokens

  • PostgreSQL wire gateway


    Metabase, DBeaver, psql, JDBC and other PostgreSQL clients connect with only a new host, port and password. Every statement is checked as read-only and audited before it runs, as it is over REST and MCP.

    Wire gateway

  • Audit & compliance


    An NDJSON audit log on every query, signed and hash-chained so tampering is detectable, naming the AI client behind each MCP call, with integrity verification via GET /v1/audit/verify and incremental export to Splunk HEC or S3. Prometheus metrics and a health check cover the rest of operations.

    Audit log

  • Read-only, enforced


    TDB never modifies your data. Every connector enforces read-only at the connection or session level — not merely by validating the SQL — and refusals are written to the audit log too.

    RBAC

  • Governed access


    Per-key column and row policies that withhold, mask and filter in the database, and a person's approval before named columns are read, with every decision in the audit log (Mid-Market). Several teams or customers on one deployment, each in its own tenant with its own audit log (Enterprise).

    Policies · Query approvals · Tenants


How it works

Postgres · MySQL · SQL Server · Snowflake
      │
      │  read-only connection (per connector)
      ▼
 ┌────────────────────────────────────────────┐
 │              The Data-Bridge               │
 │                                            │
 │  POST /v1/sources     ← register source    │
 │  POST /v1/query       ← SQL SELECT         │
 │  POST /v1/mcp         ← MCP tool calls     │
 │  GET  /v1/views       ← YAML-defined views │
 │  :5432 (opt-in)       ← Postgres wire      │
 │  GET  /metrics        ← Prometheus         │
 │                                            │
 │  Every query → hash-chained audit log      │
 │  RBAC enforced per key (read/readwrite/    │
 │  admin); tool allow-lists per MCP key      │
 └────────────────────────────────────────────┘
      │
      │  Authorization: Bearer <token>
      ▼
 Your app · Claude Desktop · Cursor · Metabase · psql


Interactive API docs

When TDB is running, the full OpenAPI reference is available at:

  • Swagger UI — http://localhost:8000/docs
  • ReDoc — http://localhost:8000/redoc
  • OpenAPI JSON — http://localhost:8000/openapi.json