DBeast PostgreSQL MCP logo

DBeast PostgreSQL MCP

PostgreSQL MCP server for schema discovery, read-only queries, DBA analysis, security reviews, and performance checks.

Install DBeast PostgreSQL MCP

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for DBeast PostgreSQL MCP, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

DBeast PostgreSQL MCP MCP server connects AI assistants to PostgreSQL through a local stdio process and structured MCP tools. It uses asyncpg to inspect databases, execute read-only SELECT statements, analyze query and schema risks, and report health, security, maintenance, replication, and data-quality findings. Credentials can be supplied with a PostgreSQL URL, individual database variables, or supported AWS Secrets Manager settings. Reach for it when an assistant needs database investigation and review capabilities without exposing a general-purpose SQL execution endpoint.

Use cases

  • Discover schemas and generate Mermaid ERDs
  • Run bounded read-only PostgreSQL queries
  • Preview the impact of potentially destructive writes
  • Investigate slow queries and tuning opportunities
  • Audit database security, maintenance, and data quality

Key features

  • Schema and dependency analysis
  • Read-only SELECT execution with row limits
  • Query optimization and impact previews
  • Health, maintenance, and replication reports
  • Security and sensitive-data scans
  • Data quality and duplicate detection

Tools21

What DBeast PostgreSQL MCP lets your agent do. Expand a tool for its parameters.

Self-reported~421 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 2d ago

Recent health check succeeded.

9/9 checks healthy over the last 55d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars9Stargazers on the source repository.
Last commit3mo agoMost recent push to the default branch.
Tools exposed21Callable tools this server registers over MCP.

How DBeast PostgreSQL MCP works

What DBeast PostgreSQL MCP does

DBeast PostgreSQL MCP MCP server exposes focused PostgreSQL operations through the Model Context Protocol. It is intended for database inspection, read-only data access, query review, and operational analysis rather than unrestricted SQL execution. The server can connect to local PostgreSQL installations and hosted PostgreSQL services, including RDS or Aurora, Supabase, Neon, Railway, Render, and Fly.io when provided with a suitable connection method.

The tool set covers connection management, schema discovery, dependency mapping, query analysis, database health, security, maintenance, partitioning, data quality, replication, configuration, and audit-log access. Schema inspection can include tables, columns, indexes, relationships, and optional Mermaid ERDs. Sensitive-data scanning identifies likely PII or secrets from column names and schema patterns; it does not claim to classify data with certainty.

How it works

The DBeast PostgreSQL MCP MCP server runs locally as a Python stdio MCP server. An MCP client starts it as a subprocess, passes connection settings through environment variables or tool arguments, and receives structured results after the server queries PostgreSQL with asyncpg. No HTTP service or separate server infrastructure is required.

execute_query accepts read-only SELECT queries and automatically applies a row limit. analyze_impact examines a write query for affected rows, risk, and rollback context without executing it. Other analysis tools query PostgreSQL metadata and statistics to produce reports about performance, privileges, vacuum state, partitions, replication, configuration, and data quality.

A practical workflow is to discover the schema first, run bounded read queries, preview potentially risky changes, and then inspect health or maintenance indicators. Audit tools can retrieve logged MCP calls for a date and list available audit files.

Setup and configuration

Install the repository in editable mode with pip install -e ., then start it with dbeast or python src/server.py. Configure the MCP client with a stdio entry whose command points to the server or its source entry point. Cursor, Windsurf, VS Code, and Claude Desktop configuration examples are provided by the project.

Use DATABASE_URL for a complete PostgreSQL connection string, or provide DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_NAME, and optionally DB_SSLMODE. Runtime connection arguments can also supply a URL or individual connection fields. AWS Secrets Manager connections use a secret name and AWS region. The documented tuning variables include DBEAST_DEFAULT_ROW_LIMIT, DBEAST_QUERY_TIMEOUT, DBEAST_COMMAND_TIMEOUT, DBEAST_SSL_VERIFY, and DBEAST_SCHEMA_CACHE_TTL.

Tools and capabilities

  • Connect, disconnect, check connectivity, inspect the connection pool, and discover local databases.
  • List database structure and dependencies, including optional Mermaid relationship diagrams.
  • Execute bounded read-only queries and inspect query structure, warnings, indexes, and rewrite suggestions.
  • Review cache rates, connections, transaction age, slow queries, vacuum state, dead tuples, and index health.
  • Inspect roles, privileges, superusers, public-schema exposure, likely sensitive columns, and PostgreSQL configuration.
  • Analyze partitions, replication lag, WAL sender and receiver state, replication slots, null rates, cardinality, distributions, outliers, and duplicate rows.

Limitations and notes

The server is designed around PostgreSQL 12 or later and uses a local stdio deployment model. execute_query is limited to read-only SELECT statements, while analyze_impact previews write-query effects without performing the write. Analysis results depend on the metadata, statistics, permissions, and extensions available to the connected PostgreSQL account. The project is licensed under MIT.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about DBeast PostgreSQL MCP

DBeast PostgreSQL MCP is an MCP server that connects AI assistants to PostgreSQL databases through a local stdio process. Its main tools cover schema discovery, read-only SELECT execution, query analysis, impact previews, health checks, security audits, maintenance, replication, and data-quality reporting.

Install it by cloning the repository, entering its directory, and running `pip install -e .`. Start it with `dbeast` or `python src/server.py`, then add a stdio MCP entry to the client configuration with the server path and database environment variables.

Yes, DBeast PostgreSQL MCP works with Cursor through a stdio MCP configuration. Add the server command or Python entry point to `.mcp.json` in the project or global Cursor configuration, and pass `DATABASE_URL` or individual database settings in the environment.

It does not execute write queries through `execute_query`; that tool accepts read-only SELECT statements and applies a row limit. Use `analyze_impact` to preview a write query’s affected rows, risk level, and rollback context without executing it.

DBeast accepts a complete `DATABASE_URL` or individual settings such as `DB_HOST`, `DB_PORT`, `DB_USER`, `DB_PASSWORD`, `DB_NAME`, and `DB_SSLMODE`. Runtime connection arguments and AWS Secrets Manager settings are also supported.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDBeast PostgreSQL MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/dbeast-postgresql-mcp?style=directory)](https://allmcps.com/mcp/dbeast-postgresql-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/dbeast-postgresql-mcp"><img src="https://allmcps.com/api/badge/dbeast-postgresql-mcp?style=directory" alt="DBeast PostgreSQL MCP on AllMCPs" /></a>