Loading...

GreptimeDB MCP server enables AI assistants to query and analyze time-series data in GreptimeDB using SQL/TQL, with security features like read-only enforcement and data masking.
Boost this tool
Subscribe to listing upgrades or segmented pushes.
GreptimeDB MCP server enables AI assistants to query and analyze time-series data in GreptimeDB using SQL/TQL, with security features like read-only enforcement and data masking.
The GreptimeDB MCP server provides reasonable security controls, especially when configured with a read-only user and data masking enabled. However, it's crucial to properly configure allowed hosts to prevent DNS rebinding attacks and to be aware of the limitations of pattern-based data masking.
Performance depends on the complexity of the queries and the size of the dataset. Consider optimizing SQL queries and using appropriate indexes for large tables.
Cost depends on the usage of GreptimeDB resources, including storage, compute, and network bandwidth. Complex queries and large datasets can increase costs.
pip install greptimedb-mcp-server{
"mcpServers": {
"greptimedb": {
"command": "greptimedb-mcp-server",
"args": ["--host", "localhost", "--database", "public"]
}
}
}GREPTIMEDB_HOSTGREPTIMEDB_PORTGREPTIMEDB_USERGREPTIMEDB_PASSWORDGREPTIMEDB_DATABASEGREPTIMEDB_TIMEZONEexecute_sqlExecutes SQL queries against the GreptimeDB database.
Can potentially modify data depending on the SQL query and user permissions.
execute_tqlExecutes TQL (PromQL-compatible) queries for time-series data analysis.
Read-only access to time-series data.
query_rangeExecutes time-window aggregation queries with RANGE/ALIGN syntax.
Read-only access to aggregated time-series data.
describe_tableRetrieves the schema of a specified table.
Provides read-only metadata about the table structure.
explain_queryAnalyzes the execution plan of a SQL or TQL query.
Provides read-only analysis of query execution.
health_checkChecks the database connection status and server version.
Provides read-only status information.
list_pipelinesLists all pipelines or gets details of a specific pipeline.
Provides read-only access to pipeline metadata.
create_pipelineCreates a new pipeline with YAML configuration.
Creates a new data pipeline, which can potentially impact data ingestion and processing.
dryrun_pipelineTests a pipeline with sample data without writing to the database.
Tests a pipeline without making any persistent changes.
delete_pipelineDeletes a specific version of a pipeline.
Deletes a pipeline, which can disrupt data ingestion and processing.
Environment Variable
hybrid
The GreptimeDB MCP server provides reasonable security controls, especially when configured with a read-only user and data masking enabled. However, it's crucial to properly configure allowed hosts to prevent DNS rebinding attacks and to be aware of the limitations of pattern-based data masking.
Autonomy level depends on the configured permissions and the specific tools used. Read-only access significantly reduces the risk of unintended consequences.
Production Tip
Use a dedicated read-only user for the MCP server to minimize the risk of accidental data modification or deletion.
Use a read-only database user, enable data masking, and configure allowed hosts to prevent DNS rebinding attacks.
Enable the `mask-enabled` flag and configure the `mask-patterns` option with a comma-separated list of column name patterns.
DROP, DELETE, TRUNCATE, UPDATE, INSERT, ALTER, CREATE, GRANT, REVOKE, EXEC, LOAD, and COPY commands are blocked.
Enable audit logging to track all tool invocations.
It enables DNS rebinding protection by specifying a list of allowed hostnames and ports.
Yes, the server provides tools for listing, creating, dry-running, and deleting data pipelines.
TQL is a PromQL-compatible query language for time-series data analysis in GreptimeDB.