dbeaver-readonly-mcp
Supports connecting to Amazon RDS PostgreSQL instances, including AWS RDS CA certificate bundle download and TLS server name handling for custom DNS or CNAME endpoints.
Provides read-only access to database connections configured in DBeaver by reading DBeaver's stored connection configuration and exposing only allowlisted connections.
Enables read-only SQL querying and schema inspection of PostgreSQL databases, including listing connections, listing tables with SELECT privileges, describing tables, and running single read-only statements with timeouts and row limits.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dbeaver-readonly-mcpwhat tables are in MY-STAGING-POSTGRES?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dbeaver-readonly-mcp
An MCP server that gives an MCP client (Claude Code, Claude Desktop and the like) read-only access to the databases you already have configured in DBeaver, without copying credentials anywhere else.
How it works
Reads host, port, user and password from DBeaver's configuration at startup.
Only exposes the connections listed in
allowlist.json, by their DBeaver name.Every query runs with
default_transaction_read_only=on, insideBEGIN READ ONLYand ending inROLLBACK, with a 15s timeout and a row limit.Accepts a single statement per call (extended protocol), so
COMMIT; DROP ...is rejected.Uses your own database user: it sees exactly what you see in DBeaver.
Tools: list_connections, query, list_tables (with owner and whether you have SELECT) and describe_table.
PostgreSQL only for now. Other databases need a new driver.
Related MCP server: Postgres MCP Server
Requirements
Node 20+.
DBeaver with the password saved on the connection ("Save password"). Passwords kept in Secure Storage (the OS keychain) are not read.
DBeaver's configuration is looked up in:
OS | Folder |
macOS |
|
Linux |
|
Windows |
|
For another workspace or project, set DBEAVER_CONFIG_DIR. To keep the allowlist elsewhere, set DBEAVER_MCP_ALLOWLIST.
Installation
git clone https://github.com/HenriqueRicardoFigueira/dbeaver-readonly-mcp.git ~/.claude/mcp/dbeaver-readonly
cd ~/.claude/mcp/dbeaver-readonly
npm install
cp allowlist.example.json allowlist.json
claude mcp add --scope user dbeaver-readonly -- "$(which node)" ~/.claude/mcp/dbeaver-readonly/index.jsIf your shell's default node is older than 20, pass the path to a Node 20+ binary to claude mcp add.
allowlist.json
{
"connections": {
"MY-LOCAL-POSTGRES": {},
"MY-STAGING-POSTGRES": { "database": "my_db", "ssl": true },
"MY-RDS-BEHIND-CUSTOM-DNS": {
"caFile": "certs/rds-global-bundle.pem",
"tlsServerName": "my-instance.abc123xyz.us-east-1.rds.amazonaws.com"
}
}
}The key is the connection name in DBeaver. Every field is optional:
database: overrides the connection's database, useful when it points topostgresand you work in another one.ssl:truefor TLS verified against the system CAs. When absent, connects without TLS.caFile: PEM file with the CA that signs the server certificate, relative to this folder. Enables TLS.tlsServerName: name to check in the certificate when the connection host is an alias (CNAME) the certificate doesn't cover. Enables TLS.
There is no option to turn certificate verification off: if it fails, point caFile to the right CA.
Amazon RDS
RDS certificates are signed by AWS's own CAs, which are not in the system trust store. npm run fetch-rds-ca downloads the official global bundle to certs/rds-global-bundle.pem.
If you connect through your own DNS name pointing to the instance, the certificate only covers the *.rds.amazonaws.com endpoint. Put that endpoint in tlsServerName. To find it:
dig +short my-db.my-company.com CNAMECaution
Be careful when allowing production databases: read-only mode prevents writes, but the returned data goes into the model's context.
License
MIT. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
- dataOAuthco.thinair
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Draxlr's remote MCP server connects AI assistants to your SQL databases and dashboards. Explore schemas, run read-only queries, manage saved queries and dashboards, and export results, all with row-level security so each user sees only their own data.
- WoWSQLOAuthcom.wowsql
Managed Postgres MCP: projects, SQL, docs search, and storage buckets via OAuth.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables secure querying of PostgreSQL databases through MCP-compatible clients. Supports read-only SQL execution, table exploration, and connection management with built-in security validation.337 npm9MIT
- FlicenseNot gradedqualityDmaintenanceEnables interaction with PostgreSQL databases through MCP, allowing users to explore database structures, inspect table schemas, and execute read-only SQL queries.-
- AlicenseNot gradedqualityDmaintenanceEnables inspecting database schemas and executing read-only SQL queries on a PostgreSQL database via MCP tools.6 npmMIT

MCP DB Gatewayofficial
AlicenseNot gradedqualityBmaintenanceProvides governed, read-only PostgreSQL access for AI agents via MCP. Enforces schema/table allowlists, query limits, and audit events.MIT