mcp clickzetta server
A Model Context Protocol server that enables database interaction with Clickzetta, allowing users to run SQL queries, manage tables, and maintain a dynamically updated memo of data insights.
A Model Context Protocol server that enables database interaction with Clickzetta, allowing users to run SQL queries, manage tables, and maintain a dynamically updated memo of data insights.
A Model Context Protocol (MCP) server implementation that provides database interaction with Clickzetta Lakehouse. This server enables running SQL queries with tools and intereacting with a memo of data insights presented as a resource.
The server exposes a single dynamic resource:
- memo://insights
: A continuously updated data insights memo that aggregates discovered insights during analysis
- Auto-updates as new insights are discovered via the append-insight tool
The server offers six core tools:
read_query
query
(string): The SELECT SQL query to executeReturns: Query results as array of objects
write_query
(with --allow-write
flag)
query
(string): The SQL modification queryReturns: { affected_rows: number }
create_table
(with --allow-write
flag)
query
(string): CREATE TABLE SQL statementlist_tables
Returns: Array of table names
describe-table
table_name
(string): Name of table to describe (can be fully qualified)append_insight
insight
(string): data insight discovered from analysisgit clone https://github.com/yunqiqiliang/mcp-clickzetta-server.git
cd mcp-clickzetta-server
uv pip install -e .
Create a .env file based on .env.example with your Clickzetta Lakehouse credentials:
CLICKZETTA_USERNAME = ""
CLICKZETTA_PASSWORD = ""
CLICKZETTA_SERVICE = "api.clickzetta.com"
CLICKZETTA_INSTANCE = ""
CLICKZETTA_WORKSPACE = ""
CLICKZETTA_SCHEMA = ""
CLICKZETTA_VCLUSTER = ""
After installing the package, you can run the server directly with:
uv run mcp_clickzetta_server
If this is the first time you are running the server, you could run the following command to acclerate the package installation:
UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple/ uv run mcp_clickzetta_server
This will start the stdio-based MCP server, which can be connected to Claude Desktop or any MCP client that supports stdio communication.
You should see output similar to:
uv run mcp_clickzetta_server
2025-03-25 10:11:20,799 - mcp_clickzetta_server - INFO - Starting Clickzetta MCP Server
2025-03-25 10:11:20,799 - mcp_clickzetta_server - INFO - Allow write operations: false
2025-03-25 10:11:20,799 - mcp_clickzetta_server - INFO - Prefetch table descriptions: true
2025-03-25 10:11:20,799 - mcp_clickzetta_server - INFO - Excluded tools: []
2025-03-25 10:11:20,799 - mcp_clickzetta_server - INFO - Prefetching table descriptions
2025-03-25 10:11:21,726 - clickzetta.zettapark.session - INFO - Zettapark Session information:
"version" : 0.1.3,
"python.version" : 3.12.2,
"python.connector.version" : 0.8.89.0,
"python.connector.session.id" : dd46bd27-920d-4760-94a6-6f994d31e63e,
"os.name" : Darwin
2025-03-25 10:11:21,728 - clickzetta.connector.v0.client - INFO - clickzetta connector submitting job, id:2025032510112172821098301
2025-03-25 10:11:23,059 - clickzetta.connector.v0.client - INFO - clickzetta connector submitting job, id:2025032510112305897947697
2025-03-25 10:11:23,728 - mcp_clickzetta_server - INFO - Allowed tools: ['read_query', 'append_insight']
2025-03-25 10:11:23,732 - mcp_clickzetta_server - INFO - Server running with stdio transport
{
"mcpServers": {
"clickzetta-mcp-server" : {
"command": "/Users/******/anaconda3/bin/uv",
"args": [
"--directory",
"/Users/******/Documents/GitHub/mcp-clickzetta-server",
"run",
"mcp_clickzetta_server"
]
}
}
}
When using with Claude, you can ask questions like:
This server:
To install Clickzetta Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli@latest install @yunqiqiliang/mcp-clickzetta-server --client claude --key ******
# Add the server to your claude_desktop_config.json
"mcpServers": {
"clickzetta_pip": {
"command": "uvx",
"args": [
"mcp_clickzetta_server",
"--service",
"the_service",
"--instance",
"the_instance",
"--vcluster",
"the_vcluster",
"--workspace",
"the_workspace",
"--schema",
"the_schema",
"--user",
"the_user",
"--password",
"their_password",
# Optionally: "--allow_write" (but not recommended)
# Optionally: "--log_dir", "/absolute/path/to/logs"
# Optionally: "--log_level", "DEBUG"/"INFO"/"WARNING"/"ERROR"/"CRITICAL"
# Optionally: "--exclude_tools", "{tool name}", ["{other tool name}"]
]
}
}