MCP server for PostgreSQL and ClickHouse access

MCP server for PostgreSQL and ClickHouse access

db-view-mcp•byconte777

An MCP server that gives AI assistants direct access to PostgreSQL and ClickHouse databases over stdio or HTTP transports.

License: MIT•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Connects to any number of PostgreSQL and ClickHouse instances at once.
  • •Provides read and write tools including SELECT with row limits, INSERT/UPDATE/DELETE, DDL, and transactions.
  • •Offers schema introspection to list tables, describe columns, and export full DDL.
  • •Includes query analysis with EXPLAIN / EXPLAIN ANALYZE and slow-query tracking.

BEST FOR

  • •Giving AI coding assistants in an IDE direct access to local PostgreSQL or ClickHouse databases.
  • •Remote or multi-client database access over HTTP with optional bearer token authentication.

ABOUT DB-VIEW-MCP

MCP server for PostgreSQL and ClickHouse access is cataloged as an MCP server attributed to conte777. An MCP server that gives AI assistants direct access to PostgreSQL and ClickHouse databases over stdio or HTTP transports. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP server for PostgreSQL and ClickHouse access are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does it support more than one database connection at a time?

Yes. It can connect any number of PostgreSQL and ClickHouse instances at once.

Are ClickHouse transactions supported?

No. Transactions are not supported on ClickHouse; a transaction begin throws.

Upstream README

View this exact version on GitHub

README.md · d0c7a6c753ba · Fetched 2026-11-13 11:56:25 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

db-view-mcp

npm CI

An MCP server that gives AI assistants direct access to PostgreSQL and ClickHouse databases. It supports both stdio and HTTP transports, for local IDE integration and remote network access.

Features

  • Multi-database — connect any number of PostgreSQL and ClickHouse instances at once
  • Dual transport — stdio for IDE integration (Cursor, Claude Code), HTTP for remote/multi-client access
  • Read & write tools — SELECT with row limits, INSERT/UPDATE/DELETE, DDL, transactions
  • Schema introspection — list tables, describe columns, export full DDL
  • Query analysis — EXPLAIN / EXPLAIN ANALYZE, slow-query tracking
  • SQL safety — read-only tools validate SQL and block accidental writes
  • Flexible tool modes — one tool with a database parameter, or a separate tool per database
  • Lazy connections — databases connect on first use by default
  • Bearer auth — optional token authentication for the HTTP transport
  • Session management — stateful (per-session MCP server) or stateless HTTP mode

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

Quick start

1. Configure

Copy the example config and edit it:

cp config.example.json config.json

Minimal stdio config:

{
  "databases": [
    {
      "id": "main_pg",
      "type": "postgresql",
      "host": "localhost",
      "port": 5432,
      "database": "myapp",
      "user": "admin",
      "password": "secret123"
    }
  ]
}

Every field, default, and the full config reference (SSL/TLS, per-database overrides, environment substitution, HTTP transport) is in docs/configuration.md.

2. Run

# Stdio (default)
npm start -- --config config.json

# HTTP (set transport.type to "http" in config, or override on the CLI)
npm start -- --config config.json --transport http

# Development (no build needed)
npm run dev -- --config config.json

3. Add an MCP client

Claude Desktop (claude_desktop_config.json) or Claude Code (.mcp.json), stdio:

{
  "mcpServers": {
    "database": {
      "command": "npx",
      "args": ["-y", "@conte777/db-view-mcp", "--config", "/path/to/config.json"]
    }
  }
}

Any MCP client, HTTP:

node dist/index.js --config config.json --transport http
# Server listens on http://127.0.0.1:3000/mcp

See docs/http-transport.md for sessions, auth, and curl examples.

Documentation

DocContents
docs/configuration.mdEvery config field, defaults, SSL/TLS, rowFormat, env substitution, hot reload
docs/tools.mdThe 9 tools: params, output, examples, error codes, per-database mode
docs/http-transport.mdstdio vs HTTP, sessions, bearer auth, /health, curl
docs/security.mdRead-only SQL validator, deny-lists, response caps, network exposure
docs/architecture.mdSource tree, layers, connector model, lifecycle (hot reload, shutdown)
CONTRIBUTING.mdBuild, test, lint, hooks, CI

ClickHouse limitations

  • Transactions are not supported (transaction begin throws).
  • Query params are ignored — use ClickHouse's native {name:Type} syntax in the SQL.

Development

See CONTRIBUTING.md for build/test/lint commands, coverage thresholds, git hooks, and CI.

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP server for PostgreSQL and ClickHouse access from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/db-view-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage