greptimeteam avatar

Greptimedb Mcp Server

greptimeteam/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 tools

Public 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_HOST

GreptimeDB host address

GREPTIMEDB_PORT

GreptimeDB MySQL protocol port (default: 4002)

GREPTIMEDB_USER

Database username

GREPTIMEDB_PASSWORDsecret

Database password

GREPTIMEDB_DATABASE

Database name to connect to

GREPTIMEDB_TIMEZONE

Session timezone (default: UTC)

GREPTIMEDB_POOL_SIZE

Connection pool size (default: 5)

GREPTIMEDB_HTTP_PORT

HTTP API port for pipeline/dashboard management (default: 4000)

GREPTIMEDB_HTTP_PROTOCOL

HTTP protocol for pipeline/dashboard API: http or https (default: http)

GREPTIMEDB_MASK_ENABLED

Enable sensitive data masking (default: true)

GREPTIMEDB_MASK_PATTERNS

Additional column name patterns for data masking (comma-separated)

GREPTIMEDB_AUDIT_ENABLED

Enable audit logging for tool invocations (default: true)

GREPTIMEDB_ALLOW_WRITE

Allow 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

PyPI - Version build workflow MCP Registry MIT License

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

View the full README on GitHub

Details

Repository
github.com/greptimeteam/greptimedb-mcp-server
Category
Databases
Package
greptimedb-mcp-server
Transport
STDIO
Auth
Required
Registry
MCP registry, active

Related Databases MCP servers

View all
1insforge avatarInsForgeinsforge/insforge-mcpMCP server for InsForge BaaS — database, storage, edge functions, and deployments29stars
2roomi-fields avatarRTFMroomi-fields/rtfmLocal retrieval for AI agents: index code, docs, PDFs, data in SQLite; 24 parsers, served via MCP.27stars
3isdaniel avatarPostgreSQL performance Tuner MCP Serverisdaniel/pgtuner_mcpprovides AI-powered PostgreSQL performance tuning capabilities.24stars
4sidd27 avatarInfrawisesidd27/infrawiseLive AWS, database & Kafka infrastructure context for AI coding assistants via MCP.22stars
5devopam avatarMcpgdevopam/mcpgProduction-grade PostgreSQL MCP server — 279 tools for query, tuning & ops, read-only by default.0stars
6snss10 avatarDBeast PostgreSQL MCPsnss10/dbeastPostgreSQL MCP server for schema, query, health, security, and performance analysis.9stars