Quick Start
Quick Start
Section titled “Quick Start”Get a REST API, MCP tools, and OpenAPI spec from your Postgres database in under 2 minutes.
Prerequisites
Section titled “Prerequisites”- A stable Rust toolchain (edition 2024) — or use Nix
- A running PostgreSQL instance
Build & Run
Section titled “Build & Run”# Build the CLIcargo build --release --bin pgvis
# Point it at your database and serveexport PGVIS_DSN="postgres://user@localhost/mydb"./target/release/pgvis serve --bind 0.0.0.0:3000First Request
Section titled “First Request”# List rows from a table in the public schemacurl "http://localhost:3000/api/public/your_table"
# Select specific columnscurl "http://localhost:3000/api/public/items?select=id,name,price"
# Filter rowscurl "http://localhost:3000/api/public/items?price=gte.99.99"MCP for AI Agents
Section titled “MCP for AI Agents”# stdio transport (for Claude Desktop)pgvis --dsn "postgres://user@localhost/mydb" mcp
# or HTTP transport alongside RESTpgvis --dsn "postgres://user@localhost/mydb" serve --mcp-httpNix Users
Section titled “Nix Users”# Drop into a dev shellnix develop
# Or build directlynix buildNext Steps
Section titled “Next Steps”- Installation — Docker, Nix, cargo install
- REST Guide — full query DSL reference
- MCP Guide — using pgvis with LLM agents