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

sce-urhox-mcp

v0.0.13

Published

MCP Server with create-project tool

Readme

MCP SCE UrhoX

基于 @modelcontextprotocol/sdk 的 MCP 服务,内置创建项目与调试启动两个工具,可通过 stdio 与 MCP 客户端交互,也能独立作为命令行工具使用。

功能架构简介

  • src/index.ts:MCP 服务入口,同时处理 CLI 模式与 stdio 模式。
  • src/tools/:工具注册与实现,包含 create-projectstart-debug
  • src/server/UrhoXHelper.ts:提供调试用静态资源 HTTP 服务。
  • src/utils/console-logger.ts:将日志写入工作目录下的 .sce/mcp-sce-hrhox.log

安装

# 项目内安装
npm install sce-urhox-mcp

# 或全局安装(便于在命令行直接调用)
npm install -g sce-urhox-mcp

# 更新(全局更新应添加-g)
npm update sce-urhox-map

使用

方案一:通过 .mcp.json 挂载 MCP 服务

在 MCP 客户端的配置中新增:

{
  "mcpServers": {
    "sce-urhox-mcp": {
      "command": "sce-urhox-mcp",
      "args": ["--mcp"]
    }
  }
}

客户端启动后即可在工具列表中看到 create-projectstart-debug

方案二:命令行模式

默认以 CLI 方式运行,需要作为 MCP 服务时再加上 --mcp

# 查看帮助
sce-urhox-mcp --help

# 创建项目 - 支持以下两种写法:
# 1. 使用 --path 长选项(推荐使用绝对路径)
sce-urhox-mcp create-project --path "/absolute/path/to/project"

# 2. 直接传位置参数(第一个参数自动映射为 path)
sce-urhox-mcp create-project /absolute/path/to/project

# 启动调试(目录需含 project.sce 与 bin/AgentProject)
sce-urhox-mcp start-debug --path "/absolute/path/to/project"
# 或使用位置参数
sce-urhox-mcp start-debug /absolute/path/to/project

# 自定义调试地址与端口(命令行优先于配置文件)
sce-urhox-mcp start-debug --path "/absolute/path/to/project" --address 0.0.0.0 --port 18080

# 以 MCP 模式运行(提供给其他客户端)
sce-urhox-mcp --mcp

路径参数说明:

  • 支持 --path "/path"--path=/path 格式
  • 支持位置参数:直接传路径作为第一个参数,会自动映射为 path 字段
  • 相对路径会自动转换为绝对路径
  • 支持 ~ 扩展为用户主目录(如 --path=~/projects/my-app~/projects/my-app

工具概览

  • create-project:创建新项目目录,拉取 UrhoXRuntime-wasm.zip 模板, 根据参数path创建项目文件夹。Lua 默认入口为 {path}/bin/AgentProject/Scripts/main.lua, 你可以通过修改bin/AgentProject/commandline.txt指定。
  • start-debug:校验项目结构后启动静态资源 HTTP 服务,返回可访问的 urlporthost,并默认开放跨域访问方便前端调试。

UrhoXHelper 配置与跨域

调试 HTTP 服务的地址策略如下:

  • 监听地址与端口:最终绑定在解析出的 address:port 上(默认端口 12345)。address 的决策顺序为:

    1. CLI / MCP 参数中的 address
    2. 项目根目录 debug-config.yamlUrhoXHelper.address
    3. 自动探测到的局域网 IPv4(找不到时回退到 127.0.0.1
  • port 的优先级同上(CLI / MCP > debug-config.yaml > 默认值)。

  • 配置文件示例

    UrhoXHelper:
      port: 12346
      address: 192.168.1.50
    • port 支持数值或字符串形式,合法范围 1-65535
    • address 接受任意非空字符串;留空则按照上面的优先级自动推算。

所有 HTTP 接口默认开启 CORS,允许任意来源、任意方法和自定义请求头,方便浏览器或其它工具直接访问。

发布流程

先跳转到packages/mcp-sce-urhox cd packages/mcp-sce-urhox

  1. 更新版本号:npm version <patch|minor|major>
  2. 构建产物:npm run build
  3. 登录 npm(首次需 npm login):npm publish --access public