Viewstor
PostgreSQL + Redis + ClickHouse in one extension. Why Viewstor?Database extensions for VS Code are either locked to one database, or freemium with crippled free tiers (limited connections, no export, closed source). Switching between DBeaver and VS Code breaks flow. DataGrip costs money. Viewstor is a free, open-source extension that covers PostgreSQL, Redis, and ClickHouse in a single tool — with features you won't find elsewhere:
Get StartedInstall from the VS Code Marketplace:
Or search Viewstor in the Extensions panel ( Migrating from another tool?
Passwords are excluded for security — you'll enter them on first connect. See the Wiki for detailed migration guides. FeaturesSafe ModeProduction databases deserve guardrails. Safe mode runs
Set globally in settings or per connection. Auto-adds Read-only ModeMark a connection or an entire folder as read-only. Child connections inherit the setting. Mutations are blocked in the query editor, result grid, and MCP commands. Connections
Schema Browser
Query Editor
Result Grid
Export & Copy
Copilot Chat (
|
| Command | What it does |
|---|---|
viewstor.mcp.listConnections |
List connections with status |
viewstor.mcp.getSchema |
Flattened schema (tables, columns, types) |
viewstor.mcp.executeQuery |
Run SQL (read-only enforced) |
viewstor.mcp.getTableData |
Fetch rows with limit |
viewstor.mcp.getTableInfo |
Column metadata, PKs, nullability |
Standalone MCP server (for Claude Code, Cline — CLI agents running outside VS Code):
{
"mcpServers": {
"viewstor": {
"command": "node",
"args": ["/path/to/viewstor/dist/mcp-server.js"]
}
}
}
7 tools: list_connections, get_schema, execute_query, get_table_data, get_table_info, add_connection, reload_connections. Reads connections from ~/.viewstor/connections.json and .vscode/viewstor.json. Connections sync bidirectionally with the VS Code extension. See the MCP Server wiki page for setup instructions.
All MCP interfaces auto-connect and respect read-only mode.
Other
- Query history with execution time and row count
- DDL viewer for tables, views, indexes, triggers, sequences
- JSON/JSONB cell editor (double-click to open)
- PostgreSQL arrays displayed with
{curly braces} - Redis — inspect strings, lists, sets, sorted sets, hashes
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+Enter / Cmd+Enter |
Run query (or selected text) |
Ctrl+F / Cmd+F |
Search in result grid |
Enter (in search) |
Next match |
Ctrl+C / Cmd+C |
Copy selected cells |
Esc |
Close popups |
All shortcuts use physical key codes — work on any keyboard layout.
Supported Databases
| Database | Protocol | Library |
|---|---|---|
| PostgreSQL | TCP | pg |
| Redis | TCP | ioredis |
| ClickHouse | HTTP | @clickhouse/client |
Development
Prerequisites
- Node.js 18+
- VS Code 1.93+
- Docker (for e2e tests)
Commands
npm run dev # development build
npm run watch # rebuild on changes
npm run build # production build
npm run lint # ESLint check
npm run lint:fix # auto-fix
npm test # unit tests (vitest)
npm run test:e2e # e2e tests (Docker required)
npm run package # .vsix package
Testing
Unit tests use vitest. E2E tests use testcontainers to spin up PostgreSQL, Redis, and ClickHouse in Docker. Auto-skipped if Docker is unavailable.
CI/CD
- CI (on PR, trunk push, tags): lint → unit tests → build →
npm audit - Release (on
v*tag): build → test → publish to Marketplace → GitHub Release with.vsix
Contributing
See CONTRIBUTING.md.
Changelog
See CHANGELOG.md for a full list of changes per version.