mcp-databend
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-databendshow tables in the analytics database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server for Databend
Connect AI agents to your Databend database safely. Session sandbox keeps production read-only while agents experiment. Works with Codex, Cursor, Claude Code, Gemini CLI, and any MCP-compatible client. Learn more at databend.com/mcp.
Usage
Get your Databend DSN. Format:
databend://user:password@host:port/database?warehouse=your_warehouseGet it from Databend Cloud or the docs.Session sandbox safety: writes only to
mcp_sandbox_{session_id}_*; production stays read-only. Useget_session_sandbox_prefixto retrieve the live prefix.Configure your MCP client.
Standard config works in most tools:
{
"mcpServers": {
"databend": {
"command": "uv",
"args": ["tool", "run", "--from", "mcp-databend@latest", "mcp-databend"],
"env": {
"DATABEND_DSN": "databend://user:password@host:port/database?warehouse=your_warehouse"
}
}
}
}Use the Codex CLI to add the Databend MCP server:
codex mcp add databend \
--env DATABEND_DSN='databend://user:password@host:port/database?warehouse=your_warehouse' \
-- uv tool run --from mcp-databend@latest mcp-databendUse the Claude Code CLI to add the Databend MCP server:
claude mcp add databend \
--env DATABEND_DSN='databend://user:password@host:port/database?warehouse=your_warehouse' \
-- uv tool run --from mcp-databend@latest mcp-databendClick the button to install:
Then open Cursor Settings -> MCP, select Databend, click Edit, and add DATABEND_DSN to the env section. Cursor keeps the command as a single string:
{
"mcpServers": {
"Databend": {
"command": "uv tool run --from mcp-databend@latest mcp-databend",
"env": {
"DATABEND_DSN": "databend://user:password@host:port/database?warehouse=your_warehouse"
},
"args": []
}
}
}Or install manually:
Go to Cursor Settings -> MCP -> Add new MCP Server. Paste command uv tool run --from mcp-databend@latest mcp-databend, then click Edit and add DATABEND_DSN in env.
Add the standard config above to your Gemini CLI settings.json.
Safety Guarantees
Scope | Rules | ||||
Read access |
| ||||
Write access | Only objects prefixed with | ||||
Sandbox objects |
| ||||
Write rules |
| UNSET TAG | PIPE | DYNAMIC TABLE | INDEX ... AS |
Available Tools
Tool | Description |
| Execute SQL with sandbox validation |
| Execute multiple SQL statements |
| List all databases |
| List tables in database |
| Get table schema |
| Get current session prefix |
| List sandbox databases |
| Create sandbox database |
| Stage management |
| List connections |
Configuration
Variable | Default | Description |
| - | Connection string |
|
| Use embedded Databend |
|
| Query timeout (seconds) |
|
| Enable sandbox validation. Set to |
|
| Transport: |
|
| Bind host for HTTP/SSE |
|
| Bind port for HTTP/SSE |
Local mode stores data in .databend/.
Development
git clone https://github.com/databendlabs/mcp-databend
cd mcp-databend
uv sync
# Run locally
uv run python -m mcp_databend.main
# Debug
npx @modelcontextprotocol/inspector uv run python -m mcp_databend.main
# Test
uv run pytestThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/databendlabs/mcp-databend'
If you have feedback or need assistance with the MCP directory API, please join our Discord server