StarRocks MCP Server

Official

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Provides access to system information through a proc-like interface, allowing exploration of node status, database details, and system metrics similar to the Linux /proc filesystem.

  • Enables execution of SQL queries against StarRocks databases using Python, supporting both read operations (SELECT queries) and write operations (DDL/DML commands).

Starrocks 官方 MCP 服务器

StarRocks MCP 服务器充当 AI 助手和 StarRocks 数据库之间的桥梁,允许直接执行 SQL 和数据库探索,而无需复杂的设置或配置。

配置

MCP 服务器配置

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

如果 mcp-server-starrocks 没有作为 python 包安装(在开发环境中),可以使用本地目录运行

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

成分

工具

  • read_query
    • 执行 SELECT 查询或返回 ResultSet 的命令
  • write_query
    • 执行没有 ResultSet 的 DDL/DML 或其他 StarRocks 命令

资源

直接资源

  • starrocks:///databases
    • 列出 StarRocks 中的所有数据库

资源模板

  • starrocks:///{db}/{table}/schema
    • 使用 SHOW CREATE TABLE 获取表的架构
  • starrocks:///{db}/tables
    • 列出特定数据库中的所有表
  • proc:///{+path}
    • StarRocks 公开的系统内部信息类似于 linux /proc
    • 常见路径包括:
      • /frontends - 显示 FE 节点的信息
      • /backends - 如果此 SR 是非云原生部署,则显示 BE 节点的信息
      • /compute_nodes - 如果此 SR 是云原生部署,则显示 CN 节点的信息
      • /dbs显示数据库的信息
      • /dbs/<DB_ID> - 通过数据库 ID 显示数据库的信息
      • /dbs/<DB_ID>/<TABLE_ID> - 按数据库 ID 显示表的信息
      • /dbs/<DB_ID>/<TABLE_ID>/partitions - 按数据库 ID 和表 ID 显示分区信息
      • /transactions - 显示数据库的交易信息
      • /transactions/<DB_ID> - 按数据库 ID 显示事务信息
      • /transactions/<DB_ID>/running - 按数据库 ID 显示正在运行的事务的信息
      • /transactions/<DB_ID>/finished - 按数据库 ID 显示已完成事务的信息
      • /jobs - 显示工作信息
      • /statistic - 显示每个数据库的统计信息
      • /tasks - 显示所有通用任务和失败任务的总数
      • /cluster_balance - 显示负载平衡信息
      • /routine_loads - 显示例程负载信息
      • /colocation_group - 显示 Colocate Join 组的信息
      • /catalog - 显示目录信息

提示

没有任何

-
security - not tested
A
license - permissive license
-
quality - not tested

充当 AI 助手和 StarRocks 数据库之间的桥梁,允许直接执行 SQL 和数据库探索,而无需复杂的设置或配置。

  1. Configuration
    1. Components
      1. Tools
      2. Resources
      3. Prompts
    ID: mgys7ofvs0