npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@easy-mcps/starrocks-mcp-server

v1.0.4

Published

StarRocks MCP Server - 统一权限控制

Readme

StarRocks MCP Server

StarRocks 数据库的 MCP 服务器实现,支持统一的权限控制。

功能特性

  • ✅ 4 个工具:read_query, write_query, delete_query, ddl_query
  • ✅ 统一权限控制:通过 MCP_PERMISSIONS 配置
  • ✅ SQL 类型验证:每个工具只能执行对应类型的 SQL
  • ✅ MySQL 兼容:使用 mysql2 驱动

权限配置

通过环境变量 MCP_PERMISSIONS 配置权限,支持两种格式:

# JSON 数组格式
MCP_PERMISSIONS='["read","write"]'

# 逗号分隔格式
MCP_PERMISSIONS='read,write'

| 权限 | 默认值 | 说明 | |------|--------|------| | read | ✅ 开启 | SELECT 查询 | | write | ❌ 关闭 | INSERT/UPDATE 操作 | | delete | ❌ 关闭 | DELETE 操作(危险) | | ddl | ❌ 关闭 | CREATE/DROP/ALTER TABLE(危险) |

工具说明

| 工具 | SQL 类型 | 说明 | |------|----------|------| | read_query | SELECT | 执行 SELECT 查询(含 SHOW TABLES, DESC 等元数据查询) | | write_query | INSERT/UPDATE | 执行 INSERT 或 UPDATE 语句 | | delete_query | DELETE | 执行 DELETE 语句(危险操作) | | ddl_query | CREATE/DROP/ALTER TABLE | 执行 CREATE/DROP/ALTER TABLE 语句(危险操作) |

环境变量

# URL 格式(推荐)
STARROCKS_URL=mysql://user:password@host:port/database

# 或使用独立环境变量
STARROCKS_HOST=localhost
STARROCKS_PORT=9030
STARROCKS_USER=root
STARROCKS_PASSWORD=password
STARROCKS_DATABASE=test

# 也支持 MYSQL_* 环境变量(方便同时连接 MySQL 和 StarRocks)
MYSQL_HOST=localhost
MYSQL_PORT=9030
MYSQL_USER=root
MYSQL_PASSWORD=password
MYSQL_DATABASE=test

MCP_PERMISSIONS='["read","write"]'  # 可选,默认只有 read

环境变量优先级:STARROCKS_* > MYSQL_* > 默认值

使用方式

npx 直接运行

npx -y @easy-mcps/starrocks-mcp-server

Claude Desktop / Cursor

{
  "mcpServers": {
    "starrocks": {
      "command": "npx",
      "args": ["-y", "@easy-mcps/starrocks-mcp-server"],
      "env": {
        "STARROCKS_HOST": "localhost",
        "STARROCKS_PORT": "9030",
        "STARROCKS_USER": "root",
        "STARROCKS_PASSWORD": "password",
        "STARROCKS_DATABASE": "test",
        "MCP_PERMISSIONS": "read,write"
      }
    }
  }
}

本地安装

npm install -g @easy-mcps/starrocks-mcp-server
starrocks-mcp-server

开发

npm install
npm run dev

License

MIT