starrocks
MCP Server for StarRocks database intelligent diagnostics and performance analysis
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)
-
Clone the repository git clone https://github.com/tracymacding/starrocks-mcp-server.git cd starrocks-mcp-server
-
Install dependencies npm install
-
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
-
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
-
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
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.