greptimedb-mcp-server
@GreptimeTeam
关于 greptimedb-mcp-server
A Model Context Protocol (MCP) server for GreptimeDB
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"greptimedb-mcp-server": {
"command": "uv",
"args": [
"venv",
"&&",
"source",
".venv/bin/activate"
]
}
}
}工具
6Execute SQL queries with format (csv/json/markdown) and limit options
Execute TQL (PromQL-compatible) queries for time-series analysis
Execute time-window aggregation queries with RANGE/ALIGN syntax
Inspect a table profile: schema, semantic metadata, latest sample rows, and query guidance
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)
Check database connection status and server version
概览
What is greptimedb-mcp-server?
It is a Model Context Protocol (MCP) server for GreptimeDB, an open-source observability database that handles metrics, logs, and traces. It 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.
How to use greptimedb-mcp-server?
Install via pip install greptimedb-mcp-server, then run greptimedb-mcp-server --host localhost --database public. For Claude Desktop, add the MCP server configuration to your claude_desktop_config.json. The server can also be started in HTTP server mode for containerized deployments.
Key features of greptimedb-mcp-server
- Execute SQL, TQL, and time-window aggregation queries.
- Inspect table schemas and query execution plans.
- List, create, test, and delete pipelines.
- List, create, and delete Perses dashboards.
- Read-only security gate blocking destructive SQL by default.
- Automatic data masking for sensitive columns.
- Audit logging of all tool invocations.
Use cases of greptimedb-mcp-server
- Query and analyze observability metrics, logs, and traces with AI assistants.
- Automate pipeline and dashboard management via MCP tools.
- Debug and optimize queries by inspecting execution plans.
- Enforce security policies (read-only, masking, audit) for AI-driven database access.
FAQ from greptimedb-mcp-server
Is the server read-only by default?
Yes. All queries pass through a security gate that blocks DROP, DELETE, TRUNCATE, UPDATE, INSERT, ALTER, CREATE, GRANT, REVOKE, EXEC, LOAD, COPY, and encoded bypass attempts. Only SELECT, SHOW, DESCRIBE, TQL, EXPLAIN, and UNION are allowed.
How can I enable write mode?
Set the environment variable GREPTIMEDB_ALLOW_WRITE=true or use the CLI argument --allow-write true. This bypasses the security gate for execute_sql and is intended only for local development or testing, never for production.
What transport modes are supported?
The server supports stdio (default), SSE (legacy), and streamable-http (recommended for production). Transport is set via the --transport CLI argument or GREPTIMEDB_TRANSPORT environment variable.
What are the runtime requirements?
A running GreptimeDB instance accessible via MySQL protocol (default port 4002) and optionally via HTTP (port 4000) for pipeline and dashboard management. Python with the installed package is required.
Can I use data masking with custom patterns?
Yes. Data masking is enabled by default for known sensitive column names. You can add custom patterns via --mask-patterns phone,email or the GREPTIMEDB_MASK_PATTERNS environment variable.
其他 分类下的更多 MCP 服务器
Awesome Mlops
visengerA curated list of references for MLOps
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
Codelf
unbugA search tool helps dev to solve the naming things problem.
Nginx UI
0xJackyYet another WebUI for Nginx
评论