StarRocks Official MCP Server
@StarRocks
关于 StarRocks Official MCP Server
StarRocks MCP (Model Context Protocol) Server
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mcp-server-starrocks": {
"command": "uv",
"args": [
"run",
"--with",
"mcp-server-starrocks",
"mcp-server-starrocks",
"--help"
]
}
}
}工具
6** 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 fit in the model context.
** Execute a DDL (`CREATE`, `ALTER`, `DROP`), DML (`INSERT`, `UPDATE`, `DELETE`), or other StarRocks command that does not return a ResultSet.
** Analyze a query and get analyze result using query profile or explain analyze.
** 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.
** 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.
** Get an overview (columns, row count, sample rows) for _all_ tables within a specified database. Uses the table-level cache for each table unless `refresh` is true.
概览
What is StarRocks Official MCP Server?
The StarRocks Official MCP Server acts as a bridge between AI assistants and StarRocks databases. It enables direct SQL execution, database exploration, data visualization via charts, and retrieval of detailed schema and data overviews without requiring complex client-side setup.
How to use StarRocks Official MCP Server?
Install uv (Python package manager) and configure an MCP host (e.g., Claude Desktop) to launch the server. Connection is set via environment variables (STARROCKS_URL or individual vars like STARROCKS_HOST, STARROCKS_PORT, etc.) or a Streamable HTTP endpoint. Run with uv run mcp-server-starrocks and optional flags like --mode stdio or --mode streamable-http --port 8000.
Key features of StarRocks Official MCP Server
- Direct SQL execution:
read_query(SELECT) andwrite_query(DDL/DML). - Database exploration via
starrocks://resources (list databases, tables, schemas). - System information access through
proc://resource path. - Detailed overviews:
table_overviewanddb_overviewwith row counts, samples. - Data visualization:
query_and_plotly_chartgenerates Plotly charts from query results. - Intelligent in‑memory caching of table and database overviews (bypassable).
Use cases of StarRocks Official MCP Server
- AI assistant querying StarRocks to answer business questions in natural language.
- Generating charts and visualizations directly from SQL results.
- Exploring database schema and contents for context‑aware LLM interactions.
- Monitoring StarRocks cluster internals via the
proc://resource. - Automating data analysis workflows without a custom SQL client.
FAQ from StarRocks Official MCP Server
What are the prerequisites to run the server?
Python 3.11+, a reachable StarRocks cluster (FE service, default localhost:9030 over MySQL protocol), and the uv package manager.
How do I configure the StarRocks connection?
Use either a single STARROCKS_URL (e.g., root:password@localhost:9030/my_db) or individual environment variables (STARROCKS_HOST, STARROCKS_PORT, STARROCKS_USER, STARROCKS_PASSWORD, STARROCKS_DB). The URL takes precedence.
What transport modes are supported?
stdio (default, for MCP hosts), streamable-http (recommended for RESTful APIs), and sse (deprecated, not recommended). Set via --mode flag or MCP_TRANSPORT_MODE env var.
Can the server connect using Arrow Flight SQL?
Yes. Set the STARROCKS_FE_ARROW_FLIGHT_SQL_PORT environment variable to enable high‑performance Arrow Flight SQL protocol via ADBC drivers.
Where do output files from read_query get saved?
By default to ~/.mcp-server-starrocks/output/ (controlled by STARROCKS_MCP_OUTPUT_DIR). Absolute paths bypass this setting. Files are written on the machine running the MCP server.
其他 分类下的更多 MCP 服务器
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
ICSS
chokcoco不止于 CSS
🪟 Windows-MCP
CursorTouchMCP Server for Computer Use in Windows
Nginx UI
0xJackyYet another WebUI for Nginx
评论