MCP for AI agents
Every table and function becomes a typed Model Context Protocol tool — list_*, create_*, update_*, delete_*, call_* — with discovery resources like pgvis://schemas. No glue code. Works with Claude Desktop and any MCP client.
PostgREST-compatible
Same query DSL, the same Prefer header semantics, the same PGRST* error codes. A flat routing mode lets existing PostgREST clients keep working unchanged.
OpenAPI 3.0
Generated from the same introspected schema as REST and MCP — always in sync by construction. Print it with pgvis openapi, or fetch it from the API root with Accept: application/openapi+json.
Rust & embeddable
pgvis-core is I/O-free and depends on no driver. Backends implement a single Backend trait. Add a database API to any Rust app with the pgvis-lib Builder.
Safe by construction
Parameterized SQL only. JWT verification (HS256/384/512, RS256, EdDSA) with exp, nbf and optional audience checks, role switching, and Row-Level Security. Secure defaults: binds to loopback, refuses to start without auth unless you pass --insecure-no-auth, and a token without a role is a 401.
Fast on the hot path
BEGIN, role and claims, pre-request hook and query go out as one pipelined round trip. Table reads forward Postgres's JSON text without re-parsing. Optional in-memory response cache and health-checked, lag-aware read replicas; pool exhaustion returns 503.
Live schema & pub/sub
The schema cache reloads on NOTIFY pgrst, 'reload schema' or SIGUSR1 — REST, OpenAPI and MCP pick up DDL without a restart. Opt-in pub/sub on Postgres LISTEN/NOTIFY: subscribe over SSE, publish over REST or MCP, with optional per-caller channel authorization by a SQL function.
Backend-agnostic
Postgres (including PostgreSQL 18 virtual generated columns and temporal keys) and SQLite today. Dialect capability flags drive feature gating — no core rewrite needed for a new backend.