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

unreal-angelscript-mcp

v0.1.3

Published

MCP server for UnrealEngine-Angelscript diagnostics and connection checks.

Readme

ASMCP

ASMCP 是一个本地 stdio MCP server,用于连接 Hazelight UnrealEngine-Angelscript 项目的 Unreal Editor。

它使用和 vscode-unreal-angelscript 插件相同的 TCP 端口协议,默认连接:

127.0.0.1:27099

功能

  • as_ping:检查是否能连接到 Unreal AngelScript socket。
  • as_compile:连接 Unreal,请求 debug database,并可通过更新 .as 文件时间戳触发 UE 自动编译/重载脚本。
  • as_compile_log:监听 Unreal 推送的 Diagnostics 消息,返回 AngelScript 编译诊断日志。
  • as_compile_and_log:先触发编译,再等待一段时间并读取编译诊断日志。
  • as_last_compile_log:返回上一次 as_compile_log 或 as_compile_and_log 收集到的日志。

重要限制

vscode-unreal-angelscript 使用的协议里没有发现专用的 CompileAngelscriptNow 或类似“立刻编译 AS”的命令。

原 VS Code 插件的工作方式是:

  1. 用户保存或修改 .as 文件。
  2. Unreal Editor 监听到文件变化。
  3. Unreal 自动编译并重载 AngelScript。
  4. Unreal 把编译错误、警告、信息通过 Diagnostics 消息推送给 VS Code。

ASMCP 采用同样思路:如果你传入 .as 文件或 Script 目录,它会更新文件时间戳,让 Unreal 的 AngelScript 文件监听器触发自动编译。默认触发方式是 auto:优先重写相同内容以触发更强的文件变更事件,如果文件不可写则退回到更新时间戳。你也可以显式传入 "triggerMode": "touch" 或 "triggerMode": "rewrite"。

VS Code Copilot MCP 配置

推荐用 npx 启动,不需要固定本机源码路径。

VS Code 用户级 MCP 配置文件通常位于:

%APPDATA%\Code\User\mcp.json

配置示例:

{
  "servers": {
    "ASMCP": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "unreal-angelscript-mcp"
      ],
      "env": {
        "AS_UNREAL_HOST": "127.0.0.1",
        "AS_UNREAL_PORT": "27099",
        "AS_TIMEOUT_MS": "5000"
      }
    }
  },
  "inputs": []
}

修改后在 VS Code 中执行:

Developer: Reload Window

opencode MCP 配置

如果要在 opencode 中使用,可以加入到 ~/.config/opencode/opencode.json 或项目 opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "ASMCP": {
      "type": "local",
      "enabled": true,
      "command": ["npx", "-y", "unreal-angelscript-mcp"],
      "env": {
        "AS_UNREAL_HOST": "127.0.0.1",
        "AS_UNREAL_PORT": "27099",
        "AS_TIMEOUT_MS": "5000"
      }
    }
  }
}

修改 opencode 配置后需要重启 opencode。

使用示例

as_compile_and_log 的返回值包含顶层状态字段:

  • status: "failed":收到 Diagnostics,且包含错误。
  • status: "completed_with_diagnostics":收到 Diagnostics,且没有错误。
  • status: "unknown_no_diagnostics_received":超时前没有收到 Diagnostics;这不等于编译成功,只表示 UE 没有推送诊断或文件监听没有触发。
  • ok: true:仅在收到 Diagnostics 且没有错误时为 true。

检查 Unreal 是否连接:

{}

触发单个 AS 文件编译并查询日志:

{
  "file": "D:/Project/Script/Foo.as",
  "triggerMode": "auto",
  "waitMs": 1000,
  "timeoutMs": 8000
}

通过 Script 目录触发编译:

{
  "scriptRoot": "D:/Project/Script",
  "maxFiles": 1,
  "triggerMode": "auto",
  "waitMs": 1000,
  "timeoutMs": 8000
}

Unreal 端要求

Unreal Editor 必须正在运行,并且 AngelScript debug/language socket 端口要和 ASMCP 配置一致。

默认端口:

27099

如果项目使用启动参数,可以设置:

-asdebugport=27099