Back to Home
GreptimeTeam icon

greptimedb-mcp-server

Verified Safe

by GreptimeTeam

Overview

Enables AI assistants to query and analyze GreptimeDB, an open-source, cloud-native, unified observability database, using SQL, TQL, and RANGE queries, with built-in security and data masking.

Installation

Run Command
greptimedb-mcp-server --host localhost --database public

Environment Variables

  • GREPTIMEDB_HOST
  • GREPTIMEDB_PORT
  • GREPTIMEDB_USER
  • GREPTIMEDB_PASSWORD
  • GREPTIMEDB_DATABASE
  • GREPTIMEDB_TIMEZONE
  • GREPTIMEDB_HTTP_PORT
  • GREPTIMEDB_HTTP_PROTOCOL
  • GREPTIMEDB_POOL_SIZE
  • GREPTIMEDB_MASK_ENABLED
  • GREPTIMEDB_MASK_PATTERNS
  • GREPTIMEDB_AUDIT_ENABLED
  • GREPTIMEDB_TRANSPORT
  • GREPTIMEDB_LISTEN_HOST
  • GREPTIMEDB_LISTEN_PORT
  • GREPTIMEDB_ALLOWED_HOSTS
  • GREPTIMEDB_ALLOWED_ORIGINS

Security Notes

The server implements a robust `security_gate` to block dangerous SQL operations (DDL, DML, dynamic SQL, file system access, encoded content) and enforces read-only access for core query tools. Sensitive data masking is applied based on configurable column name patterns. Input validation functions are used for all tool parameters to prevent injection. HTTP API calls for pipeline management (create, dryrun, delete) require authentication. While `exec()` is used for dynamic prompt registration, it's highly controlled, constructing a fixed function template and only performing string replacement for variables, which mitigates typical `exec()` risks. DNS rebinding protection and audit logging are configurable.

Similar Servers

Stats

Interest Score40
Security Score9
Cost ClassMedium
Avg Tokens1500
Stars23
Forks12
Last Update2026-01-19

Tags

GreptimeDBTime-seriesAI/LLM IntegrationData AnalysisObservability