db-view-mcp
About
MCP server that gives AI assistants direct access to PostgreSQL and ClickHouse databases. Supports stdio and HTTP transports.
Details
- Author
- conte777
- Downloads
- 296
- Categories
- Database
Jump to
- Supports both PostgreSQL and ClickHouse connections simultaneously
- Offers read-only tools (SELECT, schema, EXPLAIN) and write tools (INSERT/UPDATE/DELETE, DDL, transactions)
- Provides two transport modes: stdio for local IDE use and HTTP for remote/multi-client access
- Includes SQL safety with read-only tools that block accidental writes
- Supports optional bearer token authentication for HTTP transport
- Allows lazy connections (connect on first use) to avoid unneeded startup overhead
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
db-view-mcpCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install with npm install @conte777/db-view-mcp, configure a config.json listing databases and optional transport settings, then run via npm start -- --config config.json. Add the server to your MCP client (e.g., Claude Desktop or Claude Code) using the npx command with the config path.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"db-view-mcp": {
"database": {
"command": "npx",
"args": [
"-y",
"@conte777/db-view-mcp",
"--config",
"/path/to/config.json"
]
}
}
}
}
McpServers
{
"database": {
"command": "npx",
"args": [
"-y",
"@conte777/db-view-mcp",
"--config",
"/path/to/config.json"
]
}
}
db-view-mcp
MCP server that gives AI assistants direct access to PostgreSQL and ClickHouse databases. Supports stdio and HTTP transports, allowing both local IDE integration and remote network access.
Features
- Multi-database — connect to any number of PostgreSQL and ClickHouse instances simultaneously
- Dual transport — stdio for IDE integration (Cursor, Claude Code), HTTP for remote/multi-client access
- Read & write tools — SELECT queries with row limits, INSERT/UPDATE/DELETE, DDL, transactions
- Schema introspection — list tables, describe columns, export full DDL
- Query analysis — EXPLAIN ANALYZE support, slow query tracking
- SQL safety — read-only tools validate SQL to block accidental writes
- Flexible tool modes — single tool with database parameter, or separate tool per database
- Lazy connections — databases connect on first use by default
- Bearer auth — optional token-based authentication for HTTP transport
- Session management — stateful (per-session MCP server) or stateless HTTP mode
Quick start
Install
npm install @conte777/db-view-mcp
Or clone and build from source:
git clone <repo-url>
cd db-view-mcp
npm install
npm run build
Configure
Copy the example config and edit it:
cp config.example.json config.json
Minimal config (stdio, default):
{
"databases": [
{
"id": "main_pg",
"type": "postgresql",
"host": "localhost",
"port": 5432,
"database": "myapp",
"user": "admin",
"password": "secret123"
}
]
}
HTTP transport config:
{
"transport": {
"type": "http",
"port": 3000,
"host": "127.0.0.1",
"stateless": false,
"auth": {
"type": "bearer",
"token": "your-secret-token"
}
},
"databases": [
{
"id": "main_pg",
"type": "postgresql",
"host": "localhost",
"port": 5432,
"database": "myapp",
"user": "admin",
"password": "secret123"
}
]
}
Run
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



