Basic information
About db-view-mcp Server
MCP server that gives AI assistants direct access to PostgreSQL and ClickHouse databases. Supports stdio and HTTP transports.
db-view-mcp is a MCP server in the Databases category listed in the AddMCP.net directory, published by conte777. Supported transport: stdio. License: MIT. Source code is hosted on github.com. Related topics: clickhouse, database, postgresql, query, sql.
Setup
{
"mcpServers": {
"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"
]
}
}
}
{
"servers": {
"database": {
"command": "npx",
"args": [
"-y",
"@conte777/db-view-mcp",
"--config",
"/path/to/config.json"
]
}
}
}
db-view-mcp config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"database": {
"command": "npx",
"args": [
"-y",
"@conte777/db-view-mcp",
"--config",
"/path/to/config.json"
]
}
}
}
db-view-mcp tools
Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is db-view-mcp?
db-view-mcp is an MCP server that gives AI assistants direct access to PostgreSQL and ClickHouse databases. It supports stdio and HTTP transports, allowing both local IDE integration and remote network access.
How to use db-view-mcp?
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.
Key features of db-view-mcp
- 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
Use cases of db-view-mcp
- Let AI coding assistants query a project's database directly from an IDE like Cursor or Claude Code
- Enable remote database exploration and management via a web application using HTTP transport
- Run schema introspection and performance analysis (EXPLAIN ANALYZE, slow query tracking) through AI chat
- Perform batch data inserts, updates, or DDL operations via an AI agent in a controlled session
Frequently asked questions
1 What databases does db-view-mcp support?
It supports PostgreSQL and ClickHouse. You can connect to any number of instances of either type simultaneously in one server.
2 How do I switch between stdio and HTTP transport?
Set "transport.type" to "http" in config.json, or use the CLI flag --transport http. The default is stdio.
3 Can I prevent accidental writes to the database?
Yes. Read-only tools (query, list_tables, etc.) validate SQL to block write keywords. Write operations require the explicit execute or transaction tool.
4 Does db-view-mcp support transactions?
Yes, for PostgreSQL. The transaction tool allows begin, commit, and rollback. ClickHouse does not support transactions — using the transaction tool on ClickHouse throws an error.
5 How does authentication work for HTTP transport?
Optional bearer token authentication can be enabled by setting transport.auth.type to "bearer" with a token value. Requests to /mcp must include an Authorization: Bearer <token> header. The /health endpoint is not protected.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In