A Model Context Protocol (MCP) server implementation for GreptimeDB. It lets AI assistants list tables, read data and execute SQL against a GreptimeDB instance through a controlled MCP interface.
https://github.com/GreptimeTeam/greptimedb-mcp-serverStop writing the same time-series queries over and over. This MCP server connects your AI assistant directly to GreptimeDB, turning complex temporal data analysis into natural language conversations.
You know the drill. Another dashboard request comes in asking for "average response times by service over the last 24 hours, grouped by 5-minute windows." You could write that query in your sleep, but you still need to:
Now imagine just asking Claude: "Show me average response times by service over the last 24 hours" and getting back both the query and the results instantly.
Direct Database Access for AI: Your AI assistant can explore your GreptimeDB instance, understand table structures, and execute queries without you writing a single line of SQL.
Time-Series Domain Knowledge: Built-in understanding of time-series patterns means better query suggestions and more relevant analysis for metrics, events, and IoT data.
Secure Query Interface: Controlled access through MCP protocol - your AI can read and analyze but follows the permissions you set.
Incident Response: "What was the error rate spike pattern last Tuesday between 2-4 PM?" Your AI assistant pulls the data, identifies the pattern, and suggests related metrics to investigate.
Performance Analysis: "Compare database connection pool utilization this week vs last week" - get instant analysis with proper time alignment and statistical context.
IoT Data Exploration: "Show me temperature sensor readings that exceeded 35°C in the warehouse, grouped by hour" - perfect for ad-hoc analysis without building custom dashboards.
Capacity Planning: "What's the 95th percentile CPU usage trend over the past month?" - get both the query and the insight in one conversation.
Install and connect to your GreptimeDB instance:
pip install greptimedb-mcp-server
Configure in Claude Desktop (or any MCP-compatible AI):
{
"mcpServers": {
"greptimedb": {
"command": "uv",
"args": ["run", "-m", "greptimedb_mcp_server.server"],
"env": {
"GREPTIMEDB_HOST": "localhost",
"GREPTIMEDB_PORT": "4002",
"GREPTIMEDB_USER": "root",
"GREPTIMEDB_DATABASE": "public"
}
}
}
}
That's it. Your AI can now explore tables, read data, and execute SQL queries against your time-series database.
Time-series analysis shouldn't require remembering syntax for window functions, timezone handling, and aggregation patterns. This MCP server handles the database interaction complexity while your AI assistant focuses on understanding what you actually need.
Perfect for developers working with:
The server provides controlled access - your AI can explore and analyze but only within the permissions you configure. No direct database credentials in your AI tools, no complex API integrations to maintain.
Ready to let AI handle your time-series queries? The setup takes 5 minutes and works with any MCP-compatible assistant.