tidbcloudlake-mcp
v0.3.2An 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
| Parameter | Type | Description |
|---|---|---|
sql * | string | SQL 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.
| Parameter | Type | Description |
|---|---|---|
sqls * | array | List 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%'"
| Parameter | Type | Description |
|---|---|---|
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
| Parameter | Type | Description |
|---|---|---|
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
| Parameter | Type | Description |
|---|---|---|
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
| Parameter | Type | Description |
|---|---|---|
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
| Parameter | Type | Description |
|---|---|---|
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.
| Parameter | Type | Description |
|---|---|---|
name * | string | Database name suffix (without prefix) |