GreptimeDB MCP Server

An agent queries GreptimeDB metrics, logs and traces with SQL, TQL and RANGE, with write protection and data masking

  • 29 ★ on the repository
  • Last commit
  • MIT
MCP serverOfficial

Extended access

Why this level

  • The agent reads metrics and logs that may hold sensitive values, and masking does not cover every case
  • The write flag opens DDL and changes to pipelines and dashboards and should stay off on production data
All reasons and checks

greptimeteam/greptimedb-mcp-server

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/greptimedb-mcp-server

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The agent reads metrics and logs that may hold sensitive values, and masking does not cover every case
  • The write flag opens DDL and changes to pipelines and dashboards and should stay off on production data

This is third-party code. Review the repository files before installing.

What it does

The official MCP server from the GreptimeDB team, an observability database that stores metrics, logs and traces in one engine. The agent sends SQL, TQL (PromQL-compatible) and RANGE queries and gets results as CSV, JSON or Markdown. Tools fall into three groups. Queries: execute_sql, execute_tql, query_range, explain_query, describe_table, plus table search by meaning and a semantic graph query. Log processing pipelines: create, dry run and delete. Perses dashboards: list, create and delete. Built-in prompts cover common tasks, from PromQL analysis to schema design. By default the server only reads. Writes can be enabled with a flag, but the authors mark it dangerous and fit for local testing only. A single result is capped at one megabyte, sensitive values are masked and audit logging is on.

Who it is for. SRE and backend engineers whose metrics and logs live in GreptimeDB and who prefer to explore them by asking an agent.

Good fit when

  • After an incident you need to correlate a latency spike with logs and traces from the same window
  • You need a PromQL query and would rather not recall TQL syntax
  • A slow query needs breaking down by execution plan
  • The tables are unfamiliar and the agent must find the right metrics by meaning
  • You want to draft a log parsing pipeline and dry run it on sample data

Not a fit when

  • Your data sits in another database: the server works only with GreptimeDB
  • You need to deploy or configure GreptimeDB itself: tools only query and manage pipelines and dashboards
  • You need to write into a production database: the authors allow this mode for local tests only
  • You need more than a megabyte at once: results are truncated

Example request

Show the 95th percentile latency per service over the last hour and find errors in the logs for the same period.

MCP

Transport
stdio, http, sse
Authentication
key is optional

Environment variables

GREPTIMEDB_HOST required
GreptimeDB host
GREPTIMEDB_PASSWORD secret
Database user password
GREPTIMEDB_ALLOW_WRITE
Allow writes, off by default

Limitations

The entity graph query needs GreptimeDB 1.3, and the server checks the required views at startup. The connection uses the MySQL protocol, default port 4002.

Read-only mode is on by default, and it should stay on for production data. Reads reach beyond the chosen database: with the account's permission, tables of other databases can be queried.

DNS rebinding protection is off by default for proxy compatibility and is enabled with an allowed hosts list.

How to disable. Remove the greptimedb entry from client config, in Claude Code claude mcp remove greptimedb. Change the database password if it sat in the config.

FAQ

How do I run the GreptimeDB server for Claude?

Install the package with pip install greptimedb-mcp-server and run greptimedb-mcp-server --host localhost --database public. For Claude Desktop put the same command into claude_desktop_config.json.

Can the agent change data?

Not by default: read-only mode is on. The GREPTIMEDB_ALLOW_WRITE variable opens writes, DDL and pipeline edits, and the authors call it dangerous.

What is TQL?

A GreptimeDB query language compatible with PromQL. The server runs it through the execute_tql tool.

How do I hide sensitive data?

Masking is on by default, and extra patterns go into GREPTIMEDB_MASK_PATTERNS, comma separated.

Does the server work over the network?

Yes, besides stdio there are streamable-http and sse modes for containers and Kubernetes. Listen address and port come from environment variables.

Discussion

No questions or reviews yet.

One MCP server for SQLite, SQL Server, PostgreSQL and MySQL: read and change data, edit schemas and export to CSV and JSON

MCP serverBroad access391Repository stars
Official

A single-binary MCP server for MySQL, MariaDB, PostgreSQL and SQLite: read-only by default, with optional PII redaction

MCP serverBroad access33Repository stars

MySQL MCP Server Pro

mysql_mcp_server_pro

A MySQL MCP server that runs SQL under access roles, finds tables by comments and analyzes locks, indexes and query plans

MCP serverBroad access249Repository stars

A monitoring platform for SQL Server, MySQL and PostgreSQL with an 11-tool MCP: the agent reads metrics, not the databases.

MCP serverExtended access99Repository stars
Official

Dremio MCP server: an agent browses tables, looks for patterns in the data and analyzes cluster workload.

MCP serverExtended access53Repository stars
Official

Official MongoDB MCP server: queries and aggregations, index management, Atlas clusters and local deployments

MCP serverBroad access1.2KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
GreptimeDB MCP Server (this card)yeskey is optional29
ClickHouse MCP ServernoAPI key904ClickHouse analytics database, without PromQL or log pipelines
Prometheus MCP Serveryesnot required141queries Prometheus, with no logs or traces
Grafana MCP ServeryesAPI key3,663works with Grafana dashboards over data sources

README in short

The docs gather quick install, tool tables, environment variables and command line arguments, HTTP server mode and DNS rebinding protection. They also point to LLM instructions and the GreptimeDB skills index for deployment and configuration tasks.

README badge

Report a problem