greptimedb-mcp-server
A Model Context Protocol (MCP) server for secure, structured AI access to GreptimeDB.
Key Features
Use Cases
README
greptimedb-mcp-server
A Model Context Protocol (MCP) server implementation for GreptimeDB.
This server provides AI assistants with a secure and structured way to explore and analyze databases. It enables them to list tables, read data, and execute SQL queries through a controlled interface, ensuring responsible database access.
Project Status
This is an experimental project that is still under development. Data security and privacy issues have not been specifically addressed, so please use it with caution.
Capabilities
list_resourcesto list tablesread_resourceto read table datalist_toolsto list toolscall_toolto execute an SQLlist_promptsto list promptsget_promptto get the prompt by name
Installation
pip install greptimedb-mcp-server
Configuration
Set the following environment variables:
GREPTIMEDB_HOST=localhost # Database host
GREPTIMEDB_PORT=4002 # Optional: Database MySQL port (defaults to 4002 if not specified)
GREPTIMEDB_USER=root
GREPTIMEDB_PASSWORD=
GREPTIMEDB_DATABASE=public
GREPTIMEDB_TIMEZONE=UTC
Or via command-line args:
--hostthe database host,localhostby default,--portthe database port, must be MySQL protocol port,4002by default,--userthe database username, empty by default,--passwordthe database password, empty by default,--databasethe database name,publicby default.--timezonethe session time zone, empty by default(using server default time zone).
Usage
Claude Desktop Integration
Configure the MCP server in Claude Desktop's configuration file:
MacOS
Location: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows
Location: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"greptimedb": {
"command": "uv",
"args": [
"--directory",
"/path/to/greptimedb-mcp-server",
"run",
"-m",
"greptimedb_mcp_server.server"
],
"env": {
"GREPTIMEDB_HOST": "localhost",
"GREPTIMEDB_PORT": "4002",
"GREPTIMEDB_USER": "root",
"GREPTIMEDB_PASSWORD": "",
"GREPTIMEDB_DATABASE": "public",
"GREPTIMEDB_TIMEZONE": ""
}
}
}
}
License
MIT License - see LICENSE.md file for details.
Contribute
Prerequisites
- Python with
uvpackage manager - GreptimeDB installation
- MCP server dependencies
Development
# Clone the repository
git clone https://github.com/GreptimeTeam/greptimedb-mcp-server.git
cd greptimedb-mcp-server
# Create virtual environment
uv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
# Install development dependencies
uv sync
# Run tests
pytest
Use MCP Inspector for debugging:
npx @modelcontextprotocol/inspector uv \
--directory \
/path/to/greptimedb-mcp-server \
run \
-m \
greptimedb_mcp_server.server
Acknowledgement
This library's implementation was inspired by the following two repositories and incorporates their code, for which we express our gratitude:
Thanks!
Star History
Repository Owner
Organization
Repository Details
Programming Languages
Tags
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
Multi-Database MCP Server (by Legion AI)
Unified multi-database access and AI interaction server with MCP integration.
Multi-Database MCP Server enables seamless access and querying of diverse databases via a unified API, with native support for the Model Context Protocol (MCP). It supports popular databases such as PostgreSQL, MySQL, SQL Server, and more, and is built for integration with AI assistants and agents. Leveraging the MCP Python SDK, it exposes databases as resources, tools, and prompts for intelligent, context-aware interactions, while delivering zero-configuration schema discovery and secure credential management.
- ⭐ 76
- MCP
- TheRaLabs/legion-mcp
mcp-server-duckdb
A Model Context Protocol server enabling SQL access to DuckDB databases.
Implements a Model Context Protocol (MCP) server for DuckDB, allowing structured database interaction via MCP-compliant tools and language models. Offers a unified query tool for executing any SQL statement, with support for read-only mode to ensure data integrity. Flexible configuration options include database path specification and connection management. Easily integrable with applications like Claude Desktop for enhanced local data analysis through LLMs.
- ⭐ 171
- MCP
- ktanaka101/mcp-server-duckdb
MCP 数据库工具 (MCP Database Utilities)
A secure bridge enabling AI systems safe, read-only access to multiple databases via unified configuration.
MCP Database Utilities provides a secure, standardized service for AI systems to access and analyze databases like SQLite, MySQL, and PostgreSQL using a unified YAML-based configuration. It enforces strict read-only operations, local processing, and credential protection to ensure data privacy and integrity. The tool is suitable for entities focused on data privacy and minimizes risks by isolating database connections and masking sensitive data. Designed for easy integration, it supports multiple installation options and advanced capabilities such as schema analysis and table browsing.
- ⭐ 85
- MCP
- donghao1393/mcp-dbutils
InfluxDB MCP Server
Expose InfluxDB data and tools to AI models via the Model Context Protocol.
InfluxDB MCP Server is a Model Context Protocol (MCP) server that enables AI models to access, write, and manage time-series data stored in InfluxDB instances through a standardized API. It provides resources for organizations, buckets, and measurements, as well as tools for running Flux queries, writing data, and managing InfluxDB objects. The server includes prompt templates for common query operations and supports seamless integration with AI platforms like Claude Desktop. Easy installation options are offered via Smithery, npx, npm, or from source.
- ⭐ 27
- MCP
- idoru/influxdb-mcp-server
SQLite Explorer MCP Server
Secure, read-only access to SQLite databases for LLMs via the Model Context Protocol.
SQLite Explorer MCP Server provides a safe, read-only interface to SQLite databases using the Model Context Protocol (MCP). Built with the FastMCP framework, it enables large language models to explore, query, and retrieve database schema information with robust safety and validation mechanisms. The server exposes structured tools such as read_query, list_tables, and describe_table, ensuring secure and reliable access to database contents. Designed for integration with platforms like Claude Desktop and Cline VSCode Plugin.
- ⭐ 93
- MCP
- hannesrudolph/sqlite-explorer-fastmcp-mcp-server
Hydrolix MCP Server
MCP server for secure, efficient SQL access to Hydrolix clusters.
Hydrolix MCP Server provides a Model Context Protocol (MCP) interface for executing SQL queries, listing databases, and listing tables on Hydrolix clusters. It ensures safe, read-only data access and includes a standardized health-check endpoint. The server integrates easily with various MCP-compatible clients, supporting multiple authentication methods using either credentials or service account tokens.
- ⭐ 5
- MCP
- hydrolix/mcp-hydrolix
Didn't find tool you were looking for?