GreptimeDB logo

GreptimeDB

Free

GreptimeDB 官方集成,让 AI 安全地探索和分析 GreptimeDB 中的时序数据。

FreeFree tier
Type
Open Source

About GreptimeDB

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. Includes tools for pipeline management, dashboard management, and built-in Jinja template prompts for common tasks such as pipeline creation, metrics analysis, and query performance tuning.

Key Features

Execute SQL queries with CSV/JSON/markdown output and limit options
Execute TQL (PromQL-compatible) queries for time-series analysis
Execute time-window aggregation queries with RANGE/ALIGN syntax
Inspect table schema, metadata, sample rows, and query guidance
Explain and analyze query execution plans with runtime stats and partition metrics
Manage pipelines via create, list, dry-run, and delete operations
Manage Perses dashboard definitions (list, create, delete)
Browse tables via greptime:// table/data URIs as resources
Built-in Jinja template prompts for pipeline creation, log/metrics/trace analysis, schema design, and query tuning
Security features: read-only enforcement and sensitive data masking

Pros & Cons

Pros
  • Supports multiple query languages: SQL, TQL (PromQL-compatible), and RANGE queries
  • Built-in security: read-only mode and data masking to prevent data leaks
  • Comprehensive pipeline and dashboard management for observability workflows
  • Pre-built prompts for common tasks accelerate AI-assisted analysis
  • Configurable via environment variables for flexible deployment
Cons
  • Requires running a separate MCP server process
  • Dependent on an available GreptimeDB instance
  • Limited to MCP-compatible clients (e.g., Claude Desktop)

Best For

Time-series data analysis and observability queriesLog, metrics, and trace analysis with AI assistantsPipeline management for data ingestion configurationsDashboard management for Perses-based monitoringSchema design advisory and query performance tuning

FAQ

What is the GreptimeDB MCP server?
It is a Model Context Protocol (MCP) server that allows AI assistants to query and analyze observability data (metrics, logs, traces) stored in GreptimeDB using SQL, TQL, and RANGE queries, with security features like read-only enforcement and data masking.
How do I install and run the GreptimeDB MCP server?
Install via pip: `pip install greptimedb-mcp-server`. Then run: `greptimedb-mcp-server --host localhost --database public` (connects to localhost:4002 by default).
What security features are available?
The server supports read-only enforcement and sensitive data masking. These can be enabled via the GREPTIMEDB_MASK_ENABLED and GREPTIMEDB_MASK_PATTERNS environment variables.
What output formats are supported for SQL queries?
SQL queries can return results in CSV, JSON, or Markdown format, with optional limit on the number of rows.
What tools are provided for pipeline and dashboard management?
Tools include list_pipelines, create_pipeline, dryrun_pipeline, delete_pipeline for pipelines; and list_dashboards, create_dashboard, delete_dashboard for Perses dashboard definitions.