Skip to content
VS Code

greptimedb mcp server for VS Code

io.github.greptimeteam/greptimedb-mcp-server

Query GreptimeDB metrics, logs and traces with SQL, TQL and RANGE. Manage pipelines and dashboards.

client:VS Code transport:stdio runtime:pypi

Install greptimedb mcp server in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "greptimedb-host",
      "description": "GREPTIMEDB_HOST",
      "password": true
    },
    {
      "type": "promptString",
      "id": "greptimedb-port",
      "description": "GREPTIMEDB_PORT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "greptimedb-user",
      "description": "GREPTIMEDB_USER",
      "password": true
    },
    {
      "type": "promptString",
      "id": "greptimedb-password",
      "description": "GREPTIMEDB_PASSWORD",
      "password": true
    },
    {
      "type": "promptString",
      "id": "greptimedb-database",
      "description": "GREPTIMEDB_DATABASE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "greptimedb-timezone",
      "description": "GREPTIMEDB_TIMEZONE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "greptimedb-pool-size",
      "description": "GREPTIMEDB_POOL_SIZE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "greptimedb-http-port",
      "description": "GREPTIMEDB_HTTP_PORT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "greptimedb-http-protocol",
      "description": "GREPTIMEDB_HTTP_PROTOCOL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "greptimedb-mask-enabled",
      "description": "GREPTIMEDB_MASK_ENABLED",
      "password": true
    },
    {
      "type": "promptString",
      "id": "greptimedb-mask-patterns",
      "description": "GREPTIMEDB_MASK_PATTERNS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "greptimedb-audit-enabled",
      "description": "GREPTIMEDB_AUDIT_ENABLED",
      "password": true
    },
    {
      "type": "promptString",
      "id": "greptimedb-allow-write",
      "description": "GREPTIMEDB_ALLOW_WRITE",
      "password": true
    }
  ],
  "servers": {
    "greptimedb-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "greptimedb-mcp-server"
      ],
      "env": {
        "GREPTIMEDB_HOST": "${input:greptimedb-host}",
        "GREPTIMEDB_PORT": "${input:greptimedb-port}",
        "GREPTIMEDB_USER": "${input:greptimedb-user}",
        "GREPTIMEDB_PASSWORD": "${input:greptimedb-password}",
        "GREPTIMEDB_DATABASE": "${input:greptimedb-database}",
        "GREPTIMEDB_TIMEZONE": "${input:greptimedb-timezone}",
        "GREPTIMEDB_POOL_SIZE": "${input:greptimedb-pool-size}",
        "GREPTIMEDB_HTTP_PORT": "${input:greptimedb-http-port}",
        "GREPTIMEDB_HTTP_PROTOCOL": "${input:greptimedb-http-protocol}",
        "GREPTIMEDB_MASK_ENABLED": "${input:greptimedb-mask-enabled}",
        "GREPTIMEDB_MASK_PATTERNS": "${input:greptimedb-mask-patterns}",
        "GREPTIMEDB_AUDIT_ENABLED": "${input:greptimedb-audit-enabled}",
        "GREPTIMEDB_ALLOW_WRITE": "${input:greptimedb-allow-write}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

greptimedb mcp server in other clients