# mcp-server-starrocks [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/StarRocks/mcp-server-starrocks  
**GitHub Stars:** 197  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-server-starrocks

## Description
StarRocks MCP (Model Context Protocol) Server

## Tools
Capabilities this server exposes over MCP:

- **oauth2_login**
- **oauth2_logout**
- **read_query**
- **SHOW**
- **DESCRIBE**
- **output_file**
- **write_query**
- **CREATE**
- **ALTER**
- **DROP**
- **INSERT**
- **UPDATE**
- **DELETE**
- **analyze_query**
- **top_hot_tables**
- **information_schema.tables**
- **starrocks_audit_db__.starrocks_audit_tbl__**
- **root**
- **visit_count**
- **db**
- **table**
- **top_bad_tables**
- **top-bad-tables**
- **information_schema.be_tablets**
- **information_schema.partitions_meta**
- **table_health_score**
- **tablet_num**
- **replica_score**
- **tablet_score**
- **query_and_plotly_chart**
- **table_overview**
- **refresh**
- **db_overview**

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "mcp-server-starrocks": {
    "command": "uvx",
    "args": ["mcp-server-starrocks"],
    "env": {
      "STARROCKS_URL": "",
      "STARROCKS_HOST": "",
      "STARROCKS_PORT": "",
      "STARROCKS_USER": "",
      "STARROCKS_PASSWORD": "",
      "STARROCKS_DB": "",
      "STARROCKS_PASSWORD_FILE": "",
      "MCP_TRANSPORT_MODE": ""
    }
  }
}
```

**Requires environment variables:** `STARROCKS_URL`, `STARROCKS_HOST`, `STARROCKS_PORT`, `STARROCKS_USER`, `STARROCKS_PASSWORD`, `STARROCKS_DB`, `STARROCKS_PASSWORD_FILE`, `MCP_TRANSPORT_MODE` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What mcp-server-starrocks does

mcp-server-starrocks provides an MCP interface to a reachable StarRocks Frontend (FE) service. Agents can run read-only `SELECT` statements through `read_query` and issue DDL or DML statements through `write_query`. The server also exposes database and table discovery, schema details, system information, aggregate overviews, and query-driven Plotly charts.

Table and database overviews can include column definitions, row counts, and sample data. These results are cached in memory to reduce repeated work, with an option to bypass the cache when fresh information is needed.

## How it works

The server connects to StarRocks over its MySQL protocol, using port 9030 by default. MCP hosts can launch it as a local stdio process or connect to an HTTP endpoint when it runs in Streamable HTTP mode. Streamable HTTP uses a standard JSON-over-HTTP interface; clients do not need a special SDK for this transport.

Resource paths support StarRocks database and table inspection through `starrocks://` URIs. Internal StarRocks metrics and state are available through the `proc://` resource path. The server can also combine query execution with Plotly chart generation through `query_and_plotly_chart`.

## Setup and configuration

Python 3.11 or newer, `uv`, and access to a StarRocks FE service are required. The published package can be launched on demand with `uv run --with mcp-server-starrocks mcp-server-starrocks`, while a local checkout can be prepared with `uv sync` and run with `uv run mcp-server-starrocks`.

Connection settings can be supplied as one `STARROCKS_URL`, such as `root:password@localhost:9030/my_database`, or as separate host, port, user, password, and database variables. The default connection targets `localhost:9030` with the `root` user and an empty password. A password can also be read from a file, and macOS Keychain options are available for password lookup.

For HTTP deployments, start the process with `--mode streamable-http` and choose a port, then configure the MCP host with the server's `/mcp` URL. Docker images can expose the same endpoint on port 8000. Command-line options also select the bind host, transport mode, and test mode. The older SSE transport is deprecated; new deployments should use Streamable HTTP.

## Tools and capabilities

- `read_query` executes `SELECT` queries.
- `write_query` executes DDL and DML statements.
- `table_overview` summarizes an individual table.
- `db_overview` summarizes a database.
- `query_and_plotly_chart` runs a query and creates a Plotly chart from its results.
- Database and table resources support schema and catalog exploration.
- `proc://` resources expose internal StarRocks metrics and state.

## Limitations and notes

The server depends on network access to a StarRocks FE service and uses the MySQL protocol port for database connectivity. The HTTP listening port is separate from StarRocks port 9030. Cached overview results may need an explicit cache bypass when current metadata or sample data is important. The default transport is stdio, while Streamable HTTP is the recommended option for HTTP-based deployments.

_Full upstream README: https://allmcps.com/mcp/mcp-server-starrocks/readme_

