Skip to main content
Glama
DBeaver MCP Server

DBeaver MCP Server

by srthkdev

OmniSQL MCP

Universeller Datenbank-MCP-Server — geben Sie KI-Assistenten Lese-/Schreibzugriff auf Ihre Datenbanken unter Verwendung von Verbindungen, die bereits in Ihrem lokalen DB-Client-Arbeitsbereich (DBeaver-kompatibel) gespeichert sind.

npm version License: MIT Node.js

Datenbankunterstützung

Nativ unterstützt (direkter Treiber, schnell):

  • PostgreSQL (via pg)

  • MySQL / MariaDB (via mysql2)

  • SQL Server / MSSQL (via mssql)

  • SQLite (via sqlite3 CLI)

Postgres-kompatibel (wird automatisch über den pg-Treiber geleitet):

  • CockroachDB, TimescaleDB, Amazon Redshift, YugabyteDB, AlloyDB, Supabase, Neon, Citus

Andere Datenbanken: Fallback auf ein externes CLI, das über OMNISQL_CLI_PATH konfiguriert wurde. Die Ergebnisse variieren je nach CLI.

Related MCP server: Alibaba Cloud DMS MCP Server

Funktionen

  • Wiederverwendung von Verbindungen, die bereits in Ihrem lokalen DB-Client-Arbeitsbereich konfiguriert sind — keine doppelte Einrichtung

  • Native Abfrageausführung für PostgreSQL, MySQL/MariaDB, SQLite, SQL Server

  • Verbindungspooling mit konfigurierbarer Poolgröße und Timeouts

  • Transaktionsunterstützung (BEGIN/COMMIT/ROLLBACK)

  • Analyse von Abfrageausführungsplänen (EXPLAIN)

  • Schemavergleich zwischen Verbindungen mit Generierung von Migrationsskripten

  • Schreibgeschützter Modus mit erzwungenem SELECT-only bei execute_query

  • Verbindungs-Whitelist zur Einschränkung der zugänglichen Datenbanken

  • Tool-Filterung zur Deaktivierung spezifischer Operationen

  • Abfragevalidierung zur Blockierung gefährlicher Operationen (DROP DATABASE, TRUNCATE, DELETE/UPDATE ohne WHERE)

  • Datenexport nach CSV/JSON

  • Sauberes Herunterfahren mit Bereinigung des Verbindungspools

Anforderungen

  • Node.js 18+

  • Ein lokaler DB-Client (DBeaver-kompatibel) mit mindestens einer konfigurierten Verbindung

Installation

npm install -g omnisql-mcp

Konfiguration

Claude Desktop

Hinzufügen zu ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "omnisql": {
      "command": "omnisql-mcp"
    }
  }
}

Claude Code

Hinzufügen zu ~/.claude/settings.json:

{
  "mcpServers": {
    "omnisql": {
      "command": "omnisql-mcp"
    }
  }
}

Cursor

Hinzufügen zu Cursor Settings > MCP Servers:

{
  "mcpServers": {
    "omnisql": {
      "command": "omnisql-mcp"
    }
  }
}

Umgebungsvariablen

Variable

Beschreibung

Standard

OMNISQL_CLI_PATH

Pfad zum externen DB-Client-CLI (wird für Fallback bei nicht unterstützten Treibern verwendet)

Nicht gesetzt

OMNISQL_WORKSPACE

Pfad zum Arbeitsbereichsverzeichnis des lokalen DB-Clients

OS-Standard

OMNISQL_TIMEOUT

Abfrage-Timeout (ms)

30000

OMNISQL_DEBUG

Debug-Logging aktivieren

false

OMNISQL_READ_ONLY

Alle Schreiboperationen deaktivieren

false

OMNISQL_ALLOWED_CONNECTIONS

Kommagetrennte Whitelist von Verbindungs-IDs oder Namen

Alle

OMNISQL_DISABLED_TOOLS

