The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Greptimedb MCP Server listing page.
A Model Context Protocol (MCP) server for GreptimeDB — an open-source observability database that handles metrics, logs, and traces in one engine.
Enables AI assistants to query and analyze GreptimeDB using SQL, TQL (PromQL-compatible), and RANGE queries, with built-in security features like read-only enforcement and data masking.
For Claude Desktop, add this to your config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
| Tool | Description |
|---|---|
execute_sql | Execute SQL queries with format (csv/json/markdown) and limit options |
execute_tql | Execute TQL (PromQL-compatible) queries for time-series analysis |
query_range | Execute time-window aggregation queries with RANGE/ALIGN syntax |
search_table_semantics | Find tables by observability concept, ranked by matched terms; searches table names, semantic options, and entity declarations |
describe_table | Inspect a table profile: schema, semantic metadata, latest sample rows, and query guidance |
explain_query | Analyze SQL or TQL query execution plans (analyze=true for runtime stats; add verbose=true alongside analyze=true for per-partition scan metrics and index-pruning counters) |
health_check | Check database connection status and server version |
search_table_semantics and the semantic metadata in describe_table read information_schema.table_semantics. A table appears there when it carries a greptime.semantic.* option or a built-in convention derives an entity declaration for it; other tables are absent. The server reads the view's column list once per process and selects only the columns it exposes. entity_declarations requires GreptimeDB 1.3; on earlier versions it is reported as a missing column rather than as an empty declaration set.
| Tool | Description |
|---|---|
list_pipelines | List all pipelines or get details of a specific pipeline |
create_pipeline | Create a new pipeline with YAML configuration |
dryrun_pipeline | Test a pipeline with sample data without writing to database |
delete_pipeline | Delete a specific version of a pipeline |
| Tool | Description |
|---|---|
list_dashboards | List all Perses dashboard definitions |
create_dashboard | Create or update a Perses dashboard definition |
delete_dashboard | Delete a dashboard definition |
greptime://<table>/data URIspipeline_creator, log_pipeline, metrics_analysis, promql_analysis, trace_analysis, table_operation, schema_design_advisor, observability_correlation, ingestion_troubleshooting, query_performance_tuningFor LLM integration and prompt usage, see docs/llm-instructions.md.
For containerized or Kubernetes deployments:
By default, DNS rebinding protection is disabled for compatibility with proxies, gateways, and Kubernetes services. To enable it, use --allowed-hosts:
If you encounter 421 Invalid Host Header errors, either disable protection (default) or add your host to the allowed list.
Create a read-only user in GreptimeDB using static user provider:
All queries go through a security gate that:
The server is read-only by default. For local development or testing, you can
allow write/destructive SQL (DDL/DML such as CREATE, DROP, ALTER, INSERT,
UPDATE, DELETE) through the execute_sql tool by enabling write mode:
When enabled, the security gate is bypassed for execute_sql, and the server
logs a warning on startup.
⚠️ Danger: This lets an AI assistant run destructive statements against your database. Never enable it against production data. Combine with a read-only database user if you only need read access.
Sensitive columns are automatically masked (******) based on column name patterns:
password, secret, token, api_key, credentialcredit_card, cvv, bank_accountssn, id_card, passportConfigure with --mask-patterns phone,email to add custom patterns.
All tool invocations are logged:
Disable with --audit-enabled false.
MIT License - see LICENSE.md.
Inspired by: