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.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

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.

上游原版 README

在 GitHub 查看同一版本原文

README.md · d0c7a6c753ba · 采集于 2026-11-13 11:56:25 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

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.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

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