by StarRocks
Provides a bridge between AI assistants and StarRocks databases, enabling direct SQL execution, schema exploration, data visualization, and detailed overviews through simple JSON‑based APIs.
Enables AI assistants to interact with StarRocks databases directly, offering query execution, schema discovery, system metrics access, and Plotly chart generation without requiring custom client code.
streamable-http
which starts an HTTP endpoint listening for JSON POST requests.export MCP_TRANSPORT_MODE=streamable-http && uv run mcp-server-starrocks
).read_query
, write_query
, table_overview
, db_overview
, or query_and_plotly_chart
by sending the appropriate JSON payload to the /mcp
endpoint.starrocks:///databases
or starrocks:///{db}/{table}/schema
to fetch raw text representations.SELECT
queries (read_query
) and DDL/DML commands (write_query
).starrocks://
resources.proc://
paths.query_and_plotly_chart
).refresh
flag.STARROCKS_MYSQL_AUTH_PLUGIN
./proc
information to observability tools.Q: Which transport mode should I use?
A: streamable-http
is the recommended mode for new integrations; it provides a simple REST‑like JSON API.
Q: Do I need to install any client libraries? A: No. The server communicates over standard input/output or HTTP, so any client that can send JSON POST requests works.
Q: How can I bypass the cache for an overview?
A: Set the refresh
parameter to true
in the table_overview
or db_overview
request payload.
Q: What authentication plugins are supported?
A: By default the server uses the MySQL client default. If your StarRocks deployment requires clear‑text passwords, set STARROCKS_MYSQL_AUTH_PLUGIN=mysql_clear_password
.
Q: Can I limit the size of overview text?
A: Yes, adjust STARROCKS_OVERVIEW_LIMIT
to control the approximate character count generated per table.
Q: Is Server‑Sent Events (SSE) still supported?
A: SSE mode is deprecated; use streamable-http
instead.
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.
SELECT
queries (read_query
) and DDL/DML commands (write_query
).starrocks://
resources).proc://
resource path.table_overview
) or entire databases (db_overview
), including column definitions, row counts, and sample data.query_and_plotly_chart
).The MCP server is typically run via an MCP host. Configuration is passed to the host, specifying how to launch the StarRocks MCP server process.
Using uv
with installed package:
{
"mcpServers": {
"mcp-server-starrocks": {
"command": "uv",
"args": ["run", "--with", "mcp-server-starrocks", "mcp-server-starrocks"],
"env": {
"STARROCKS_HOST": "default localhost",
"STARROCKS_PORT": "default 9030",
"STARROCKS_USER": "default root",
"STARROCKS_PASSWORD": "default empty",
"STARROCKS_DB": "default empty",
"STARROCKS_OVERVIEW_LIMIT": "default 20000",
"STARROCKS_MYSQL_AUTH_PLUGIN":"mysql_clear_password"
}
}
}
}
Using uv
with local directory (for development):
{
"mcpServers": {
"mcp-server-starrocks": {
"command": "uv",
"args": [
"--directory",
"path/to/mcp-server-starrocks", // <-- Update this path
"run",
"mcp-server-starrocks"
],
"env": {
"STARROCKS_HOST": "default localhost",
"STARROCKS_PORT": "default 9030",
"STARROCKS_USER": "default root",
"STARROCKS_PASSWORD": "default empty",
"STARROCKS_DB": "default empty",
"STARROCKS_OVERVIEW_LIMIT": "default 20000",
"STARROCKS_MYSQL_AUTH_PLUGIN":"mysql_clear_password"
}
}
}
}
Using Streamable HTTP (recommended for integration):
{
"mcpServers": {
"mcp-server-starrocks": {
"url": "http://localhost:8000/mcp"
}
}
}
To start the server in Streamable HTTP mode:
export MCP_TRANSPORT_MODE=streamable-http
uv run mcp-server-starrocks
url
field should point to the Streamable HTTP endpoint of your MCP server (adjust host/port as needed).Note: The
sse
(Server-Sent Events) mode is deprecated and no longer maintained. Please use Streamable HTTP mode for all new integrations.
Environment Variables:
STARROCKS_HOST
: (Optional) Hostname or IP address of the StarRocks FE service. Defaults to localhost
.STARROCKS_PORT
: (Optional) MySQL protocol port of the StarRocks FE service. Defaults to 9030
.STARROCKS_USER
: (Optional) StarRocks username. Defaults to root
.STARROCKS_PASSWORD
: (Optional) StarRocks password. Defaults to empty string.STARROCKS_DB
: (Optional) Default database to use if not specified in tool arguments or resource URIs. If set, the connection will attempt to USE
this database. Tools like table_overview
and db_overview
will use this if the database part is omitted in their arguments. Defaults to empty (no default database).STARROCKS_OVERVIEW_LIMIT
: (Optional) An approximate character limit for the total text generated by overview tools (table_overview
, db_overview
) when fetching data to populate the cache. This helps prevent excessive memory usage for very large schemas or numerous tables. Defaults to 20000
.STARROCKS_MYSQL_AUTH_PLUGIN
: (Optional) Specifies the authentication plugin to use when connecting to the StarRocks FE service. For example, set to mysql_clear_password
if your StarRocks deployment requires clear text password authentication (such as when using certain LDAP or external authentication setups). Only set this if your environment specifically requires it; otherwise, the default auth_plugin is used.MCP_TRANSPORT_MODE
: (Optional) Communication mode that specifies how the MCP Server exposes its services. Available options:
stdio
(default): Communicates through standard input/output, suitable for MCP Host hosting.streamable-http
(Streamable HTTP): Starts as a Streamable HTTP Server, supporting RESTful API calls.sse
: (Deprecated, not recommended) Starts in Server-Sent Events (SSE) streaming mode, suitable for scenarios requiring streaming responses. Note: SSE mode is no longer maintained, it is recommended to use Streamable HTTP mode uniformly.read_query
SHOW
, DESCRIBE
).{ "query": "SQL query string" }
write_query
CREATE
, ALTER
, DROP
), DML (INSERT
, UPDATE
, DELETE
), or other StarRocks command that does not return a ResultSet.{ "query": "SQL command string" }
query_and_plotly_chart
{
"query": "SQL query to fetch data",
"plotly_expr": "Python expression string using 'px' (Plotly Express) and 'df' (DataFrame). Example: 'px.scatter(df, x=\"col1\", y=\"col2\")'"
}
TextContent
: A text representation of the DataFrame and a note that the chart is for UI display.ImageContent
: The generated Plotly chart encoded as a base64 PNG image (image/png
). Returns text error message on failure or if the query yields no data.table_overview
DESCRIBE
), total row count, and sample rows (LIMIT 3
). Uses an in-memory cache unless refresh
is true.{
"table": "Table name, optionally prefixed with database name (e.g., 'db_name.table_name' or 'table_name'). If database is omitted, uses STARROCKS_DB environment variable if set.",
"refresh": false // Optional, boolean. Set to true to bypass the cache. Defaults to false.
}
db_overview
refresh
is true.{
"db": "database_name", // Optional if STARROCKS_DB env var is set.
"refresh": false // Optional, boolean. Set to true to bypass the cache for all tables in the DB. Defaults to false.
}
starrocks:///databases
SHOW DATABASES
text/plain
starrocks:///{db}/{table}/schema
SHOW CREATE TABLE {db}.{table}
text/plain
starrocks:///{db}/tables
SHOW TABLES FROM {db}
text/plain
proc:///{+path}
/proc
. The path
parameter specifies the desired information node.SHOW PROC '/{path}'
text/plain
/frontends
- Information about FE nodes./backends
- Information about BE nodes (for non-cloud native deployments)./compute_nodes
- Information about CN nodes (for cloud native deployments)./dbs
- Information about databases./dbs/<DB_ID>
- Information about a specific database by ID./dbs/<DB_ID>/<TABLE_ID>
- Information about a specific table by ID./dbs/<DB_ID>/<TABLE_ID>/partitions
- Partition information for a table./transactions
- Transaction information grouped by database./transactions/<DB_ID>
- Transaction information for a specific database ID./transactions/<DB_ID>/running
- Running transactions for a database ID./transactions/<DB_ID>/finished
- Finished transactions for a database ID./jobs
- Information about asynchronous jobs (Schema Change, Rollup, etc.)./statistic
- Statistics for each database./tasks
- Information about agent tasks./cluster_balance
- Load balance status information./routine_loads
- Information about Routine Load jobs./colocation_group
- Information about Colocation Join groups./catalog
- Information about configured catalogs (e.g., Hive, Iceberg).None defined by this server.
table_overview
and db_overview
tools utilize an in-memory cache to store the generated overview text.(database_name, table_name)
.table_overview
is called, it checks the cache first. If a result exists and the refresh
parameter is false
(default), the cached result is returned immediately. Otherwise, it fetches the data from StarRocks, stores it in the cache, and then returns it.db_overview
is called, it lists all tables in the database and then attempts to retrieve the overview for each table using the same caching logic as table_overview
(checking cache first, fetching if needed and refresh
is false
or cache miss). If refresh
is true
for db_overview
, it forces a refresh for all tables in that database.STARROCKS_OVERVIEW_LIMIT
environment variable provides a soft target for the maximum length of the overview string generated per table when populating the cache, helping to manage memory usage.Please log in to share your review and rating for this MCP.
{ "mcpServers": { "starrocks-mcp-server": { "command": "uv", "args": [ "run", "--with", "mcp-server-starrocks", "mcp-server-starrocks" ], "env": { "STARROCKS_HOST": "localhost", "STARROCKS_PORT": "9030", "STARROCKS_USER": "root", "STARROCKS_PASSWORD": "", "STARROCKS_DB": "", "STARROCKS_OVERVIEW_LIMIT": "20000", "STARROCKS_MYSQL_AUTH_PLUGIN": "mysql_clear_password", "MCP_TRANSPORT_MODE": "streamable-http" } } } }
Discover more MCP servers with similar functionality and use cases
by googleapis
Provides a configurable MCP server that abstracts connection pooling, authentication, observability, and tool management to accelerate development of database‑backed AI tools.
by bytebase
DBHub is a universal database gateway that implements the Model Context Protocol (MCP) server interface, enabling MCP-compatible clients to interact with various databases.
by neo4j-contrib
Provides Model Context Protocol servers for interacting with Neo4j databases, managing Aura instances, and handling personal knowledge graph memory through natural‑language interfaces.
by mongodb-js
Provides a Model Context Protocol server that connects to MongoDB databases and Atlas clusters, exposing a rich set of tools for querying, managing, and administering data and infrastructure.
by benborla
A Model Context Protocol (MCP) server that provides read-only access to MySQL databases, enabling Large Language Models (LLMs) to inspect database schemas and execute read-only queries.
by ClickHouse
Provides tools that let AI assistants run read‑only SQL queries against ClickHouse clusters or the embedded chDB engine, plus a health‑check endpoint for service monitoring.
by elastic
Provides direct, natural‑language access to Elasticsearch indices via the Model Context Protocol, allowing AI agents to query and explore data without writing DSL.
by motherduckdb
Provides an MCP server that enables SQL analytics on DuckDB and MotherDuck databases, allowing AI assistants and IDEs to execute queries via a unified interface.
by redis
Provides a natural language interface for agentic applications to manage and search data in Redis efficiently.