
Greptimedb Mcp Server
Connects Claude to GreptimeDB's observability database through its MySQL protocol and HTTP API. You get three query interfaces: standard SQL, TQL for PromQL-compatible time series queries, and RANGE queries for windowed aggregations. Includes table introspection, query planning with EXPLAIN, and management tools for pipelines and Perses dashboards. The security layer blocks write operations and masks sensitive columns by pattern matching names like password, api_key, or ssn. Built-in prompts handle common scenarios like log pipeline creation and trace analysis. Useful when you need an AI assistant to query metrics, logs, and traces without manually constructing PromQL or dealing with multiple query languages.
- GitHub stars
- 29
- tools
- 15
- auth
- Secret needed
- transport
- STDIO
- env vars
- 13
- last updated
- Sep 14, 2026
Tools
15 toolsPublic tool metadata for what this MCP can expose to an agent.
execute_sqlExecute SQL queries with format (csv/json/markdown) and limit options
Execute SQL queries with format (csv/json/markdown) and limit options
No parameter schema in public metadata yet.
execute_tqlExecute TQL (PromQL-compatible) queries for time-series analysis
Execute TQL (PromQL-compatible) queries for time-series analysis
No parameter schema in public metadata yet.
query_rangeExecute time-window aggregation queries with RANGE/ALIGN syntax
Execute time-window aggregation queries with RANGE/ALIGN syntax
No parameter schema in public metadata yet.
search_table_semanticsFind tables by observability concept, ranked by matched terms; searches table names, semantic options, and entity declarations. `schema` selects the database to search
Find tables by observability concept, ranked by matched terms; searches table names, semantic options, and entity declarations. `schema` selects the database to search
No parameter schema in public metadata yet.
query_semantic_graphQuery the semantic graph: `summary` (what it contains), `entities` (nodes), `relationships` (edges) over a required time window
Query the semantic graph: `summary` (what it contains), `entities` (nodes), `relationships` (edges) over a required time window
No parameter schema in public metadata yet.
describe_tableInspect a table profile: schema, semantic metadata, latest sample rows, and query guidance
Inspect a table profile: schema, semantic metadata, latest sample rows, and query guidance
No parameter schema in public metadata yet.
explain_queryAnalyze 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)
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)
No parameter schema in public metadata yet.
health_checkCheck database connection status and server version
Check database connection status and server version
No parameter schema in public metadata yet.
list_pipelinesList all pipelines or get details of a specific pipeline
List all pipelines or get details of a specific pipeline
No parameter schema in public metadata yet.
create_pipelineCreate a new pipeline with YAML configuration
Create a new pipeline with YAML configuration
No parameter schema in public metadata yet.
dryrun_pipelineTest a pipeline with sample data without writing to database
Test a pipeline with sample data without writing to database
No parameter schema in public metadata yet.
delete_pipelineDelete a specific version of a pipeline
Delete a specific version of a pipeline
No parameter schema in public metadata yet.
list_dashboardsList all Perses dashboard definitions
List all Perses dashboard definitions
No parameter schema in public metadata yet.
create_dashboardCreate or update a Perses dashboard definition
Create or update a Perses dashboard definition
No parameter schema in public metadata yet.
delete_dashboardDelete a dashboard definition
Delete a dashboard definition
No parameter schema in public metadata yet.
Sponsors
Configuration
GREPTIMEDB_HOSTGreptimeDB host address
GREPTIMEDB_PORTGreptimeDB MySQL protocol port (default: 4002)
GREPTIMEDB_USERDatabase username
GREPTIMEDB_PASSWORDsecretDatabase password
GREPTIMEDB_DATABASEDatabase name to connect to
GREPTIMEDB_TIMEZONESession timezone (default: UTC)
GREPTIMEDB_POOL_SIZEConnection pool size (default: 5)
GREPTIMEDB_HTTP_PORTHTTP API port for pipeline/dashboard management (default: 4000)
GREPTIMEDB_HTTP_PROTOCOLHTTP protocol for pipeline/dashboard API: http or https (default: http)
GREPTIMEDB_MASK_ENABLEDEnable sensitive data masking (default: true)
GREPTIMEDB_MASK_PATTERNSAdditional column name patterns for data masking (comma-separated)
GREPTIMEDB_AUDIT_ENABLEDEnable audit logging for tool invocations (default: true)
GREPTIMEDB_ALLOW_WRITEAllow write/destructive SQL (DDL/DML) via execute_sql by skipping the security gate. DANGEROUS: only use on local or test instances (default: false)
Readme
greptimedb-mcp-server
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.
Quick Start
# Install
pip install greptimedb-mcp-server
# Run (connects to localhost:4002 by default)
greptimedb-mcp-server --host localhost --database public
Details
- Repository
- github.com/greptimeteam/greptimedb-mcp-server
- Category
- Databases
- Package
greptimedb-mcp-server- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active