Skip to main content
Glama

mcp-server-starrocks

StarRocks MCP 服务器

用于与 StarRocks 数据库交互的模型控制协议 (MCP) 服务器。该服务器为 AI 模型提供了一个标准化接口,以便通过一组定义的工具查询和操作 StarRocks 数据库。

概述

StarRocks MCP 服务器允许 AI 模型:

  • 在 StarRocks 数据库上执行 SELECT 查询

  • 列出可用的表

  • 描述表模式

  • 创建新表(非只读模式时)

  • 执行写入操作,如 INSERT、UPDATE、DELETE(非只读模式时)

Related MCP server: Confluence MCP Server

安装

先决条件

  • Python 3.8+

  • StarRocks 数据库实例

  • SQLAlchemy

  • MCP Python 库

从源安装

git clone https://github.com/yourusername/mcp-server-starrocks.git cd mcp-server-starrocks pip install -e .

从 Smithery 安装

npm 安装@smithery/sdk @modelcontextprotocol/sdk

使用 MCP 检查器

npx @modelcontextprotocol/inspector uv --directory ~/mcp-server-starrocks 运行 mcp-server-starrocks

用法

启动服务器

python -m mcp_server_starrocks.server --host <starrocks-host> --port <starrocks-port> --user <username> --database <database-name> [--password <password>] [--readonly]

命令行参数:

  • --host :StarRocks 服务器主机(必需)

  • --port :StarRocks 服务器端口(默认值:9030)

  • --user :StarRocks 用户名(必填)

  • --database :StarRocks 数据库名称(必需)

  • --password :StarRocks 密码(如果需要)

  • --readonly :以只读模式运行服务器(可选)

可用工具

该服务器提供以下工具:

只读工具:

  • read-query :在 StarRocks 数据库上执行 SELECT 查询

  • list-tables :列出 StarRocks 数据库中的所有表

  • describe-table :描述特定表的模式

写入工具(非只读模式时可用):

  • write-query :执行 INSERT、UPDATE 或 DELETE 查询

  • create-table :在 StarRocks 数据库中创建新表

示例

列出表

{ "name": "list-tables", "arguments": {} }

执行 SELECT 查询

{ "name": "read-query", "arguments": { "query": "SELECT FROM my_table LIMIT 10" } }

描述表

{ "name": "describe-table", "arguments": { "table_name": "my_table" } }

创建表(非只读模式时)

{ "name": "create-table", "arguments": { "query": "CREATE TABLE new_table (id INT, name VARCHAR(100))" } }

执照

MIT 许可证

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hagsmand/mcp-server-starrocks'

If you have feedback or need assistance with the MCP directory API, please join our Discord server