Greptimedb Mcp Server
Query GreptimeDB metrics, logs, and traces via SQL and TQL; manage pipelines and dashboards.
- CCM score
- 81 of 100
- GitHub stars
- 29
- tools
- 15
- auth
- Secret needed
- transport
- STDIO
- env vars
- 13
- last updated
- Sep 14, 2026
Own this MCP server? Claim it
What it does
- Reads data with
execute_sql,execute_tql, andquery_range, with JSON, CSV, or Markdown output and row limits - Explores schema through
describe_table,search_table_semantics, andquery_semantic_graph, plusexplain_queryfor plan analysis - Manages pipelines and Perses dashboards with
create_pipeline,dryrun_pipeline,create_dashboard, and their list and delete counterparts - Connects to a local GreptimeDB over the MySQL protocol with read-only enforcement by default, suited to observability analysis and dashboard upkeep
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.
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
- Categories
- Databases, Monitoring & Observability
- Package
greptimedb-mcp-server- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active
Questions
What does the GreptimeDB MCP server let an AI agent do?
It lets an agent query GreptimeDB metrics, logs and traces with SQL, TQL (PromQL-compatible) and RANGE time-window queries. It also manages pipelines and Perses dashboards, with read-only enforcement and data masking built in.
Which Databases category servers rank alongside the GreptimeDB MCP server?
On the Databases category page it ranks in the top 50 of Claude Marketplaces. Other servers in the category include Dbx, MCP Toolbox for Databases, DBHub, Postgres MCP Pro and Supabase, and this server adds time-series and observability tools that those lack.
What environment variables does the GreptimeDB MCP server need?
It reads GREPTIMEDB_HOST, GREPTIMEDB_PORT, GREPTIMEDB_USER, GREPTIMEDB_PASSWORD and GREPTIMEDB_DATABASE, plus optional settings such as GREPTIMEDB_TIMEZONE, GREPTIMEDB_POOL_SIZE and GREPTIMEDB_ALLOW_WRITE. It connects over stdio and is published as the greptimedb-mcp-server package on PyPI.
Which tools does the GreptimeDB MCP server expose?
The server lists 15 tools, including execute_sql, execute_tql, query_range, search_table_semantics and explain_query for querying. It also has health_check, pipeline tools such as create_pipeline and dryrun_pipeline, and dashboard tools such as create_dashboard.
Similar to Greptimedb Mcp Server
More DatabasesPostgres MCP Procrystaldba3.5K starsConnects to PostgreSQL databases for schema browsing, SQL execution, query tuning, and health checks.
Mcp Server Motherduckmotherduckdb544 starsSQL analytics over MotherDuck and local DuckDB files, with read-only and read-write query tools.
Tiger MCPtimescale128 starsTiger Cloud database services, projects, and documentation via a CLI-backed MCP server.
DBHubbytebase4K starsGateway to seven SQL databases: run queries, explore schemas, and check query plans.
Microsoft SQL Serveralyiox12 starsRead-only T-SQL, schema inspection, and plan analysis for SQL Server, with opt-in writes and multiple connection profiles.
MCP Toolbox for Databasesgoogleapis17K starsConnects agents to enterprise databases for schema exploration and SQL execution across many engines.