Weapon Lab

io.github.hpdkhoa由 GitHub 账号 hpdkhoa 发布v0.1.0更新于 Oct 24, 2026

Find and fix first-person weapon bugs behind a gate: your game's probe measures, the Gate judges

已验证STDIO仅桌面开发者工具媒体与设计

概览

AI 生成的概览

面向游戏开发的 MCP 服务器:把第一人称武器缺陷变成受门禁约束的用例,通过游戏自带探针测量并判定修复。

可以做什么
  • 管理缺陷用例:运行门禁、获取判定、提出与批准改动、设置基线、列出用例
  • 运行游戏探针,规划并查看状态,通过调参、暂存资源或截图试改
  • 从部件转储读取已摆姿武器:部件、真实尺寸事实、弹匣对位、握把入拳
  • 在 Blender 中重建并渲染动作片段,让手绕前臂转动或让滑动部件回到轴线上
  • 读取、校验并写入每把武器的规格文件,按契约检查探针任务、行与部件文件
  • 为 18 种动作给任意枪械模型绑定、生成并校验片段,并从公开资料描摹真实枪械蓝图
适用场景
适用于修复游戏中的第一人称武器问题,例如手没握住枪、弹匣歪斜、刀刃握持错误、手臂挡住画面,并希望每个修复都被测量和门禁判定而非凭肉眼判断。适合能为自己的引擎编写小型探针的团队。
运行要求
需要 Python 3.10 或更高版本,以 weaponlab-mcp 包作为本地 stdio 进程运行。需要含 weaponlab.json 的项目文件夹,通过 WEAPONLAB_PROJECT 指定(默认当前文件夹)。Motion Lab 与渲染需要 Blender 4.4 或更高版本,通过 WEAPONLAB_BLENDER 或 PATH 查找。拳头与前臂测量要求手部骨骼使用 Unreal 人偶命名。
安装前请注意
它本身不运行你的游戏:你需要按契约编写探针,它只处理探针写回的结果。门禁会记录批准,并可能在项目中暂存资源、写入规格文件,批准前请先审阅提议的改动。Motion Lab 与渲染会启动 Blender。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Weapon Lab,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Weapon Lab

First-person weapon bugs fixed once per kind, then for every weapon, behind a gate.

[license: MIT] [Python 3.10+] [PyPI: weaponlab-mcp] [MCP Registry: weaponlab-mcp] [Blender: 4.4+ (Motion Lab)] [tools: 67] [probe contract: v1]

An MCP server that finds and fixes first-person weapon bugs behind a gate: hands off the gun, a magazine crooked in its well, a blade held wrong, arms covering the screen.

Each bug becomes a case: a metric, a weapon, an action and a pass rule. Your game's own probe measures the weapons. The Gate passes a change only when its target cases pass and nothing else got worse. Fix each kind of bug once, then check every weapon with it.

Weapon Lab never runs your game itself. You write a small probe for your engine that follows the probe contract: a job file in, a rows file out. Everything else works on what the probe writes back.

What it does

GroupToolsWhat for
Gategate_run, gate_verdict, gate_propose, gate_approve, gate_set_baseline, gate_cases, ...Keeps the bugs as cases, measures, compares against a baseline, judges a change, records a person's approval.
Probeprobe_run, probe_plan, probe_statusStarts your game's probe. Tries a fix before it is written: tuned fields, staged assets, screenshots, parts dumps.
Rig Labrig_pieces, rig_facts, rig_align, rig_part_line, rig_fistReads the posed weapon from a parts dump: its pieces, real-world facts (the magazine behind the barrel), a magazine's line into its well, a hilt in the fist.
Motion Labmotion_roll, motion_roll_profile, motion_roll_set, motion_track, motion_renderRebuilds clips in Blender: turns a hand about its forearm inside the forearm's range, puts a sliding part back on its axis.
Specsspec_list, spec_read, spec_validate, spec_writeOne file a weapon: marks (grip, support), anchors (pieces to find), facts, limits.
Contractcontract_checkChecks a probe's job, rows or parts dump.
Gun Kitgunkit_inspect, gunkit_draft, gunkit_from_modellab, gunkit_proxy, gunkit_rig, gunkit_build, gunkit_verify, gunkit_export, gunkit_cases, gunkit_actions, gunkit_actionTakes any gun model to the game: rigs it for one of 18 actions, makes its own clips and the hand clips on one shared pair of arms, checks them, stages the files. See docs/GUNKIT.md.
Blueprint Labblueprint_source_add, blueprint_scan, blueprint_specs, blueprint_figure_add, blueprint_calibrate, blueprint_trace, blueprint_part, blueprint_check, blueprint_build, blueprint_to_gunkit, ...Makes a real gun's visual copy from its public sources (manuals, patents, photos): facts from the data tables, outlines traced from scaled figures, a blueprint with the source of every number, the model built in Blender. See docs/BLUEPRINT.md.

Try it on the demo

The demo is a toy game with two planted bugs and a probe in about 150 lines. It needs no engine.

bash
pip install -e .cd examples/demoweaponlab gate run probe,rig

(python -m weaponlab works the same when pip's scripts folder is not on your PATH.)

The rifle's left hand misses its handguard by 3.75 cm. The knife's hilt lies 90 degrees across the fist. tests/test_demo.py walks the whole loop: measure, find the fix, try it by tune, judge it.

Use it in your game

  1. weaponlab init in your project. It writes weaponlab.json and empty data files.
  2. Write your probe from the contract, starting from examples/demo/probe/demo_probe.py. Set its command in weaponlab.json.
  3. List your weapons in weaponlab/data/weapons.json and their actions in actions.json.
  4. Add a case for each bug you know. Measure everything once and set the baseline.
  5. Fix through the loop: try by tune or staging, look at the screenshots, propose, approve, import.

Check your probe on its own with weaponlab contract job|rows|parts <file>.

Add it to an MCP client

json
{"mcpServers": {"weaponlab": {"command": "weaponlab-mcp", "env": {"WEAPONLAB_PROJECT": "C:/path/to/your/game"}}}}
SettingMeaning
WEAPONLAB_PROJECTThe project folder with weaponlab.json. The current folder by default.
WEAPONLAB_BLENDERBlender, for Motion Lab. Found on the PATH or in the usual install folders otherwise.

Requirements

  • Python 3.10 or later.
  • Blender 4.4 or later for Motion Lab and renders. Nothing else needs it.
  • Hand bones named as Unreal's mannequin names them (hand_r, index_01_r, lowerarm_r) for the fist measure and the forearm roll.

Where it came from

Weapon Lab is the general part of the tools built for ToangTown, an Unreal 5.8 game with 46 weapons. Its first probe is ToangTown's. The contract's lessons come from that probe. Pose Lab (poselab-mcp) answers the body's side: clipping, the view, a grip solver. The Gate can use it as a provider.

License

MIT

来源:README.md,提交 6a8dc92

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Oct 14, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分