StarRocks MCP Server Setup Guide

Configuration

Default Configuration

To configure the StarRocks MCP Server using the default settings, use the following JSON configuration:

{
  "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"
  }
  }
  }
 }
 

Local Directory Configuration

If mcp-server-starrocks is not installed as a Python package (in a development environment), you can run it using a local directory. Use the following JSON configuration:

{
  "mcpServers": {
  "mcp-server-starrocks": {
  "command": "uv",
  "args": [
  "--directory",
  "path/to/mcp-server-starrocks",
  "run",
  "mcp-server-starrocks"
  ],
  "env": {
  "STARROCKS_HOST": "default localhost",
  "STARROCKS_PORT": "default 9030",
  "STARROCKS_USER": "default root",
  "STARROCKS_PASSWORD": "default empty"
  }
  }
  }
 }
 

Components

Tools

  • read_query: Execute a SELECT query or commands that return a ResultSet.
  • write_query: Execute a DDL/DML or other StarRocks command that does not return a ResultSet.

Resources

Direct Resources

  • starrocks:///databases: Lists all databases in StarRocks.

Resource Templates

  • starrocks:///{db}/{table}/schema: Gets the schema of a table using SHOW CREATE TABLE.
  • starrocks:///{db}/tables: Lists all tables in a specific database.

System Information

  • proc:///{+path}: System internal information exposed by StarRocks, similar to Linux /proc.

Common paths include:

  • /frontends: Information of FE nodes.
  • /backends: Information of BE nodes (non-cloud native deployment).
  • /compute_nodes: Information of CN nodes (cloud native deployment).
  • /dbs: Information of databases.
  • /dbs/<DB_ID>: Information of a database by database ID.
  • /dbs/<DB_ID>/<TABLE_ID>: Information of tables by database ID.
  • /dbs/<DB_ID>/<TABLE_ID>/partitions: Information of partitions by database ID and table ID.
  • /transactions: Information of transactions by database.
  • /transactions/<DB_ID>: Information of transactions by database ID.
  • /transactions/<DB_ID>/running: Information of running transactions by database ID.
  • /transactions/<DB_ID>/finished: Information of finished transactions by database ID.
  • /jobs: Information of jobs.
  • /statistic: Statistics of each database.
  • /tasks: Total number of all generic tasks and the failed tasks.
  • /cluster_balance: Load balance information.
  • /routine_loads: Information of Routine Load.
  • /colocation_group: Information of Colocate Join groups.
  • /catalog: Information of catalogs.
Share this post: