The DBeaver MCP Server provides AI assistants with secure, universal access to 200+ database types through existing DBeaver connections with zero configuration and enterprise-grade safety features.
Connection Management: List and inspect all DBeaver database connections, get detailed connection information, test connectivity, and auto-detect DBeaver workspace (supports legacy XML and modern JSON formats, versions 6.x through 21.x+)
Data Operations: Execute read-only SELECT queries with configurable row limits (default: 1000), perform validated INSERT/UPDATE/DELETE operations, and export up to 10,000 rows to CSV, JSON, XML, or Excel formats
Schema Management: List tables and views with optional schema filtering, get detailed table schemas (columns, data types, indexes), create and alter tables using DDL statements, and drop tables with mandatory safety confirmation
Business Intelligence: Store and retrieve persistent business insights with optional tags and connection associations, get database statistics and metadata, and track analysis findings with query execution performance monitoring
Safety & Security: Built-in query validation with automatic LIMIT protection, confirmation prompts for destructive operations, secure credential management through DBeaver, configurable timeout protection (default: 30 seconds), and comprehensive error handling
Platform Support: Cross-platform compatibility (Windows, macOS, Linux), full Model Context Protocol integration with resource browsing capabilities, and debug mode for troubleshooting
Integrates with DBeaver to provide access to 200+ database types through existing DBeaver connections, allowing database querying, schema exploration, and data export functionality without additional configuration.
Provides access to MySQL databases for schema exploration and query execution through existing DBeaver connections.
Enables running queries on PostgreSQL databases through DBeaver connections, with support for data retrieval and manipulation operations.
Click on "Install 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 MCP Serverlist all tables in my production PostgreSQL database"
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 MCP Server
MCP server that provides AI assistants access to databases through DBeaver connections.
Database Support
Natively supported (direct driver, fast):
PostgreSQL (via
pg)MySQL / MariaDB (via
mysql2)SQL Server / MSSQL (via
mssql)SQLite (via
sqlite3CLI)
Postgres-compatible (routed through pg driver automatically):
CockroachDB, TimescaleDB, Amazon Redshift, YugabyteDB, AlloyDB, Supabase, Neon, Citus
Other databases: Falls back to DBeaver CLI. Requires DBeaver to be installed and the connection configured in your DBeaver workspace. Results vary by DBeaver version.
Related MCP server: MySQL MCP Server
Features
Uses existing DBeaver connections (no separate config needed)
Native query execution for PostgreSQL, MySQL/MariaDB, SQLite, SQL Server
Connection pooling with configurable pool size and timeouts
Transaction support (BEGIN/COMMIT/ROLLBACK)
Query execution plan analysis (EXPLAIN)
Schema comparison between connections with migration script generation
Read-only mode with enforced SELECT-only on
execute_queryConnection whitelist to restrict which databases are accessible
Tool filtering to disable specific operations
Query validation to block dangerous operations (DROP DATABASE, TRUNCATE, DELETE/UPDATE without WHERE)
Data export to CSV/JSON
Graceful shutdown with connection pool cleanup
Requirements
Node.js 18+
DBeaver with at least one configured connection
Installation
Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
Claude Code
Add to ~/.claude/settings.json:
Cursor
Add to Cursor Settings > MCP Servers:
Environment Variables
Variable | Description | Default |
| Path to DBeaver executable | Auto-detected |
| Path to DBeaver workspace | OS default |
| Query timeout (ms) |
|
| Enable debug logging |
|
| Disable all write operations |
|
| Comma-separated whitelist of connection IDs or names | All |
| Comma-separated tools to disable | None |
| Minimum connections per pool |
|
| Maximum connections per pool |
|
| Idle connection timeout (ms) |
|
| Connection acquire timeout (ms) |
|
Read-Only Mode
Blocks all write operations. The execute_query tool only allows SELECT, EXPLAIN, SHOW, and DESCRIBE statements. Transaction tools are disabled entirely.
Connection Whitelist
Restrict which DBeaver connections are visible. Accepts connection IDs or display names, comma-separated:
Disable Specific Tools
Available Tools
Connection Management
list_connections- List all DBeaver connectionsget_connection_info- Get connection detailstest_connection- Test connectivity
Data Operations
execute_query- Run read-only queries (SELECT, EXPLAIN, SHOW, DESCRIBE only)write_query- Run INSERT/UPDATE/DELETEexport_data- Export to CSV/JSON
Schema Management
list_tables- List tables and viewsget_table_schema- Get table structurecreate_table- Create tablesalter_table- Modify tablesdrop_table- Drop tables (requires confirmation)
Transactions
begin_transaction- Start a new transactionexecute_in_transaction- Execute query within a transactioncommit_transaction- Commit a transactionrollback_transaction- Roll back a transaction
Query Analysis
explain_query- Analyze query execution plancompare_schemas- Compare schemas between two connectionsget_pool_stats- Get connection pool statistics
Other
get_database_stats- Database statisticsappend_insight- Store analysis noteslist_insights- Retrieve stored notes
Security
Read-only enforcement:
execute_queryonly accepts read-only statements (SELECT, EXPLAIN, SHOW, DESCRIBE, PRAGMA). Write operations must usewrite_query.Query validation: Blocks DROP DATABASE, DROP SCHEMA, TRUNCATE, DELETE/UPDATE without WHERE, GRANT, REVOKE, and user management statements.
Connection whitelist: Restrict which connections are exposed via
DBEAVER_ALLOWED_CONNECTIONS.Tool filtering: Disable any tool via
DBEAVER_DISABLED_TOOLS.Input sanitization: Connection IDs and SQL identifiers are sanitized to prevent injection.
Recommendation: For production use, also use a database-level read-only user for defense in depth.
DBeaver Version Support
Supports both configuration formats:
DBeaver 6.x: XML config in
.metadata/.plugins/org.jkiss.dbeaver.core/DBeaver 21.x+: JSON config in
General/.dbeaver/
Credentials are automatically decrypted from DBeaver's credentials-config.json.
Development
License
MIT