# SQL Managed MCP Server

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [agentic-data-plane-full.txt](https://docs.redpanda.com/agentic-data-plane-full.txt)

---
title: SQL Managed MCP Server
page-beta-text: This is a beta feature. Beta features are available for testing and feedback. They are not supported by Redpanda and should not be used in production environments.
latest-operator-version: v26.1.5
latest-console-tag: v3.7.4
latest-connect-version: 4.96.1
latest-redpanda-tag: v26.1.10
docname: managed/sql
page-component-name: agentic-data-plane
page-version: master
page-component-version: master
page-component-title: Agentic Data Plane
page-relative-src-path: managed/sql.adoc
page-edit-url: https://github.com/redpanda-data/adp-docs/edit/main/modules/connect/pages/managed/sql.adoc
# Beta release status
page-beta: "true"
description: Query and write to SQL databases (PostgreSQL, MySQL, ClickHouse, SQL Server, and SQLite) through a managed MCP server hosted by Redpanda.
page-topic-type: how-to
personas: agent_builder, platform_engineer
learning-objective-1: Configure the SQL managed MCP server for your database
learning-objective-2: Run a canonical SELECT query through the Inspector
learning-objective-3: Pick the right driver and connection-string pattern for your database
page-git-created-date: "2026-05-28"
page-git-modified-date: "2026-06-09"
release-status: beta - This is a beta feature. Beta features are available for testing and feedback. They are not supported by Redpanda and should not be used in production environments.
---

<!-- Source: https://docs.redpanda.com/agentic-data-plane/connect/managed/sql.md -->

The **SQL** managed MCP server gives agents read and write access to a SQL database through MCP. Redpanda runs the server in-process; you provide a connection string. Guardrails can restrict it to read-only.

After reading this page, you will be able to:

-   Configure the SQL managed MCP server for your database

-   Run a canonical SELECT query through the Inspector

-   Pick the right driver and connection-string pattern for your database


## [](#what-this-mcp-server-does)What this MCP server does

Redpanda’s SQL managed type proxies SQL statements to one of these database engines:

-   PostgreSQL (`postgres` or `pgx`)

-   MySQL / MariaDB

-   ClickHouse

-   Microsoft SQL Server (`mssql`)

-   SQLite (`sqlite3`)


It exposes the following tools:

-   `query`: Run a read-only `SELECT` and return rows. Accepts positional parameters and an optional max-rows cap.

-   `execute`: Run a write statement (`INSERT`, `UPDATE`, `DELETE`, or DDL) and return the affected row count.


Guardrails on the server config can restrict it: set `readonly` to disable `execute`, cap returned rows, restrict allowed schemas, block statement patterns, and set a per-query timeout.

## [](#prerequisites)Prerequisites

-   A SQL database reachable from the Agentic Data Plane.

-   A connection string (DSN) for the database, including the credentials. The DSN is stored as a sensitive value.


## [](#configure)Configure

1.  Open **MCP Servers > Create Server**.

2.  Pick **SQL** from the marketplace picker.

3.  Fill in the identity fields (`name`, `description`).

4.  In the SQL configuration form, provide:

    -   `Driver`: One of `postgres`, `pgx`, `mysql`, `clickhouse`, `mssql`, or `sqlite3`.

    -   `DSN`: The driver-specific connection string, including credentials. Stored as a sensitive value.

    -   `Connection pool` (optional): Maximum open and idle connections, and connection lifetimes.

    -   `Guardrails` (optional): `readonly` (disables `execute`), default and maximum row caps, a per-query timeout, allowed schemas, and blocked statement patterns.


5.  Click **Create**.


## [](#test)Test

After create, exercise the server through the Inspector tab. See [Test an MCP Server’s Tools with the Inspector](https://docs.redpanda.com/agentic-data-plane/connect/test-tools/).

A canonical first call:

1.  Open the **Inspector** tab.

2.  In **Tools**, select the `query` tool.

3.  Run `SELECT 1` (or your driver’s equivalent). Confirm a single-row response.

4.  To list tables, run `query` against the catalog, for example `SELECT table_name FROM information_schema.tables` on PostgreSQL or MySQL.


## [](#authentication)Authentication

The SQL managed type has no MCP-level authentication modes. Credentials are carried inside the `DSN` (connection string), which is stored as a sensitive value. Supply them the way your driver expects, for example `postgres://user:password@host:5432/dbname`.

User-delegated OAuth and service-account OAuth are not supported for SQL: there’s no per-user identity model that maps to a database connection.

## [](#use-with-agents)Use with agents

Once the SQL server is created, point an agent at the **API URL** on the server’s detail page. The agent sees the SQL tools alongside any other MCP servers it has access to.

## [](#troubleshooting)Troubleshooting

| Symptom | What to check |
| --- | --- |
| connection refused from create | Database isn’t reachable from ADP. Confirm host, port, and any egress / firewall rules. |
| authentication failed for user | Password reference points at the wrong secret, or the secret content is wrong. Re-create the secret with UPPER_SNAKE_CASE and verify it. |
| Query timeout | Long-running queries exceed the configured timeout. Either tighten the query or raise the timeout on the server config. |
| Tools list returns empty | The driver couldn’t introspect the schema. Verify the user has read access to information_schema (Postgres/MySQL) or the equivalent. |

## [](#limitations)Limitations

-   **Write access**: The `execute` tool runs writes and DDL unless `readonly` is set in the guardrails. Scope the database user’s permissions accordingly.

-   **Per-user database identities**: See [Authentication](#authentication).