Gururaj Mahajan
06/29/2026, 9:45 AMRocky
06/29/2026, 9:46 AMSELECT, DDL, and DML queries directly from an AI interface.
* Database Exploration: List databases and tables, and retrieve schemas using the starrocks:// resource.
* Intelligent Overviews: Tools like table_overview and db_overview provide summaries, row counts, and sample data to give the AI better context.
* System Insights: Access internal StarRocks metrics via the proc:// resource.
* Data Visualization: Supports generating charts and visualizations from query results.
Quick Start
If you have uv installed, you can run it immediately without manual installation:
bash
uv run mcp-server-starrocks
Or install it via pip:
bash
pip install mcp-server-starrocks
Configuration
To connect it to your instance, you typically configure the following environment variables:
* STARROCKS_HOST
* STARROCKS_PORT (MySQL protocol port, usually 9030)
* STARROCKS_USER
* STARROCKS_PASSWORD
This MCP server acts as a bridge, turning StarRocks into a "data-savvy" backend for AI agents.
References
• administration/management/proc_profile.md
• loading/loading_introduction/loading_concepts.md
• administration/management/BE_configuration.md
• developers/code-style-guides/protobuf-guides.md
• administration/management/FE_configuration.md
• developers/type_checker_xml_configuration.mdGururaj Mahajan
06/29/2026, 9:46 AMRocky
06/29/2026, 9:46 AMcurl -LsSf <https://astral.sh/uv/install.sh> | sh.
2. Configure Claude Desktop
You need to add the StarRocks server to your Claude Desktop configuration file.
* File Location:
* macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
* Windows: %APPDATA%\Claude\claude_desktop_config.json
* Configuration:
Open the file and add the starrocks entry under mcpServers. Replace the placeholder credentials with your actual StarRocks connection details:
json
{
"mcpServers": {
"starrocks": {
"command": "uvx",
"args": ["mcp-server-starrocks"],
"env": {
"STARROCKS_URL": "root:your_password@your_host:9030/your_database"
}
}
}
}
3. Restart Claude
Fully quit and restart Claude Desktop. You should see a hammer icon (tools) in the input area, indicating the StarRocks MCP server is connected.
4. What you can ask
Once connected, you can ask Claude questions like:
* "Show me the schema of the orders table."
* "What are the top 5 customers by revenue this month?" (Claude will write and execute the SQL for you).
* "Explain the performance of this query and suggest optimizations."
* "Create a bar chart showing daily active users from the logs table."
Connection Details (STARROCKS_URL)
The URL follows the standard format:
user:password@host:port/database
* Port: Use the MySQL protocol port (default 9030).
* SSL: If your instance requires SSL, you can append ?ssl_ca=/path/to/cert to the URL.
For more advanced configurations (like using Arrow Flight SQL for faster data transfer), check the official GitHub repository.
References
• administration/management/proc_profile.md
• loading/loading_introduction/loading_concepts.md
• administration/management/BE_configuration.md
• administration/management/FE_configuration.md
• developers/type_checker_xml_configuration.md
• developers/code-style-guides/protobuf-guides.md
rocks).Gururaj Mahajan
06/29/2026, 9:47 AMRocky
06/29/2026, 9:47 AMbash
pip install mcp-server-starrocks
2. Enable High-Performance Connection:
When configuring your claude_desktop_config.json, use the STARROCKS_USE_FLIGHTSQL environment variable. This uses the Arrow Flight SQL protocol, which is much faster for transferring the large amounts of metadata needed for deep performance analysis.
json
"env": {
"STARROCKS_URL": "user:pass@host:9030/db",
"STARROCKS_USE_FLIGHTSQL": "true"
}
### How I can help you improve performance once connected:
Once you've connected me via the MCP server, you can give me commands like:
* "Analyze this slow query": I can run EXPLAIN or EXPLAIN ANALYZE on your SQL, look at the execution plan, and tell you if you're missing indexes (like Bloom Filters) or if your data distribution (Bucketing/Partitioning) is causing a bottleneck.
* "Check my system configuration": I can query your global variables (using show variables) to see if enable_pipeline_engine is on or if your memory limits are set correctly for your hardware.
* "Inspect table health": I can use the table_overview tool to check for data skew (where one BE has way more data than others) or if your tablet count is too high/low.
* "Monitor BE Health": I can access the proc:// resource to see real-time backend metrics like memory usage and CPU load to see if your cluster is undersized.
### If you cannot use the MCP server:
If you can't install the MCP server due to security policies, you can still get performance help from me by pasting the following into our chat:
1. The output of SHOW CREATE TABLE your_table_name;
2. The output of EXPLAIN ANALYZE your_query; (for StarRocks v3.1+) or just EXPLAIN your_query;.
3. Your cluster version (SELECT druid_version();).
With that information, I can manually identify bottlenecks and suggest optimizations.
## References
- [administration/management/proc_profile.md](https://docs.starrocks.io/docs/administration/management/proc_profile)
- [loading/loading_introduction/loading_concepts.md](https://docs.starrocks.io/docs/loading/loading_introduction/loading_concepts)
- [administration/management/BE_configuration.md](https://docs.starrocks.io/docs/administration/management/BE_configuration)
- [administration/management/FE_configuration.md](https://docs.starrocks.io/docs/administration/management/FE_configuration)
- [deployment/post_deployment_setup.md](https://docs.starrocks.io/docs/deployment/post_deployment_setup)
- [unloading/arrow_flight.md](https://docs.starrocks.io/docs/unloading/arrow_flight)
- [developers/type_checker_xml_configuration.md](https://docs.starrocks.io/docs/developers/type_checker_xml_configuration)
- [developers/code-style-guides/protobuf-guides.md](https://docs.starrocks.io/docs/developers/code-style-guides/protobuf-guides)
## References
- [deployment/post_deployment_setup.md](https://docs.starrocks.io/docs/deployment/post_deployment_setup)
- [unloading/arrow_flight.md](https://docs.starrocks.io/docs/unloading/arrow_flight)