Back to Home
GreptimeTeam icon

greptimedb-mcp-server

Verified Safe

by GreptimeTeam

Overview

Enables AI assistants to securely query and analyze GreptimeDB data, including time-series, logs, and metrics, using SQL, TQL, and RANGE queries, with pipeline management capabilities.

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_TRANSPORT
  • GREPTIMEDB_LISTEN_HOST
  • GREPTIMEDB_LISTEN_PORT
  • GREPTIMEDB_AUDIT_ENABLED

Security Notes

The server implements a robust application-level security gate (`security_gate` function) that explicitly blocks DDL/DML operations (e.g., DROP, DELETE, INSERT, UPDATE, ALTER, CREATE), file system access, and common SQL injection bypass techniques (e.g., UNHEX, CHAR functions, hex encoding). It strictly allows only read-only (SELECT, SHOW, DESCRIBE, TQL, EXPLAIN, WITH, UNION) and pipeline management operations. Data masking is enabled by default for sensitive column patterns (configurable). Audit logging is also enabled by default for all tool invocations, enhancing accountability and detectability. The README strongly recommends creating a read-only database user for an additional layer of security. No direct `eval` or obvious hardcoded secrets were found in the provided code snippets.

Similar Servers

Stats

Interest Score41
Security Score9
Cost ClassMedium
Avg Tokens1200
Stars23
Forks12
Last Update2025-12-11

Tags

greptimedbmcptime-seriesobservabilitydata analysis