Kommagetrennte Liste zu deaktivierender Tools

Keine

OMNISQL_POOL_MIN

Minimale Verbindungen pro Pool

2

OMNISQL_POOL_MAX

Maximale Verbindungen pro Pool

10

OMNISQL_POOL_IDLE_TIMEOUT

Timeout für inaktive Verbindungen (ms)

30000

OMNISQL_POOL_ACQUIRE_TIMEOUT

Timeout für den Erhalt einer Verbindung (ms)

10000

Schreibgeschützter Modus

Blockiert alle Schreiboperationen. Das execute_query-Tool erlaubt nur SELECT-, EXPLAIN-, SHOW- und DESCRIBE-Anweisungen. Transaktionstools sind vollständig deaktiviert.

{
  "mcpServers": {
    "omnisql": {
      "command": "omnisql-mcp",
      "env": {
        "OMNISQL_READ_ONLY": "true"
      }
    }
  }
}

Verbindungs-Whitelist

Schränkt ein, welche Arbeitsbereichsverbindungen sichtbar sind. Akzeptiert Verbindungs-IDs oder Anzeigenamen, kommagetrennt:

{
  "mcpServers": {
    "omnisql": {
      "command": "omnisql-mcp",
      "env": {
        "OMNISQL_ALLOWED_CONNECTIONS": "dev-postgres,staging-mysql"
      }
    }
  }
}

Spezifische Tools deaktivieren

{
  "mcpServers": {
    "omnisql": {
      "command": "omnisql-mcp",
      "env": {
        "OMNISQL_DISABLED_TOOLS": "drop_table,alter_table,write_query"
      }
    }
  }
}

Verfügbare Tools

Verbindungsverwaltung

  • list_connections - Alle Datenbankverbindungen auflisten

  • get_connection_info - Verbindungsdetails abrufen

  • test_connection - Konnektivität testen

Datenoperationen

  • execute_query - Schreibgeschützte Abfragen ausführen (nur SELECT, EXPLAIN, SHOW, DESCRIBE)

  • write_query - INSERT/UPDATE/DELETE ausführen

  • export_data - Export nach CSV/JSON

Schemamanagement

  • list_tables - Tabellen und Views auflisten

  • get_table_schema - Tabellenstruktur abrufen

  • create_table - Tabellen erstellen

  • alter_table - Tabellen ändern

  • drop_table - Tabellen löschen (erfordert Bestätigung)

Transaktionen

  • begin_transaction - Neue Transaktion starten

  • execute_in_transaction - Abfrage innerhalb einer Transaktion ausführen

  • commit_transaction - Transaktion bestätigen

  • rollback_transaction - Transaktion zurückrollen

Abfrageanalyse

  • explain_query - Abfrageausführungsplan analysieren

  • compare_schemas - Schemata zwischen zwei Verbindungen vergleichen

  • get_pool_stats - Statistiken des Verbindungspools abrufen

Sonstiges

  • get_database_stats - Datenbankstatistiken

  • append_insight - Analyse-Notizen speichern

  • list_insights - Gespeicherte Notizen abrufen

Sicherheit

  • Erzwingung des schreibgeschützten Modus: execute_query akzeptiert nur schreibgeschützte Anweisungen (SELECT, EXPLAIN, SHOW, DESCRIBE, PRAGMA). Schreiboperationen müssen write_query verwenden.

  • Abfragevalidierung: Blockiert DROP DATABASE, DROP SCHEMA, TRUNCATE, DELETE/UPDATE ohne WHERE, GRANT, REVOKE sowie Benutzerverwaltungsanweisungen.

  • Verbindungs-Whitelist: Schränkt über OMNISQL_ALLOWED_CONNECTIONS ein, welche Verbindungen freigegeben werden.

  • Tool-Filterung: Deaktivieren Sie jedes Tool über OMNISQL_DISABLED_TOOLS.

  • Eingabesanitisierung: Verbindungs-IDs und SQL-Bezeichner werden bereinigt, um Injektionen zu verhindern.

  • Empfehlung: Verwenden Sie für den Produktionseinsatz zusätzlich einen schreibgeschützten Datenbankbenutzer für eine tiefgreifende Verteidigung.

