Get the FREE Ultimate OpenClaw Setup Guide →

starrocks

MCP Server for StarRocks database intelligent diagnostics and performance analysis

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tracymacding-starrocks-mcp-server node /path/to/starrocks-mcp-server/starrocks-mcp.js \
  --env SR_HOST="localhost" \
  --env SR_PORT="9030" \
  --env SR_USER="root" \
  --env CENTRAL_API="http://127.0.0.1:3002" \
  --env SR_PASSWORD="" \
  --env PROMETHEUS_HOST="localhost" \
  --env PROMETHEUS_PORT="9092" \
  --env CENTRAL_API_TOKEN="your_api_token_here" \
  --env PROMETHEUS_PROTOCOL="http"

How to use

StarRocks MCP Server provides MCP protocol compatibility to connect AI clients with a StarRocks database for intelligent diagnostics and analysis. It exposes a MCP-compliant server that can be driven by clients like Claude Code CLI, Claude OpenCode configurations, or other MCP-enabled tools. The server establishes a MySQL-compatible connection to StarRocks, executes SQL queries when requested by tools, and returns structured diagnostic results and recommendations. Users can configure environment-based access to the StarRocks instance and optionally connect to StarRocks Expert as a central analytics backend. To use, run the MCP server script (starrocks-mcp.js) via Node.js with your StarRocks connection details, then connect through an MCP client by listing available tools and invoking the StarRocks diagnostic tools.

How to install

Prerequisites:

  • Node.js >= 18.x
  • Access to a StarRocks database instance
  • Optional: StarRocks Expert center service and DeepSeek API (for enhanced analysis)
  1. Clone the repository git clone https://github.com/tracymacding/starrocks-mcp-server.git cd starrocks-mcp-server

  2. Install dependencies npm install

  3. Run the installation script (recommended) ./install-starrocks-mcp.sh

    The script will:

    • Create ~/.starrocks-mcp/ directory
    • Copy necessary files
    • Install npm dependencies
    • Generate a configuration template
  4. Manually configure and start the MCP server (example) export SR_HOST=localhost export SR_PORT=9030 export SR_USER=root export SR_PASSWORD= export CENTRAL_API=http://127.0.0.1:3002 export CENTRAL_API_TOKEN=your_token export PROMETHEUS_PROTOCOL=http export PROMETHEUS_HOST=localhost export PROMETHEUS_PORT=9092

    node starrocks-mcp-server/starrocks-mcp.js

  5. Validate MCP server readiness

    • Use a MCP client to list tools and ensure the StarRocks diagnostic tools are available
    • Run a sample diagnostic query to verify SQL execution against StarRocks

Additional notes

Tips and considerations:

  • Use environment variables to configure SR_HOST, SR_PORT, SR_USER, SR_PASSWORD, and CENTRAL_API for centralized analytics.
  • If using Claude Code or similar clients, ensure the MCP server path is correctly referenced in the client configuration (e.g., node /path/to/starrocks-mcp-server/starrocks-mcp.js).
  • Ensure network access between the MCP server and the StarRocks instance (1393x ports may be required depending on your setup).
  • If you enable DeepSeek or other AI backends, configure their API keys and endpoints as described in the README to unlock enhanced capabilities.
  • For troubleshooting, verify config file paths and that the MCP server process starts without errors (check logs for connection failures or authentication issues).
  • The recommended MCP server name in client configs is starrocks-expert; you can rename as needed but keep consistent in both server and client config.

Related MCP Servers

Sponsor this space

Reach thousands of developers