Skip to content

Model Context Protocol Server

dbeaver-devops edited this page Dec 2, 2026 · 15 revisions

Note: This feature is available in Enterprise, AWS, and GCP editions only.

Table of contents

CloudBeaver can run as a Model Context Protocol (MCP) server. This allows external AI clients to execute database operations through CloudBeaver.

You can find more information about Model Context Protocol (MCP) here.

Enable MCP server

Note: Only an administrator can enable the MCP server and enable MCP for a connection.

To activate the MCP server:

  1. Navigate to Settings -> Administration -> Server Configuration

  2. Enable the AI Integration and AI MCP Server options

  3. Open the context menu for the connection where you want to use MCP and select Edit Connection.

  4. Open the AI tab, select the Enable MCP checkbox, and click Save.

    After you click Save, the MCP configuration section appears. It includes:

    • the generated MCP Endpoint for the selected connection

    • ready-to-copy mcp.json examples for supported MCP clients

      Example:

      {
        "mcpServers": {
          "dbeaver": {
            "type": "http",
            "url": "https://server-example.com/api/mcp/projects/General/datasources/postgres-jdbc-19b9378f1f8-60bb24cfcd2979a7",
            "headers": {
              "X-API-Key": "${token}"
            }
          }
        }
      }

      Important: The MCP endpoint is connection-specific. Each connection has its own endpoint and must be configured separately in the client.

    • the Use OAuth authentication instead of API key option

      By default, snippets use API token authentication. To use OAuth, select Use OAuth authentication instead of API key. The generated snippets are updated automatically.

      Note: OAuth support depends on the MCP client. If your client doesn’t support OAuth for MCP servers, use API token authentication instead.

  5. If you use API token authentication, generate an API access token and replace ${token} with the generated token.

Supported tools

Tool What it does
getDatasourceInfo Returns DB type, version, and connection details.
listCatalogNames Lists all catalogs/databases.
listSchemaNames Lists schemas in a catalog.
listTableNames Lists tables in a schema/catalog.
getTableDetails Returns DDL for one or more tables (columns, constraints, indexes, comments).
executeSQL Runs a SQL query and returns results as CSV (default 10 rows).

Configure an MCP client

After you enable MCP for a connection, use the generated configuration snippet to register the server in your MCP client.

The snippet depends on the selected authentication method:

  • with API token authentication, the snippet includes the endpoint and token header
  • with OAuth authentication, the client handles authentication through the OAuth flow

Client configuration is performed entirely on the client side. Refer to your client’s documentation for instructions on adding an MCP server.

Client Reference
Cursor Cursor documentation
VS Code VS Code documentation
Claude code Claude code documentation
Claude Desktop Claude Desktop documentation
ZED ZED documentation

Tip: For other MCP clients, use the generated endpoint URL and adapt the configuration according to the client’s documentation.

Authenticate a connection without saved credentials

You can use MCP with connections that don't have saved database credentials. This workflow applies to both OAuth and API token authentication.

Important: Use the latest available version of your MCP client. The client must support URL elicitation to complete database authentication. Older versions may not display the authentication link or complete the flow.

  1. Send a request for the connection from your MCP client.
  2. When database authentication is needed, open the authentication link provided by the MCP client.
  3. Sign in to CloudBeaver if prompted, then enter the database credentials to authenticate the connection.
  4. Return to your MCP client and retry the request.

CloudBeaver Documentation

Clone this wiki locally