Interact with StarRocks
Starrocks mcp server connects StarRocks to AI assistants that speak the Model Context Protocol. Interact with StarRocks.
The StarRocks MCP Server acts as a bridge between AI assistants and StarRocks databases. It allows for direct SQL execution, database exploration, data visualization via charts, and retrieving detailed schema/data overviews without requiring complex client-side setup.
Once connected, the assistant can call these 10 tools directly:
read_query — Description: Execute a SELECT query or other commands that return a ResultSet (e.g., SHOW, DESCRIBE). Optionally write the full result to a local fileInput — **Output — ** Without output_file, text content containing the query results in CSV-like format with a header row and row count summary. With output_file, a short summarywrite_query — Description: Execute a DDL (CREATE, ALTER, DROP), DML (INSERT, UPDATE, DELETE), or other StarRocks command that does not return a ResultSetanalyze_query — Description: Analyze a query and get analyze result using query profile or explain analyzetop_hot_tables — Description: Get top hot tables by audit-log visit count. It joins information_schema.tables with starrocks_audit_db__.starrocks_audit_tbl__, excludes roottop_bad_tables — Description: Get top bad tables by table health score, following Star Management Studio's top-bad-tables logic. It reuses the table-health calculationquery_and_plotly_chart — Description: Executes a SQL query, loads the results into a Pandas DataFrame, and generates a Plotly chart using a provided Python expression. Designed fortable_overview — Description: Get an overview of a specific table: columns (from DESCRIBE), total row count, and sample rows (LIMIT 3). Uses an in-memory cache unlessTools — The Tools tool exposed by this serverSetup follows the standard MCP pattern: clone or install the server, then register it in your client's configuration file and restart the client. The configuration snippets on this page cover Claude Desktop, Claude Code and Cursor.
Before the server will start you need to supply 8 environment variables: STARROCKS_HOST, STARROCKS_PORT, STARROCKS_USER, STARROCKS_PASSWORD, STARROCKS_DB, STARROCKS_URL, STARROCKS_SSL_CA, STARROCKS_SSL_VERIFY_CERT. Keep credentials in your client's env block or a secrets manager rather than committing them.
localhost:9030 over the MySQL protocol. - uv — a fast Python package and project manager (a modern replacement for pip + virtualenv) from Astral. This project uses uv to resolve dependencies, create the virtual environment, and launch theDatabase servers turn schema archaeology and ad-hoc reporting into conversation, which is why they tend to be the second or third server people install. StarRocks sits in that group, and the shape of its toolset — read_query, Input, Output among others — tells you what it is really for. Worth comparing against the other databases servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.
| Tool | What it does |
|---|---|
| read_query | **Description:** Execute a SELECT query or other commands that return a ResultSet (e.g., SHOW, DESCRIBE). Optionally write the full result to a local file instead of returning it inline — useful for results too large to |
| Input | ** |
| Output | ** Without output_file, text content containing the query results in CSV-like format with a header row and row count summary. With output_file, a short summary including the resolved absolute path, byte count, and row co |
| write_query | **Description:** Execute a DDL (CREATE, ALTER, DROP), DML (INSERT, UPDATE, DELETE), or other StarRocks command that does not return a ResultSet. |
| analyze_query | **Description:** Analyze a query and get analyze result using query profile or explain analyze. |
| top_hot_tables | **Description:** Get top hot tables by audit-log visit count. It joins information_schema.tables with starrocks_audit_db__.starrocks_audit_tbl__, excludes root and SHOW statements, matches audit SQL text against table na |
| top_bad_tables | **Description:** Get top bad tables by table health score, following Star Management Studio's top-bad-tables logic. It reuses the table-health calculation based on information_schema.be_tablets and information_schema.par |
| query_and_plotly_chart | **Description:** Executes a SQL query, loads the results into a Pandas DataFrame, and generates a Plotly chart using a provided Python expression. Designed for visualization in supporting UIs. |
| table_overview | **Description:** Get an overview of a specific table: columns (from DESCRIBE), total row count, and sample rows (LIMIT 3). Uses an in-memory cache unless refresh is true. |
| Tools | The Tools tool exposed by this server. |
{
"mcpServers": {
"mcp-server-starrocks": {
"url": "http://localhost:8000/mcp"
}
}
}Configuration as documented by the project. Restart the client after saving.
localhost:9030 over the MySQL protocol. - uv — a fast Python package and project manager (a modern replacement for pip + virtualenv) from Astral. This project uses uv to resolve dependencies, create the virtual environment, and launch the| Variable | Description | Required |
|---|---|---|
| STARROCKS_HOST | Endpoint or connection string the server talks to. | Optional |
| STARROCKS_PORT | Configuration value read at startup. | Optional |
| STARROCKS_USER | Configuration value read at startup. | Optional |
| STARROCKS_PASSWORD | Configuration value read at startup. | Optional |
| STARROCKS_DB | Configuration value read at startup. | Optional |
| STARROCKS_URL | Endpoint or connection string the server talks to. | Yes |
| STARROCKS_SSL_CA | Configuration value read at startup. | Optional |
| STARROCKS_SSL_VERIFY_CERT | Configuration value read at startup. | Optional |
Read-only SQL access to Postgres — let your assistant inspect schemas and answer questions from real data.
Manage your whole Supabase project in conversation — database, auth, storage, Edge Functions and branches.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Metabase ships its own MCP endpoint — search your BI content, build and run queries, and save questions and dashboards without leaving the chat.
Official MongoDB server covering data, schemas and Atlas management — from find queries to spinning up clusters.
Serverless Postgres with database branching — point your assistant at Neon and let it work on disposable copies.