yugui923 avatar

DB Connect MCP

yugui923/db-connect-mcp

Connects Claude to PostgreSQL, MySQL, and ClickHouse databases with read-only access enforced at multiple levels. Exposes tools for listing schemas and tables, describing columns and indexes, profiling data with statistical analysis, and running SELECT queries with automatic result limits. Includes SSH tunnel support for reaching databases behind firewalls. The server automatically detects database types from connection strings, handles JDBC URL conversion, and strips unsafe parameters while preserving performance tuning options. Reach for this when you want Claude to explore table structures, generate distribution statistics, or help write queries against production databases without risking writes.

GitHub stars
4
tools
10
auth
Secret needed
transport
STDIO
env var
1
last updated
Feb 2, 2026

Tools

10 tools

Public tool metadata for what this MCP can expose to an agent.

get_database_infoGet database metadata, including the dialect, version, connection details, read-only status, and capabilities.

Get database metadata, including the dialect, version, connection details, read-only status, and capabilities.

No parameter schema in public metadata yet.

list_schemasList all schemas in the database.

List all schemas in the database.

No parameter schema in public metadata yet.

list_tablesList all tables in a schema with metadata.

List all tables in a schema with metadata.

No parameter schema in public metadata yet.

describe_tableGet detailed information about a table.

Get detailed information about a table.

No parameter schema in public metadata yet.

analyze_columnAnalyze a column with statistics and distribution.

Analyze a column with statistics and distribution.

No parameter schema in public metadata yet.

sample_dataGet a sample of data from a table.

Get a sample of data from a table.

No parameter schema in public metadata yet.

execute_queryExecute a read-only SQL query.

Execute a read-only SQL query.

No parameter schema in public metadata yet.

get_table_relationshipsGet foreign key relationships for a table.

Get foreign key relationships for a table.

No parameter schema in public metadata yet.

explain_queryGet a database-specific query execution plan.

Get a database-specific query execution plan.

No parameter schema in public metadata yet.

search_objectsSearch schemas, tables, views, columns, and indexes with progressive detail.

Search schemas, tables, views, columns, and indexes with progressive detail.

No parameter schema in public metadata yet.

Sponsors

Configuration

DATABASE_URL*secret

Database connection URL (e.g., postgresql+asyncpg://user:pass@host:5432/db)

Readme

db-connect-mcp - Multi-Database MCP Server

CI CodeQL codecov OpenSSF Scorecard License: MIT

A read-only MCP (Model Context Protocol) server for exploratory data analysis across multiple database systems. This server provides safe, read-only access to PostgreSQL, MySQL, and ClickHouse databases with comprehensive analysis capabilities.

Demo

db-connect-mcp demo

Quick Start

  1. Install:

View the full README on GitHub

Details

Repository
github.com/yugui923/db-connect-mcp
Category
Databases
Package
db-connect-mcp
Transport
STDIO
Auth
Required
Registry
MCP registry, active

Related Databases MCP servers

View all
1mimersql avatarMimer Mcpmimersql/mimer-mcpAn MCP server with Mimer SQL Database Connectivity3stars
2pilat avatarDataLinkpilat/mcp-datalinkMCP server for secure database access (PostgreSQL, MySQL, SQLite)3stars
3atarkowska avatarFastmcp Sqltoolsatarkowska/fastmcp-sqltoolsA MCP server provides SQL database access with support for PostgreSQL, MySQL, and SQLite.1stars
4stucchi avatarDB MCP Serverstucchi/db-mcp-serverDatabase MCP server for MySQL, PostgreSQL, MongoDB, and SQLite with SSH tunneling support.0stars
5amansingh63 avatarDBHub Analyticsamansingh63/dbhub-analyticsMCP server for Databricks, BigQuery, PostgreSQL, MySQL, SQL Server, SQLite, MariaDB0stars
6thinair avatarDataco.thinair/dataPostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.0stars