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.
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 port (defaults to 4002 if not specified)
GREPTIMEDB_USER=root
GREPTIMEDB_PASSWORD=
GREPTIMEDB_DATABASE=public
Or via command-line args:
--hostthe database host--portthe database port--userthe database username--passwordthe database password--databasethe database name
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"
}
}
}
}
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 `venvScriptsactivate` 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:
- ktanaka101/mcp-server-duckdb
- designcomputer/mysql_mcp_server
- mikeskarl/mcp-prompt-templates
Thanks!
GreptimeDB MCP Server
Project Details
- GreptimeTeam/greptimedb-mcp-server
- MIT License
- Last Updated: 4/19/2025
Recomended MCP Servers
Professional Gemini API integration for Claude and all MCP-compatible hosts with intelligent model selection and advanced file handling...
An mcp server that auto commits changes and creates commit message in the form of conventional commits (https://www.conventionalcommits.org/en/v1.0.0/)
The Logfire MCP Server is here! :tada:
MCP for https://votars.ai
An MCP server that provides safe, read-only access to SQLite databases through Model Context Protocol (MCP). This server...
A Model Context Protocol (MCP) server that bridges Video & Audio content with Large Language Models using yt-dlp.
A type-safe solution to remote MCP communication, enabling effortless integration for centralized management of Model Context.
This is an MCP (Model Context Protocol) server that connects your Limitless Pendant data to AI tools like...
Wanaku MCP Router
A Model Context Protocol (MCP) server for interacting with DaVinci Resolve and Fusion
MCP server for interacting with Neon Management API and databases





