execute_sqlLABSCO SUMMARY
Read-only unless you say otherwise, and it masks the columns that look like secrets.
A security gate blocks DROP, DELETE, INSERT and the rest before they reach the database, and columns named like passwords, tokens or card numbers come back masked — both on by default. describe_table is the tool to start with: it returns the schema together with sample rows and guidance, which is most of what you need to write a correct query against an unfamiliar time-series table.
What it is
A GreptimeDB server for metrics, logs and traces. It runs queries in three dialects, describes tables with the semantic metadata that time-series schemas carry, and manages ingest pipelines and Perses dashboards over the HTTP API.
What you get
- execute_sql — SQL with a format option (csv, json or markdown) and a row limit
- execute_tql — PromQL-compatible queries for time-series analysis
- query_range — time-window aggregation with RANGE and ALIGN
- describe_table — schema, semantic metadata, recent sample rows and query guidance in one call
- explain_query — the execution plan for a SQL or TQL query, with runtime statistics and index-pruning counters when you ask for them
- health_check — connection status and server version
- list_pipelines, create_pipeline, dryrun_pipeline, delete_pipeline — manage ingest pipelines, and test one against sample data before it writes
- list_dashboards, create_dashboard, delete_dashboard — Perses dashboard definitions
- Prompt templates for common jobs, including log_pipeline, metrics_analysis, promql_analysis, trace_analysis and query_performance_tuning
Requirements
A reachable GreptimeDB instance. Install from PyPI as greptimedb-mcp-server and pass connection details as CLI arguments or environment variables — GREPTIMEDB_HOST, GREPTIMEDB_PORT (the MySQL protocol port), GREPTIMEDB_USER, GREPTIMEDB_PASSWORD, GREPTIMEDB_DATABASE. Pipeline and dashboard management also needs GREPTIMEDB_HTTP_PORT. Runs over stdio, SSE or streamable-http.
Setup effort
One command — pip install greptimedb-mcp-server
USE CASES
Investigating a spike
Describe the table to learn its semantic columns, then run a windowed aggregation over the period in question.
Reusing a PromQL query you already have
Run it as TQL against the same engine that holds your logs and traces.
Making a slow query fast
Read the execution plan with runtime statistics and index-pruning counters, then rewrite the query.
Shipping a new log format
Write the pipeline, dry-run it against sample data, and only then create it.
Publishing what you found
Create or update a Perses dashboard from the query you just validated.
13 tools
Listed in project docs. Your client may show a different list.
execute_tqlquery_rangedescribe_tableexplain_queryhealth_checklist_pipelinescreate_pipelinedryrun_pipelinedelete_pipelinelist_dashboardscreate_dashboarddelete_dashboardBEFORE YOU INSTALL
What to know first
Tools you get
13 tools named in the project's documentation.
Requires
greptimedb-mcp-server on PATH
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
pip install greptimedb-mcp-serverMCP Clients
Claude Desktop
{
"mcpServers": {
"greptimedb": {
"command": "greptimedb-mcp-server",
"args": [
"--host",
"localhost",
"--database",
"public"
]
}
}
}