A modern PostgreSQL database explorer with schema browser, SQL editor, ERD visualization, and embedded Claude Code terminal
Features • Installation • Getting Started • MCP Integration • Development • Releases
PgVoyager is a modern PostgreSQL client that combines schema exploration, SQL editing, and AI assistance in one sleek interface.
Browse your database structure with ease. Explore schemas, tables, views, functions, sequences, and custom types. See column details, constraints, indexes, and foreign key relationships at a glance.
Write and execute SQL with a full-featured editor powered by CodeMirror. Features include syntax highlighting, autocomplete, error highlighting, and query history tracking.
Hover over any foreign key value to instantly see the referenced record. No more jumping between tables to understand relationships.
Visualize your database relationships with interactive Entity Relationship Diagrams. Right-click any table to see its direct relationships in a centered view, or view the entire schema at once. Click nodes to navigate between tables, double-click to open them, and export diagrams as PNG, SVG, JSON, or SQL DDL.
Analyze your database health with a single click. PgVoyager identifies potential issues like missing indexes on foreign keys, unused indexes, table bloat, missing primary keys, and more. Each issue includes a severity level, description, and a suggested SQL fix you can copy with one click.
The star of the show. An embedded Claude Code terminal with MCP integration that can explore your database schema, write SQL queries directly into the editor, execute queries and analyze results, and help you understand your data.
Easily manage your database connections. Click the edit icon next to any connection to modify settings or delete connections you no longer need - even if they can't connect.
npm install -g @anthropic-ai/claude-code or see Claude Code docs)Download the latest release for your platform from GitHub Releases.
curl -L https://github.com/thelinuxer/pgvoyager/releases/latest/download/pgvoyager-linux-amd64.tar.gz | tar xz
cd pgvoyager-linux-amd64
./install.sh
Download pgvoyager-windows-amd64.zip, extract, and run install.ps1.
curl -L https://github.com/thelinuxer/pgvoyager/releases/latest/download/pgvoyager-darwin-arm64 -o pgvoyager
chmod +x pgvoyager
PGVOYAGER_MODE=production ./pgvoyager
Then open http://localhost:5137 in your browser.
http://localhost:5137Prerequisites: Go 1.24+, Node.js 20+
git clone https://github.com/thelinuxer/pgvoyager.git
cd pgvoyager
make install
make build-prod
PGVOYAGER_MODE=production ./bin/pgvoyager
make dev
Starts backend on http://localhost:5137 and frontend on http://localhost:5173.
PgVoyager includes a Model Context Protocol (MCP) server that enables Claude to interact directly with your database. The MCP server is automatically configured when you open the Claude terminal.
Claude can use these tools to help you work with your database:
| Tool | Description |
|---|---|
get_connection_info |
Current database connection details |
list_schemas |
All schemas in the database |
list_tables |
Tables (optionally filtered by schema) |
get_columns |
Column details for a table |
get_table_info |
Table size, row count, etc. |
execute_query |
Run arbitrary SQL |
list_views |
Database views |
list_functions |
Database functions |
get_foreign_keys |
Foreign key relationships |
get_indexes |
Index information |
get_editor_content |
Read SQL from the query editor |
insert_to_editor |
Insert text into the editor |
replace_editor_content |
Replace editor content |
PgVoyager is built with Go for the backend and Svelte for the frontend:
┌─────────────────────────────────────────────────────────────────────────┐
│ Browser │
│ ┌──────────────────────────────────────────────────────────────────┐ │
│ │ Frontend (SvelteKit + Svelte 5) │ │
│ │ • Schema Browser • SQL Editor (CodeMirror) │ │
│ │ • ERD Viewer • Terminal (xterm.js) │ │
│ └──────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
│
HTTP / WebSocket
│
┌─────────────────────────────────────────────────────────────────────────┐
│ Backend (Go + Gin) │
│ • Connection Management • Query Execution │
│ • Schema Introspection • Claude Session Manager (PTY) │
│ • Query History • Static File Server │
└─────────────────────────────────────────────────────────────────────────┘
│
MCP Protocol
│
┌─────────────────────────────────────────────────────────────────────────┐
│ MCP Server (Go binary) │
│ • Database Tools • Editor Integration │
│ • Schema Discovery • Query Execution │
└─────────────────────────────────────────────────────────────────────────┘
| Component | Technology |
|---|---|
| Backend | Go 1.24+, Gin web framework, lib/pq PostgreSQL driver |
| Frontend | SvelteKit 2, Svelte 5, TypeScript, CodeMirror 6, xterm.js |
| Database | PostgreSQL (any version), SQLite (for local storage) |
| AI Integration | Claude Code CLI, Model Context Protocol (MCP) |
Make sure Claude Code CLI is installed and in your PATH:
npm install -g @anthropic-ai/claude-code
claude --version
Check that your PostgreSQL server is running and accessible. SSL is enabled by default; you can disable it in the connection settings.
PgVoyager runs on port 5137 by default. If it's in use, set the PGVOYAGER_PORT environment variable:
PGVOYAGER_PORT=5200 ./pgvoyager
This project is licensed under the MIT License - see the LICENSE file for details.