greptimedb
A Model Context Protocol (MCP) server for GreptimeDB
claude mcp add --transport stdio greptimeteam-greptimedb-mcp-server python -m greptimedb_mcp_server.server --host localhost --database public \ --env GREPTIMEDB_HOST="Database host (default: localhost)" \ --env GREPTIMEDB_PORT="Database port (default: 4002)" \ --env GREPTIMEDB_USER="Database user" \ --env GREPTIMEDB_DATABASE="Database name (default: public)" \ --env GREPTIMEDB_PASSWORD="Database password" \ --env GREPTIMEDB_TIMEZONE="Session timezone (default: UTC)"
How to use
greptimedb-mcp-server is a Model Context Protocol (MCP) server that provides a programmable interface to query and analyze a GreptimeDB instance. It exposes tools for executing SQL and time-series queries, inspecting schemas, and managing data pipelines, all with built-in security features such as read-only access and data masking. Clients connect to the MCP server over the MySQL-compatible protocol (port 4002 by default) and can send commands to run queries, describe tables, or manage pipelines through the toolset described in the server documentation. The server also offers an HTTP API mode for pipeline management in containerized deployments and supports prompt templates for common tasks via the built-in Resources & Prompts catalog.
How to install
Prerequisites:\n- Python 3.8+ (or compatible runtime)\n- pip (Python package manager)\n\nStep-by-step:\n1) Create and (optional) use a virtual environment:\n - python -m venv venv\n - source venv/bin/activate # Linux/macOS\n - venv\Scripts\activate # Windows\n2) Install the MCP server package:\n - pip install greptimedb-mcp-server\n3) Verify installation:\n - greptimedb-mcp-server --help\n4) Run the server (default host: localhost, database: public):\n - greptimedb-mcp-server --host localhost --database public\n5) To run via module (alternative invocation):\n - python -m greptimedb_mcp_server.server --host localhost --database public\n
Additional notes
Notes and tips:\n- The server defaults to host localhost and database public if not specified. Adjust GREPTIMEDB_HOST and related environment variables as needed in production.\n- HTTP server mode (streamable-http) is available for containerized deployments and requires mcp>=1.8.0.\n- Use the provided tools to enforce security policies: read-only users, data masking, and an audit log for tool invocations.\n- If you encounter DNS rebinding or host header issues in HTTP modes, enable allowed hosts/origins via the CLI or environment variables as described in the README.\n- For local development, you can use the MCP Inspector to connect to the server and inspect the server’s behavior.
Related MCP Servers
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
mcp-yfinance
Real-time stock API with Python, MCP server example, yfinance stock analysis dashboard
pfsense
pfSense MCP Server enables security administrators to manage their pfSense firewalls using natural language through AI assistants like Claude Desktop. Simply ask "Show me blocked IPs" or "Run a PCI compliance check" instead of navigating complex interfaces. Supports REST/XML-RPC/SSH connections, and includes built-in complian
cloudwatch-logs
MCP server from serkanh/cloudwatch-logs-mcp
servicenow-api
ServiceNow MCP Server and API Wrapper
the -company
TheMCPCompany: Creating General-purpose Agents with Task-specific Tools