Skip to main content
Glama
dongchao-1

dbeaver-mcp-server

by dongchao-1

dbeaver-mcp-server

中文文档

MCP server that reads DBeaver database configurations and provides SQL execution via existing JDBC drivers — no extra driver downloads needed.

Features

  • Auto-discover DBeaver workspaces and projects (macOS / Linux / Windows)

  • List connections from DBeaver's data-sources.json

  • Execute read-only SQL via DBeaver's existing JDBC drivers (JayDeBeApi + JPype)

  • Auto-decrypt DBeaver's encrypted credentials

  • Multi-driver support — all JDBC drivers installed in DBeaver are loaded at once

Related MCP server: Universal Database MCP Server

Tools

Tool

Description

list_workspaces

List all discovered DBeaver workspaces and projects

list_connections

List database connections, optionally filtered by workspace

execute_sql

Execute a read-only SQL query (only SELECT / SHOW / DESCRIBE / EXPLAIN / WITH)

Requirements

  • Python >= 3.13

  • uv (Python package manager)

  • Java Runtime (for JPype/JDBC)

  • DBeaver 26.x (Community Edition)

Installation

git clone <repo-url> dbeaver-mcp-server
cd dbeaver-mcp-server
uv sync

Usage

Standalone

cd /path/to/dbeaver-mcp-server
source .venv/bin/activate
mcp dev src/server.py

With OpenCode

Add to ~/.config/opencode/opencode.json:

{
  "mcp": {
    "dbeaver": {
      "type": "local",
      "command": [
        "/path/to/dbeaver-mcp-server/.venv/bin/python",
        "-m",
        "src.server"
      ],
      "enabled": true
    }
  }
}

Environment Variables

Variable

Description

Default

DBEAVER_WORKSPACE_PATH

Override workspace path

Auto-discovered

DBEAVER_DRIVERS_XML_PATH

Override drivers.xml path

Auto-discovered

DBEAVER_ENCRYPTION_KEY

Override credential encryption key (hex)

Default

Security

  • Only read-only SQL is allowed: SELECT, SHOW, DESCRIBE, EXPLAIN, WITH

  • INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, TRUNCATE are blocked

  • Passwords are decrypted in-memory only, never written to disk

How It Works

  1. Discovers DBeaver workspace via default paths or DBEAVER_WORKSPACE_PATH

  2. Reads data-sources.json for connection configurations

  3. Reads drivers.xml and scans JDBC jars for driver class names

  4. Decrypts credentials-config.json using DBeaver's AES-128-CBC key

  5. Starts a JVM with all JDBC jars and executes queries via JayDeBeApi

Available Tools

3 tools
execute_sqlA

Execute a read-only SQL query on a specified DBeaver database connection. Only SELECT, SHOW, DESCRIBE, EXPLAIN, WITH statements are allowed. Write operations are strictly prohibited.

Args: connection_name: The name of the database connection (as shown in list_connections). sql: The read-only SQL query to execute.

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYes
connection_nameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It states the tool is read-only and lists allowed statement types. It does not mention error handling, timeouts, or result format, but the basic behavioral constraint is clear. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two paragraphs: first explains purpose and constraints, second lists arguments with brief descriptions. No unnecessary words. Front-loaded with key constraints.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Includes constraints on allowed SQL statements and connection_name source. Has output schema (not shown) so return values need not be described. Could mention that connection must exist, but given sibling list_connections, this is implied.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage, so description adds value. For connection_name, it explains it should match names from list_connections. For sql, it reiterates read-only constraint. Could add more detail about SQL formatting or quoting, but sufficient for basic understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it executes a read-only SQL query on a database connection. Lists supported statements (SELECT, SHOW, DESCRIBE, EXPLAIN, WITH) and explicitly prohibits write operations. Distinguishes from sibling tools (list_connections, list_workspaces) which are listing tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states that only read-only queries are allowed and write operations are prohibited. Mentions that connection_name should be as shown in list_connections, implying a prerequisite step. Does not explicitly state when not to use the tool, but the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_connectionsA

List all configured database connections from DBeaver. Optionally filter by workspace_path from list_workspaces.

Args: workspace_path: Optional workspace path to filter connections. If empty, returns all.

ParametersJSON Schema
NameRequiredDescriptionDefault
workspace_pathNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided; description does not disclose behavioral traits beyond basic action (listing). Does not explicitly state non-destructive nature or any side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise, front-loaded with main purpose, and structured with separated argument definition. No unnecessary text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool, description covers main functionality and filtering. Output schema handles return values. Slight gap in error handling or invalid path guidance.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage 0%; description adds meaning by stating the parameter filters connections and references list_workspaces, but lacks additional format or value constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool lists database connections from DBeaver with optional filtering by workspace_path. Distinguishes from sibling tools (execute_sql, list_workspaces) by specific verb and resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies when to use (for listing connections) and references list_workspaces as source for filtering, but lacks explicit when-not or alternative guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_workspacesA

List all discovered DBeaver workspaces with their projects and data source locations.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description implies a read operation via the verb 'List', but with no annotations, it does not explicitly state read-only behavior or disclose any other behavioral traits like pagination or side effects. Adequate but minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single, clear sentence that is front-loaded with the core action and resource. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with zero parameters and an output schema, the description provides sufficient context about what is listed. It is complete given the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters present; schema coverage is 100%. The description adds meaning by stating what the tool returns (workspaces with projects and data source locations), which is appropriate for a parameterless tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and the resource 'workspaces', specifying it includes projects and data source locations. It effectively distinguishes from siblings like list_connections and execute_sql.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use or not use this tool versus alternatives. The context of sibling tools provides some implicit differentiation, but the description lacks explicit usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A4/5.0
Disambiguation5/5

Each tool has a distinct purpose: listing workspaces, listing connections, and executing SQL queries. No overlap in functionality.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern using snake_case (list_workspaces, list_connections, execute_sql).

Tool Count5/5

Three tools are appropriate for the server's focused purpose of managing database connections and executing read-only SQL queries. Each tool serves a clear role.

Completeness3/5

The tool set covers workspace discovery, connection listing, and SQL execution, but lacks schema exploration (e.g., listing tables or describing schemas), which is a notable gap for a database tool.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for connecting to databases (PostgreSQL, MySQL, SQL Server, Redis) enabling SQL queries, table exploration, and Redis key-value operations.
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A versatile MCP server that connects to multiple relational databases (MySQL, PostgreSQL, Oracle, SQL Server, SQLite) and enables secure read-only SQL query execution and metadata access.
    4
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP server for querying and managing multiple databases (SQLite, PostgreSQL, MySQL) with read-only mode and schema inspection.
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    MCP server that connects to SQL databases (SQLite, PostgreSQL, MSSQL, MySQL) and provides tools to run read-only queries, list schemas/tables, and manage connections via stdio transport.
    Apache 2.0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dongchao-1/dbeaver-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server