Skip to main content
Glama
databendlabs

mcp-databend

Official
by databendlabs

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOCAL_MODENoUse embedded Databend.false
DATABEND_DSNYesConnection string for Databend database.
DATABEND_MCP_BIND_HOSTNoBind host for HTTP/SSE.127.0.0.1
DATABEND_MCP_BIND_PORTNoBind port for HTTP/SSE.8001
DATABEND_MCP_SAFE_MODENoEnable sandbox validation. Set to false to allow all SQL permitted by the Databend user.true
DATABEND_QUERY_TIMEOUTNoQuery timeout in seconds.300
DATABEND_MCP_SERVER_TRANSPORTNoTransport: stdio, http, sse.stdio

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
execute_sqlA

Execute SQL query against Databend database.

SAFETY RULES (when DATABEND_MCP_SAFE_MODE is enabled):

  • Read operations (SELECT/SHOW/DESCRIBE/EXPLAIN/LIST): allowed on ALL objects

  • Write operations (CREATE/DROP/INSERT/UPDATE/DELETE/...): ONLY allowed on current session's sandbox

  • Current session sandbox prefix: use get_session_sandbox_prefix() to get it

  • Set DATABEND_MCP_SAFE_MODE=false to disable sandbox validation

Args: sql: SQL query string to execute

Returns: Dictionary containing query results or error information

execute_multi_sqlA

Execute multiple SQL queries against Databend database with MCP safe mode protection.

Safe mode (enabled by default) restricts write operations to the current session sandbox. Set DATABEND_MCP_SAFE_MODE=false to disable sandbox validation.

Args: sqls: List of SQL query strings to execute

Returns: List of dictionaries containing either query results or error information

show_databasesA

List available Databend databases (safe operation, not affected by MCP safe mode)

show_tablesA

List available Databend tables in a database (safe operation, not affected by MCP safe mode) Args: database: The database name filter: The filter string, eg: "name like 'test%'"

Returns: Dictionary containing either query results or error information

show_functionsA

List available Databend functions (safe operation, not affected by MCP safe mode) Args: filter: The filter string, eg: "name like 'add%'" Returns: Dictionary containing either query results or error information

describe_tableA

Describe a Databend table (safe operation, not affected by MCP safe mode) Args: table: The table name database: The database name

Returns: Dictionary containing either query results or error information

show_stagesA

List available Databend stages (safe operation, not affected by MCP safe mode)

list_stage_filesA

List files in a Databend stage (safe operation, not affected by MCP safe mode) Args: stage_name: The stage name (with @ prefix) path: Optional path within the stage

Returns: Dictionary containing either query results or error information

show_connectionsA

List available Databend connections (safe operation, not affected by MCP safe mode)

create_stageC

Create a Databend stage with connection Args: name: The stage name url: The stage URL (e.g., 's3://bucket-name') connection_name: Optional connection name to use

Returns: Dictionary containing either query results or error information

get_session_sandbox_prefixA

Get current session's sandbox prefix for writable objects.

All write operations (CREATE/DROP/INSERT/UPDATE/DELETE/...) are ONLY allowed on objects with this prefix. This is enforced by code, not just guidelines.

Returns: Dictionary with session_id and prefix

list_session_sandbox_databasesA

List sandbox databases owned by current session.

Only these databases can be modified. Other databases are read-only.

Returns: Dictionary containing current session's sandbox database list

create_session_sandbox_databaseA

Create a new sandbox database for current session.

The database name will be automatically prefixed with current session's sandbox prefix.

Args: name: Database name suffix (without prefix)

Example: create_session_sandbox_database('analytics') -> Creates 'mcp_sandbox_a1b2c3d4_analytics'

Returns: Dictionary containing result or error

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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