Unterstützung des Arbeitsbereichsformats

Unterstützt beide Konfigurationsformate, die von DBeaver-kompatiblen DB-Clients geschrieben werden:

  • Legacy: XML-Konfiguration in .metadata/.plugins/org.jkiss.dbeaver.core/

  • Modern: JSON-Konfiguration in General/.dbeaver/

Anmeldedaten werden automatisch aus der credentials-config.json des Arbeitsbereichs entschlüsselt.

Entwicklung

git clone https://github.com/srthkdev/omnisql-mcp.git
cd omnisql-mcp
npm install
npm run build
npm test
npm run lint

Lizenz

MIT

Available Tools

14 tools
alter_tableC

Modify existing table schema (add columns, rename tables, etc.)

Inputs: connectionId (required), query (required).

append_insightA

Add a business insight or analysis note to the memo

Inputs: insight (required), connection, tags.

create_tableC

Create new tables in the database

Inputs: connectionId (required), query (required).

drop_tableA

Remove a table from the database with safety confirmation

Inputs: confirm (required), connectionId (required), tableName (required).

execute_queryA

Execute a SQL query on a specific DBeaver connection (read-only queries)

Inputs: connectionId (required), query (required), maxRows.

export_dataC

Export query results to various formats (CSV, JSON, etc.)

Inputs: connectionId (required), query (required), format, includeHeaders, +1 more.

get_connection_infoC

Get detailed information about a specific DBeaver connection

Inputs: connectionId (required).

get_database_statsC

Get statistics and information about a database

Inputs: connectionId (required).

get_table_schemaB

Get schema information for a specific table

Inputs: connectionId (required), tableName (required), includeIndexes.

list_connectionsB

List all available DBeaver database connections

Inputs: includeDetails.

list_insightsA

List all stored business insights and analysis notes

Inputs: connection, tags.

list_tablesC

List all tables in a database

Inputs: connectionId (required), includeViews, schema.

test_connectionC

Test connectivity to a DBeaver connection

Inputs: connectionId (required).

write_queryA

Execute INSERT, UPDATE, or DELETE queries on a specific DBeaver connection

Inputs: connectionId (required), query (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 14 tools

    Disambiguation4/5

    Most tools have distinct purposes, but 'execute_query' and 'write_query' could cause confusion as both execute SQL queries, with the distinction being read-only vs. write operations. Other tools like 'create_table', 'alter_table', and 'drop_table' are clearly differentiated for table management.

    Naming Consistency5/5

    All tools follow a consistent verb_noun naming pattern (e.g., 'create_table', 'list_connections', 'execute_query'), with no mixing of conventions like camelCase or snake_case variations. This predictability makes the tool set easy to navigate and understand.

    Tool Count5/5

    With 14 tools, the count is well-scoped for a database management server, covering core operations like connection handling, query execution, table management, and data export. Each tool serves a specific function without redundancy, fitting the domain appropriately.

    Completeness4/5

    The tool set provides comprehensive coverage for database operations, including CRUD for tables, connection management, and query execution. A minor gap exists in data manipulation beyond basic queries, such as bulk operations or transaction handling, but core workflows are well-supported.

    Maintenance

    ActivityMaintained
    ResponsivenessUsually handled

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables Large Language Models to access and interact with database connections, including viewing schemas and performing CRUD operations on connected databases.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that provides AI assistants with comprehensive access to SQL databases, enabling schema inspection, query execution, and database operations with enterprise-grade security.
      55 npm
      9
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that provides real-time database schema information to AI assistants, supporting both low-code system schema queries and traditional database metadata queries.
      4
      MIT

    Appeared in Searches