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 分