greptimedb-mcp-server

v0.6.0
io.github.GreptimeTeam/greptimedb-mcp-server Checked 7 hours ago Published 2 months ago

Query GreptimeDB metrics, logs and traces with SQL, TQL and RANGE.

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

execute_sql

Execute SQL query against GreptimeDB. Please use MySQL dialect. Read-only by default. When the server runs with write mode enabled (--allow-write / GREPTIMEDB_ALLOW_WRITE), destructive SQL (DDL/DML) is also permitted.

ParameterTypeDescription
query *string
formatstring
limitinteger

describe_table

Get a table profile: schema, semantic metadata, sample rows, and guidance. Use it when deciding how to query an unfamiliar table. When the right table is not known yet, search_table_semantics first; describing candidates one by one is slower than querying the data. The semantic profile says what the table means, not what its data says. signal_type is metric, log, trace, or event; source and source_version name the ingestion protocol; pipeline names the schema that shaped the rows; semantic_options carries signal-specific facts such as metric type and unit. met…

ParameterTypeDescription
table *string
include_samplesboolean
include_semanticsboolean
sample_limitinteger

search_table_semantics

Find tables by observability concept when the right table name is unknown. Searches table names, semantic options, and entity declarations, and ranks tables by how many query terms they matched. Use it before describe_table when the schema is wide or table names do not say what they hold. It searches schema metadata only, never telemetry row values, so it can say which table holds Redis memory usage but not which row belongs to `Redis02`. It ranks on the values in that metadata, not on the schema's own key names, so search for `gauge` or `bytes` rather than `metri…

ParameterTypeDescription
query *string
limitinteger
signal_type

query_semantic_graph

Query the semantic graph: which entities exist and which are related. Use view=summary when the entity and relationship types in this graph are not known yet; it reports them with the endpoint type pairs each relationship connects. With a type or an id already in hand, query entities or relationships directly. The window is required and half-open, [start_time, end_time), over observed_at -- the 60-second bucket an observation was recorded in. Rows are aggregated across the buckets in the window, and the result echoes the window and the limit it used. rela…

ParameterTypeDescription
end_time *stringExclusive end of the window, RFC3339.
start_time *stringInclusive start of the window, RFC3339, e.g. 2026-09-05T07:00:00Z. Without an offset it is read as UTC.
view *stringsummary: which entity and relationship types exist and what they connect. entities: the nodes. relationships: the edges.
dst_idrelationships only: a canonical destination id this graph returned.
dst_typerelationships only: destination endpoint type.
entity_identities only: a canonical id this graph returned.
entity_typeentities only: service, k8s.pod, host, ...
limitintegerMaximum rows to return.
provenancerelationships only: how the edge was obtained -- trace (paired spans), attribute (identities on one row), declared, or agent.
rel_typerelationships only: calls, runs_on, contains, part_of, uses, invokes, depends_on, owns, or a custom declared value.
scopeentities only: the namespace or environment an id is scoped to.
src_idrelationships only: a canonical source id this graph returned.
src_typerelationships only: source endpoint type.

health_check

Check GreptimeDB connection status and server version.

execute_tql

Execute TQL query for time-series analysis. TQL is PromQL-compatible - use standard PromQL syntax.

ParameterTypeDescription
end *string
query *string
start *string
step *string
formatstring
lookback

query_range

Execute time-window aggregation query using GreptimeDB's RANGE query syntax.

ParameterTypeDescription
align *string
select *string
table *string
by
fill
formatstring
limitinteger
order_by
where

explain_query

Analyze SQL or TQL query execution plan.

ParameterTypeDescription
query *string
analyzeboolean
verboseboolean

list_pipelines

List all pipelines or get details of a specific pipeline.

ParameterTypeDescription
name

create_pipeline

Create a new pipeline in GreptimeDB.

ParameterTypeDescription
name *string
pipeline *string

dryrun_pipeline

Test a pipeline with sample data without writing to the database. You can test a pipeline in two ways: - Provide 'pipeline' with inline YAML configuration - Provide 'pipeline_name' to test a previously saved pipeline Args: pipeline: Pipeline YAML configuration (inline) pipeline_name: Name of saved pipeline (mutually exclusive with pipeline) data: Test data in JSON/NDJSON format data_type: Optional content type (e.g., 'application/x-ndjson')

ParameterTypeDescription
datastring
data_type
pipeline
pipeline_name

delete_pipeline

Delete a specific version of a pipeline from GreptimeDB.

ParameterTypeDescription
name *string
version *string

list_dashboards

List all Perses dashboard definitions stored in GreptimeDB.

create_dashboard

Create or update a Perses dashboard definition in GreptimeDB.

ParameterTypeDescription
definition *string
name *string

delete_dashboard

Delete a Perses dashboard definition from GreptimeDB.

ParameterTypeDescription
name *string