tidbcloudlake-mcp

v0.3.2
tidbcloudlake-mcp Checked 2 days ago Published 4 months ago

An MCP server for TiDB Cloud Lake.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

execute_sql Execute Sql

Execute SQL query against the TiDB Cloud Lake database. SAFETY RULES (when LAKE_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 LAKE_MCP_SAFE_MODE=false to disable sandbox validation

ParameterTypeDescription
sql *stringSQL query string to execute

execute_multi_sql Execute Multi Sql

Execute multiple SQL queries against the TiDB Cloud Lake database with MCP safe mode protection. Safe mode (enabled by default) restricts write operations to the current session sandbox. Set LAKE_MCP_SAFE_MODE=false to disable sandbox validation.

ParameterTypeDescription
sqls *arrayList of SQL query strings to execute

show_databases Show Databases

List available TiDB Cloud Lake databases (safe operation, not affected by MCP safe mode).

show_tables Show Tables

List available TiDB Cloud Lake 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%'"

ParameterTypeDescription
database
filter

show_functions Show Functions

List available TiDB Cloud Lake 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

ParameterTypeDescription
filter

describe_table Describe Table

Describe a TiDB Cloud Lake table (safe operation, not affected by MCP safe mode). Args: table: The table name database: The database name

ParameterTypeDescription
table *string
database

show_stages Show Stages

List available TiDB Cloud Lake stages (safe operation, not affected by MCP safe mode).

list_stage_files List Stage Files

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

ParameterTypeDescription
stage_name *string
path

show_connections Show Connections

List available TiDB Cloud Lake connections (safe operation, not affected by MCP safe mode).

create_stage Create Stage

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

ParameterTypeDescription
name *string
url *string
connection_name

get_session_sandbox_prefix Get Session Sandbox Prefix

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.

list_session_sandbox_databases List Session Sandbox Databases

List sandbox databases owned by current session. Only these databases can be modified. Other databases are read-only.

create_session_sandbox_database Create Session Sandbox Database

Create a new sandbox database for current session. The database name will be automatically prefixed with current session's sandbox prefix.

ParameterTypeDescription
name *stringDatabase name suffix (without prefix)