The greptimedb-mcp-server is a Model Context Protocol (MCP) server for GreptimeDB that allows AI assistants to query and analyze data using SQL and TQL with built-in security features.
From the registry: Query and analyze GreptimeDB metrics, logs and traces via SQL, TQL and RANGE queries.
$ pip install greptimedb-mcp-serverhttps://pypi.org/project/greptimedb-mcp-server/Please install the `greptimedb-mcp-server` MCP server into my current AI client (that's you).
Required prerequisites (do these first if not already done):
- **Install greptimedb-mcp-server** — Install the Python package via pip Run: `pip install greptimedb-mcp-server` (https://pypi.org/project/greptimedb-mcp-server/)
- **Running GreptimeDB** — A reachable GreptimeDB instance (https://greptime.com/)
Canonical MCP server config (stdio transport):
- command: `greptimedb-mcp-server`
- args: ["--host","localhost","--database","public"]
- optional environment variables:
- `GREPTIMEDB_HOST`: Database host (example: `localhost`)
- `GREPTIMEDB_PORT`: MySQL protocol port (example: `4002`)
- `GREPTIMEDB_USER`: Database user (example: `root`)
- `GREPTIMEDB_PASSWORD`: Database password (example: `<your-db-password>`)
- `GREPTIMEDB_DATABASE`: Database name (example: `public`)
- `GREPTIMEDB_TIMEZONE`: Session timezone (example: `UTC`)
- `GREPTIMEDB_HTTP_PORT`: HTTP API port for pipeline/dashboard management (example: `4000`)
- `GREPTIMEDB_HTTP_PROTOCOL`: HTTP protocol (example: `http`)
- `GREPTIMEDB_POOL_SIZE`: Connection pool size (example: `5`)
- `GREPTIMEDB_MASK_ENABLED`: Enable sensitive data masking (example: `true`)
- `GREPTIMEDB_AUDIT_ENABLED`: Enable audit logging (example: `true`)
- `GREPTIMEDB_TRANSPORT`: Transport mode: stdio, sse, or streamable-http (example: `stdio`)
Note: Supports SSE and streamable-http transports via --transport flag. Read-only by default with an application-level security gate.
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.GREPTIMEDB_HOSTrequiredDatabase hostGREPTIMEDB_USERrequiredDatabase userGREPTIMEDB_PASSWORDrequiredDatabase passwordGREPTIMEDB_DATABASErequiredDatabase nameMinimal, token-efficient Database MCP Server for PostgreSQL, MySQL, SQL Server, SQLite, MariaDB