StarRocks MCP Server

Interact with StarRocks

Local serverstdioPython

What is the StarRocks MCP Server?

Starrocks mcp server connects StarRocks to AI assistants that speak the Model Context Protocol. Interact with StarRocks.

What StarRocks does

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.

Key capabilities

  • Direct SQL Execution: — Run SELECT queries (read_query) and DDL/DML commands (write_query)
  • Database Exploration: — List databases and tables, retrieve table schemas (starrocks:// resources)
  • System Information: — Access internal StarRocks metrics and states via the proc:// resource path
  • Detailed Overviews: — Get comprehensive summaries of tables (table_overview) or entire databases (db_overview), including column definitions, row counts, and sample data
  • Data Visualization: — Execute a query and generate a Plotly chart directly from the results (query_and_plotly_chart)
  • Intelligent Caching: — Table and database overviews are cached in memory to speed up repeated requests. Cache can be bypassed when needed
  • Flexible Configuration: — Set connection details and behavior via environment variables

Requirements

  • Python 3.11 or newer. - A reachable StarRocks cluster (FE service). By default the server connects to 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

Practical notes

  • Written in Python.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
read_queryDescription: 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 o
write_queryDescription: Execute a DDL (CREATE, ALTER, DROP), DML (INSERT, UPDATE, DELETE), or other StarRocks command that does not return a ResultSet.
analyze_queryDescription: Analyze a query and get analyze result using query profile or explain analyze.
top_hot_tablesDescription: Get top hot tables by audit-log visit count. It joins information_schema.tables with starrocks_audit_db__.starrocks_audit_tbl__, excludes root and
top_bad_tablesDescription: 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
query_and_plotly_chartDescription: Executes a SQL query, loads the results into a Pandas DataFrame, and generates a Plotly chart using a provided Python expression. Designed for visu
table_overviewDescription: 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
db_overviewDescription: Get an overview (columns, row count, sample rows) for _all_ tables within a specified database. Uses the table-level cache for each table unless re

How to install the StarRocks MCP Server

{
  "mcpServers": {
    "mcp-server-starrocks": {
      "url": "http://localhost:8000/mcp"
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

  • Python 3.11 or newer. - A reachable StarRocks cluster (FE service). By default the server connects to 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

Example prompts to try

  • “Use StarRocks to read query.”
  • “Use StarRocks to Input.”
  • “Use StarRocks to Output.”

Frequently asked questions

Interact with StarRocks Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.