Greptimedb MCP Server
Resumen
Descripción del creador (original en inglés)
Query GreptimeDB metrics, logs and traces with SQL, TQL and RANGE. Manage pipelines and dashboards.
Los tres pilares de PopNx MCP
Estos tres nunca se combinan en una sola puntuación: las opiniones, las mediciones y la popularidad son cosas distintas.
- Opinión de usuariosiAún no hay reseñasLas reseñas se abrirán junto con las cuentas en una etapa posterior
- Nuestras revisiones básicasi1 de 1 superadasRevisado con información pública; el código aún no se ha escaneado
- UsoiMuy nuevo↓ 77/sem · ★ –
Qué puedes hacer con él
Todavía no escribimos un resumen sencillo para este. Abajo están los datos que leímos del registro.
- Conexión: Se ejecuta en tu computadora
- Transporte: stdio
- Categoría: Bases de datos y conjuntos de datos
- Debes completar: GREPTIMEDB_PASSWORD
Instalación
Elige la app de IA que usas y copia la configuración.
Antes de instalar
- Revisiones básicas: 1 de 1 superadas
- Se ejecuta en tu computadora con los permisos de tu usuario (archivos, red, apps).
- Debes completar tú:
GREPTIMEDB_HOST,GREPTIMEDB_PORT,GREPTIMEDB_USER,GREPTIMEDB_PASSWORD,GREPTIMEDB_DATABASE,GREPTIMEDB_TIMEZONE,GREPTIMEDB_POOL_SIZE,GREPTIMEDB_HTTP_PORT,GREPTIMEDB_HTTP_PROTOCOL,GREPTIMEDB_MASK_ENABLED,GREPTIMEDB_MASK_PATTERNS,GREPTIMEDB_AUDIT_ENABLED,GREPTIMEDB_ALLOW_WRITE
Los valores marcados como secretos son llaves de tu cuenta. Nunca los compartas ni los pegues en un chat.
Necesitas
- PyPIuv de Python instalado (para el comando uvx)
¿Qué app usas?
Elige tu app arriba. La recordamos, así que la próxima vez el botón dirá “Instalar en …”.
Abre Claude Desktop → Settings → Developer → Edit Config y pega esto en claude_desktop_config.json
{
"mcpServers": {
"greptimedb": {
"command": "uvx",
"args": [
"greptimedb-mcp-server"
],
"env": {
"GREPTIMEDB_HOST": "your-value",
"GREPTIMEDB_PORT": "your-value",
"GREPTIMEDB_USER": "your-value",
"GREPTIMEDB_PASSWORD": "your-value",
"GREPTIMEDB_DATABASE": "your-value",
"GREPTIMEDB_TIMEZONE": "your-value",
"GREPTIMEDB_POOL_SIZE": "your-value",
"GREPTIMEDB_HTTP_PORT": "your-value",
"GREPTIMEDB_HTTP_PROTOCOL": "your-value",
"GREPTIMEDB_MASK_ENABLED": "your-value",
"GREPTIMEDB_MASK_PATTERNS": "your-value",
"GREPTIMEDB_AUDIT_ENABLED": "your-value",
"GREPTIMEDB_ALLOW_WRITE": "your-value"
}
}
}
}Ejecuta esto en tu terminal
claude mcp add greptimedb --env GREPTIMEDB_HOST=your-value --env GREPTIMEDB_PORT=your-value --env GREPTIMEDB_USER=your-value --env GREPTIMEDB_PASSWORD=your-value --env GREPTIMEDB_DATABASE=your-value --env GREPTIMEDB_TIMEZONE=your-value --env GREPTIMEDB_POOL_SIZE=your-value --env GREPTIMEDB_HTTP_PORT=your-value --env GREPTIMEDB_HTTP_PROTOCOL=your-value --env GREPTIMEDB_MASK_ENABLED=your-value --env GREPTIMEDB_MASK_PATTERNS=your-value --env GREPTIMEDB_AUDIT_ENABLED=your-value --env GREPTIMEDB_ALLOW_WRITE=your-value -- uvx greptimedb-mcp-serverCompleta los valores vacíos antes de ejecutarlo.
O copia la configuración tú
Pégalo en .cursor/mcp.json de tu proyecto, o en ~/.cursor/mcp.json
{
"mcpServers": {
"greptimedb": {
"command": "uvx",
"args": [
"greptimedb-mcp-server"
],
"env": {
"GREPTIMEDB_HOST": "your-value",
"GREPTIMEDB_PORT": "your-value",
"GREPTIMEDB_USER": "your-value",
"GREPTIMEDB_PASSWORD": "your-value",
"GREPTIMEDB_DATABASE": "your-value",
"GREPTIMEDB_TIMEZONE": "your-value",
"GREPTIMEDB_POOL_SIZE": "your-value",
"GREPTIMEDB_HTTP_PORT": "your-value",
"GREPTIMEDB_HTTP_PROTOCOL": "your-value",
"GREPTIMEDB_MASK_ENABLED": "your-value",
"GREPTIMEDB_MASK_PATTERNS": "your-value",
"GREPTIMEDB_AUDIT_ENABLED": "your-value",
"GREPTIMEDB_ALLOW_WRITE": "your-value"
}
}
}
}Tu navegador te pide permiso para abrir la app; luego la app muestra la configuración y te pide confirmar. Los valores de las claves quedan vacíos para que los completes tú.
O copia la configuración tú
Pégalo en .vscode/mcp.json de tu proyecto
{
"servers": {
"greptimedb": {
"type": "stdio",
"command": "uvx",
"args": [
"greptimedb-mcp-server"
],
"env": {
"GREPTIMEDB_HOST": "your-value",
"GREPTIMEDB_PORT": "your-value",
"GREPTIMEDB_USER": "your-value",
"GREPTIMEDB_PASSWORD": "your-value",
"GREPTIMEDB_DATABASE": "your-value",
"GREPTIMEDB_TIMEZONE": "your-value",
"GREPTIMEDB_POOL_SIZE": "your-value",
"GREPTIMEDB_HTTP_PORT": "your-value",
"GREPTIMEDB_HTTP_PROTOCOL": "your-value",
"GREPTIMEDB_MASK_ENABLED": "your-value",
"GREPTIMEDB_MASK_PATTERNS": "your-value",
"GREPTIMEDB_AUDIT_ENABLED": "your-value",
"GREPTIMEDB_ALLOW_WRITE": "your-value"
}
}
}
}Tu navegador te pide permiso para abrir la app; luego la app muestra la configuración y te pide confirmar. Los valores de las claves quedan vacíos para que los completes tú.
Este se ejecuta en tu computadora, y ChatGPT solo puede conectarse a servidores en internet. Elige otra app.
Tu elección se guarda en una cookie en este dispositivo; no necesitas cuenta.
Valores que debes completar
GREPTIMEDB_HOSTenvGreptimeDB host addressGREPTIMEDB_PORTenvGreptimeDB MySQL protocol port (default: 4002)GREPTIMEDB_USERenvDatabase username- Database password
GREPTIMEDB_DATABASEenvDatabase name to connect toGREPTIMEDB_TIMEZONEenvSession timezone (default: UTC)GREPTIMEDB_POOL_SIZEenvConnection pool size (default: 5)GREPTIMEDB_HTTP_PORTenvHTTP API port for pipeline/dashboard management (default: 4000)GREPTIMEDB_HTTP_PROTOCOLenvHTTP protocol for pipeline/dashboard API: http or https (default: http)GREPTIMEDB_MASK_ENABLEDenvEnable sensitive data masking (default: true)GREPTIMEDB_MASK_PATTERNSenvAdditional column name patterns for data masking (comma-separated)GREPTIMEDB_AUDIT_ENABLEDenvEnable audit logging for tool invocations (default: true)GREPTIMEDB_ALLOW_WRITEenvAllow write/destructive SQL (DDL/DML) via execute_sql by skipping the security gate. DANGEROUS: only use on local or test instances (default: false)
Esta configuración se genera a partir de la ficha del creador en el registro. Si el README dice otra cosa, sigue el README.
Qué puede hacer
Se ejecuta en tu computadora; la lista de herramientas aparece en tu app de IA después de instalarlo.
Revisiones básicasi
Revisamos información que cualquiera puede ver; no hemos leído el código. Las revisiones que no aplican no se cuentan. · Revisado el 9 nov 2026
- ✓ Superada
El creador coincide con el repo
El nombre en el registro se verificó con la cuenta de GitHub GreptimeTeam, dueña del repo
- … Aún sin revisar
Sigue en mantenimiento
Todavía no hemos leído este repo en GitHub
- … Aún sin revisar
Tiene licencia
Todavía no hemos leído este repo en GitHub
- – No aplica
El endpoint responde
Este se ejecuta en tu computadora; no hay endpoint en internet
- – No aplica
Inicio de sesión con OAuth
Se ejecuta en tu computadora y usa ajustes locales en su lugar
- … Aún sin revisar
Sin instrucciones ocultas en las descripciones de herramientas
Se ejecuta en tu computadora; solo podemos leer listas de herramientas de endpoints en internet
Comparado con otros en Bases de datos y conjuntos de datosi
- Más estrellas que el 0% de los otros 1153 servidores de esta categoría
- Publicado en el registro más recientemente que el 36% de los otros 1153 servidores de esta categoría
- Revisiones básicas iguales o mejores que el 100% de los otros 1153 servidores de esta categoría
Comparado con todos los servidores activos de esta categoría en el registro. Las estrellas solo cuentan cuando quien lo publica es dueño del repo.
Preguntas frecuentes
¿Es seguro Greptimedb MCP Server?
Superó 1 de 1 revisiones básicas aplicables. No hemos leído el código. Antes de agregar una clave o un token, revisa qué acceso pide el servidor y usa una clave que tenga solo los permisos que necesitas.
¿Qué claves o códigos necesita?
Debes completar: GREPTIMEDB_PASSWORD
¿Se ejecuta en mi computadora o en la nube?
Se ejecuta en tu computadora. Tu app de IA lo inicia cuando hace falta, y los datos no pasan por los servidores del creador (a menos que el propio servidor llame a un servicio en línea).
¿Sigue en mantenimiento?
El repo de GitHub cambió por última vez –, y la última versión (0.6.0) llegó al registro hace 2 meses.
¿Qué apps pueden usarlo?
Las apps compatibles con MCP, como Claude Desktop, Claude Code, Cursor y VS Code. También necesitas Python (uv) en tu computadora.
¿Qué puedo usar en su lugar?
En la misma categoría: Supabase, MongoDB MCP Server, Elasticsearch MCP Server
Alternativas
Servidores de la misma categoría hechos por otros creadores, ordenados por estrellas.
Cómo leer una tarjeta:↓ Descargas por semanai★ Estrellas de GitHubiTres pilares: reseñas · revisiones · usoiActualizado = fecha en que se publicó la última versión en el registroi
README del creador
Abrir el README
Copiado tal cual del repo del creador. PopNx MCP no lo ha revisado ni lo respalda. Se quitaron HTML, imágenes y scripts. Los enlaces llevan fuera de este sitio.
greptimedb-mcp-server
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.
Quick Start
# 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"] } } }
Features
Tools
| 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.
Cross-database queries
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_private.semantic_entities and greptime_private.semantic_relationships, which require GreptimeDB 1.3. At startup the server checks that both views exist, carry the columns it reads, and are readable by the connected account; when they are not, the tool is not offered and the reason is logged. Its time window is required and half-open, [start_time, end_time) over observed_at, and rows are aggregated across the 60-second observation buckets in that window.
Pipeline Management
| Tool | Description |
|---|---|
list_pipelines | List all pipelines or get details of a specific pipeline |
create_pipeline | Create a new pipeline with YAML configuration |
dryrun_pipeline | Test a pipeline with sample data without writing to database |
delete_pipeline | Delete a specific version of a pipeline |
Dashboard Management
| Tool | Description |
|---|---|
list_dashboards | List all Perses dashboard definitions |
create_dashboard | Create or update a Perses dashboard definition |
delete_dashboard | Delete a dashboard definition |
Resources & Prompts
- Resources: Browse tables via
greptime:// /dataURIs - Prompts: Built-in Jinja templates for common tasks —
pipeline_creator,log_pipeline,metrics_analysis,promql_analysis,trace_analysis,table_operation,schema_design_advisor,observability_correlation,ingestion_troubleshooting,query_performance_tuning
For LLM integration and prompt usage, see docs/llm-instructions.md.
These tools cover querying and managing data in an existing GreptimeDB. For deployment, server configuration, write protocols, pipeline syntax, schema design, and performance diagnosis, point the assistant at the GreptimeDB skills index at https://docs.greptime.com/SKILL.md.
Configuration
Environment Variables
GREPTIMEDB_HOST=localhost # Database host
GREPTIMEDB_PORT=4002 # MySQL protocol port (default: 4002) GREPTIMEDB_USER=root # Database user GREPTIMEDB_PASSWORD= # Database password GREPTIMEDB_DATABASE=public # Database name GREPTIMEDB_TIMEZONE=UTC # Session timezone
Optional
GREPTIMEDB_HTTP_PORT=4000 # HTTP API port for pipeline/dashboard management GREPTIMEDB_HTTP_PROTOCOL=http # HTTP protocol (http/https) GREPTIMEDB_POOL_SIZE=5 # Connection pool size GREPTIMEDB_MASK_ENABLED=true # Enable sensitive data masking GREPTIMEDB_MASK_PATTERNS= # Additional patterns (comma-separated) GREPTIMEDB_AUDIT_ENABLED=true # Enable audit logging GREPTIMEDB_ALLOW_WRITE=false # Allow writes: DDL/DML plus pipeline and dashboard changes (DANGEROUS, local/test only) GREPTIMEDB_MAX_RESULT_BYTES=1048576 # Byte budget for a single tool result (1 MiB)
Transport (for HTTP server mode)
GREPTIMEDB_TRANSPORT=stdio # stdio, sse, or streamable-http GREPTIMEDB_LISTEN_HOST=0.0.0.0 # HTTP server bind host GREPTIMEDB_LISTEN_PORT=8080 # HTTP server bind port GREPTIMEDB_ALLOWED_HOSTS= # DNS rebinding protection (comma-separated) GREPTIMEDB_ALLOWED_ORIGINS= # CORS allowed origins (comma-separated)
CLI Arguments
greptimedb-mcp-server \
--host localhost \ --port 4002 \ --database public \ --user root \ --password "" \ --timezone UTC \ --pool-size 5 \ --mask-enabled true \ --allow-write false \ --transport stdio
HTTP Server Mode
For containerized or Kubernetes deployments:
# Streamable HTTP (recommended for production)
greptimedb-mcp-server --transport streamable-http --listen-port 8080
SSE mode (legacy)
greptimedb-mcp-server --transport sse --listen-port 3000
DNS Rebinding Protection
By default, DNS rebinding protection is disabled for compatibility with proxies, gateways, and Kubernetes services. To enable it, use --allowed-hosts:
# Enable DNS rebinding protection with allowed hosts
greptimedb-mcp-server --transport streamable-http \ --allowed-hosts "localhost:*,127.0.0.1:*,my-service.namespace:*"
With custom allowed origins for CORS
greptimedb-mcp-server --transport streamable-http \ --allowed-hosts "my-service.namespace:*" \ --allowed-origins "http://localhost:*,https://my-app.example.com"
Or via environment variables
GREPTIMEDB_ALLOWED_HOSTS="localhost:*,my-service.namespace:*" \ GREPTIMEDB_ALLOWED_ORIGINS="http://localhost:*" \ greptimedb-mcp-server --transport streamable-http
If you encounter 421 Invalid Host Header errors, either disable protection (default) or add your host to the allowed list.
Security
Read-Only Database User (Recommended)
Create a read-only user in GreptimeDB using static user provider:
mcp_readonly:readonly=your_secure_password
Application-Level Security Gate
All queries go through a security gate that:
- Blocks: DROP, DELETE, TRUNCATE, UPDATE, INSERT, ALTER, CREATE, GRANT, REVOKE, EXEC, LOAD, COPY
- Blocks: Encoded bypass attempts (hex, UNHEX, CHAR)
- Allows: SELECT, SHOW, DESCRIBE, TQL, EXPLAIN, UNION
Write Mode (Disabled by Default)
The server is read-only by default. Write mode enables every operation that changes stored state:
- destructive SQL (DDL/DML such as
CREATE,DROP,ALTER,INSERT,UPDATE,DELETE) throughexecute_sql create_pipeline,delete_pipeline,create_dashboard,delete_dashboard
# Environment variable
GREPTIMEDB_ALLOW_WRITE=true greptimedb-mcp-server
Or CLI argument
greptimedb-mcp-server --allow-write true
When enabled, the security gate is bypassed for execute_sql, and the server logs a warning on startup. With write mode off, those four tools return an error without contacting the server; list_pipelines, list_dashboards and dryrun_pipeline are read-only and stay available.
⚠️ Danger: This lets an AI assistant run destructive statements against your
database. Never enable it against production data. Combine with a read-only
database user if you only need read access.
Data Masking
Sensitive columns are automatically masked (******) based on column name patterns:
- Authentication:
password,secret,token,api_key,credential - Financial:
credit_card,cvv,bank_account - Personal:
ssn,id_card,passport
Configure with --mask-patterns phone,email to add custom patterns.
Audit Logging
All tool invocations are logged:
2025-12-10 10:30:45 - greptimedb_mcp_server.audit - INFO - [AUDIT] execute_sql | query="SELECT * FROM cpu LIMIT 10" | success=True | duration_ms=45.2
Disable with --audit-enabled false.
Development
# Clone and setup
git clone https://github.com/GreptimeTeam/greptimedb-mcp-server.git cd greptimedb-mcp-server uv venv && source .venv/bin/activate uv sync
Run tests
pytest
Format & lint
uv run black . uv run flake8 src
Debug with MCP Inspector
npx @modelcontextprotocol/inspector uv --directory . run -m greptimedb_mcp_server.server
License
MIT License - see LICENSE.md.
Acknowledgement
Inspired by: