MCP server that provides AI assistants access to databases through DBeaver connections.
- Uses existing DBeaver connections (no separate config needed)
- Native query execution for PostgreSQL, MySQL/MariaDB, SQLite, SQL Server
- Falls back to DBeaver CLI for other database types
- Connection pooling with configurable pool size and timeouts
- Transaction support (BEGIN/COMMIT/ROLLBACK)
- Query execution plan analysis (EXPLAIN)
- Schema comparison between connections
- Read-only mode and tool filtering
- Query validation to block dangerous operations
- Data export to CSV/JSON
- Node.js 18+
- DBeaver with at least one configured connection
npm install -g dbeaver-mcp-serverAdd to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"dbeaver": {
"command": "dbeaver-mcp-server"
}
}
}| Variable | Description | Default |
|---|---|---|
DBEAVER_PATH |
Path to DBeaver executable | Auto-detected |
DBEAVER_WORKSPACE |
Path to DBeaver workspace | OS default |
DBEAVER_TIMEOUT |
Query timeout (ms) | 30000 |
DBEAVER_DEBUG |
Enable debug logging | false |
DBEAVER_READ_ONLY |
Disable write operations | false |
DBEAVER_DISABLED_TOOLS |
Comma-separated tools to disable | None |
DBEAVER_POOL_MIN |
Minimum connections per pool | 2 |
DBEAVER_POOL_MAX |
Maximum connections per pool | 10 |
DBEAVER_POOL_IDLE_TIMEOUT |
Idle connection timeout (ms) | 30000 |
DBEAVER_POOL_ACQUIRE_TIMEOUT |
Connection acquire timeout (ms) | 10000 |
{
"mcpServers": {
"dbeaver": {
"command": "dbeaver-mcp-server",
"env": {
"DBEAVER_READ_ONLY": "true"
}
}
}
}{
"mcpServers": {
"dbeaver": {
"command": "dbeaver-mcp-server",
"env": {
"DBEAVER_DISABLED_TOOLS": "drop_table,alter_table"
}
}
}
}list_connections- List all DBeaver connectionsget_connection_info- Get connection detailstest_connection- Test connectivity
execute_query- Run SELECT querieswrite_query- Run INSERT/UPDATE/DELETEexport_data- Export to CSV/JSON
list_tables- List tables and viewsget_table_schema- Get table structurecreate_table- Create tablesalter_table- Modify tablesdrop_table- Drop tables (requires confirmation)
begin_transaction- Start a new transactionexecute_in_transaction- Execute query within a transactioncommit_transaction- Commit a transactionrollback_transaction- Roll back a transaction
explain_query- Analyze query execution plancompare_schemas- Compare schemas between two connectionsget_pool_stats- Get connection pool statistics
get_database_stats- Database statisticsappend_insight- Store analysis noteslist_insights- Retrieve stored notes
Supports both configuration formats:
- DBeaver 6.x: XML config in
.metadata/.plugins/org.jkiss.dbeaver.core/ - DBeaver 21.x+: JSON config in
General/.dbeaver/
git clone https://github.com/srthkdev/dbeaver-mcp-server.git
cd dbeaver-mcp-server
npm install
npm run build
npm test
npm run lintMIT