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
Configuration
Set the following environment variables:
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.
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
License
MIT License - see LICENSE.md file for details.
Contribute
Related MCP server: MCP Toolkit
Prerequisites
Python with
uvpackage managerGreptimeDB installation
MCP server dependencies
Development
Use MCP Inspector for debugging:
Acknowledgement
This library's implementation was inspired by the following two repositories and incorporates their code, for which we express our gratitude:
Thanks!