Query GreptimeDB metrics, logs and traces with SQL, TQL and RANGE. Manage pipelines and dashboards.
MCPpedia last refreshed this data
Greptimedb MCP Server is an MCP server that query GreptimeDB metrics, logs and traces with SQL, TQL and RANGE. Manage pipelines and dashboards. It exposes 13 tools over stdio, sse and http, requires no API key, and scores 84/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"greptimedb": {
"args": [
"--host",
"localhost",
"--database",
"public"
],
"command": "greptimedb-mcp-server"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Query GreptimeDB metrics, logs and traces with SQL, TQL and RANGE. Manage pipelines and dashboards.
Run this in your terminal to verify the server starts. Then let us know if it worked - your result helps other developers.
uvx 'greptimedb-mcp-server' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
Checked greptimedb-mcp-server against OSV.dev.
Click any tool to inspect its schema.
table_dataBrowse tables via greptime URIs
greptime://{table}/data
pipeline_creatorTemplate for creating pipelines
log_pipelineTemplate for log pipeline analysis
metrics_analysisTemplate for metrics analysis
promql_analysisTemplate for PromQL analysis
iot_monitoringTemplate for IoT monitoring
trace_analysisTemplate for trace analysis
table_operationTemplate for table operations
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in data / analytics
Token-efficient MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, ClickHouse, SQLite
Full Agent Swarm API and MCP server with local SQLite storage for multi-agent orchestration.
Search, scrape, and crawl the web, plus Firecrawl Alexandria, our library of everything else.
Extract data from any website with thousands of scrapers, crawlers, and automations on Apify Store ⚡
MCP Security Weekly
Get CVE alerts and security updates for Greptimedb MCP Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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.
# Install
pip install greptimedb-mcp-server
# Run (connects to localhost:4002 by default)
greptimedb-mcp-server --host localhost --database public
For Claude Desktop, add this to your config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"greptimedb": {
"command": "greptimedb-mcp-server",
"args": ["--host", "localhost", "--database", "public"]
}
}
}
| Tool | Description |
|---|---|
execute_sql | Execute SQL queries with format (csv/json/markdown) and limit options |
execute_tql | Execute TQL (PromQL-compatible) queries for time-series analysis |
query_range | Execute time-window aggregation queries with RANGE/ALIGN syntax |
search_table_semantics | Find tables by observability concept, ranked by matched terms; searches table names, semantic options, and entity declarations. schema selects the database to search |
query_semantic_graph | Query the semantic graph: summary (what it contains), entities (nodes), relationships (edges) over a required time window |
describe_table | Inspect a table profile: schema, semantic metadata, latest sample rows, and query guidance |
explain_query | 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) |
health_check | Check database connection status and server version |
search_table_semantics and the semantic metadata in describe_table read information_schema.table_semantics. A table appears there when it carries a greptime.semantic.* option or a built-in convention derives an entity declaration for it; other tables are absent. The server reads the view's column list once per process and selects only the columns it exposes. entity_declarations requires GreptimeDB 1.3; on earlier versions it is reported as a missing column rather than as an empty declaration set.
Tool results are bounded by GREPTIMEDB_MAX_RESULT_BYTES (default 1048576, or 1 MiB). A query result over the budget returns fewer rows and reports it in truncated and truncation_reason; a result with no rows to shed is cut with a notice at the end. The budget is a backstop against a result too large to be consumed, so lower it if your MCP client rejects results before it is reached.
The server connects to one database, but reads are not restricted to it:
| Tool | How to reach another database |
|---|---|
execute_sql, query_range, describe_table | Qualify the table as schema.table |
execute_tql | metric{__schema__="other_db"}, which accepts = only |
search_table_semantics | Pass schema |
query_semantic_graph | Catalog-wide already; no scoping needed |
The connected account needs read permission on the target database. Use SHOW DATABASES to list them.
query_semantic_graph reads `greptime