
Packwright MCP
io.github.rithwikbabu由 GitHub 帳號 rithwikbabu 發布v0.5.0更新於 Oct 25, 2026
Packwright compiles, renders, validates, and captures paired Minecraft Java packs.
概覽
一個本機 MCP 伺服器,讓助理建立、驗證、測試、視覺審查並打包 Minecraft Java 版資料包與搭配的資源包。
- 可以做什麼
- 在受保護的 workspace 內建立與編輯資料包及資源包檔案,採用原子寫入與 SHA-256 前置檢查,並可檢視套件內容、查詢快取的 Minecraft 指令與登錄表。以真實的 Minecraft 26.2 指令分派器與登錄表驗證每個 .mcfunction 指令,或只做結構驗證。在明確初始化後執行一次性的原版套件載入與 GameTest 測試。產生確定性 ZIP,驗證有錯即失敗,並在交易提交前驗證尚未提交的提案。草擬自訂物品與模型、算繪確定性 CPU 預覽,並為支援的視覺設定擷取官方用戶端影格緩衝證據。提供唯讀資源與工作流程提示。
- 適用情境
- 適用於撰寫或審查 Minecraft Java 資料包與資源包時,希望助理建立檔案、以真實原版資料檢查指令、執行測試並產生可重現的建置,同時不給予不受限制的檔案系統或 shell 存取權。
- 執行需求
- 透過 npm 以 stdio 在本機執行,需要 Node.js 20 或更新版本,以及必填的絕對 workspace 路徑(PACKWRIGHT_WORKSPACE 或 --workspace 參數)。預設驗證、建置、GameTest 與用戶端擷取需要 Java 25(PACKWRIGHT_JAVA),以及由操作者透過 setup-version 指令並明確接受 EULA 後準備的 Minecraft 26.2 快取。用戶端擷取另需可互動的 macOS 圖形工作階段。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Packwright MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Packwright MCP
Packwright MCP is a local-first Model Context Protocol server for safely creating, inspecting, validating, testing, and packaging Minecraft Java Edition datapacks and paired resource packs. It gives an MCP client structured tools instead of unrestricted filesystem or shell access.
NOT AN OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.
Packwright does not contain or redistribute Minecraft code, assets, server/client jars, libraries, natives, generated vanilla data, or decompiled sources. The npm package includes only Packwright's original MIT-licensed capture mod.
Status and compatibility
Packwright supports Minecraft Java Edition 26.2 only: datapack format 107.1 and resource-pack format 88.0. Node.js 20 or newer is required. Default validation, every datapack or paired-project build, vanilla GameTest runs, and official-client visual capture require Java 25 plus the corresponding operator-prepared Minecraft 26.2 cache. Normal authoring, CPU visual drafting/rendering, and an explicitly requested advisory/structural-only validation do not require Java.
The server uses the stable MCP TypeScript SDK v2, targets the MCP 2026-07-28 specification, and relies on SDK protocol negotiation for compatible clients.
The server is local and stdio-only. It does not install packs into a live world, expose an HTTP endpoint, or support Bedrock behavior packs.
What it provides
- Guarded datapack creation and resource editing with atomic writes and SHA-256 preconditions.
- Datapack inspection, resource lookup, and cached Minecraft command/registry search.
- Default vanilla-backed validation of every
.mcfunctioncommand with Minecraft 26.2's real dispatcher, registries, and component codecs. - Always-available structural validation, plus optional diagnostics from an operator-configured external Spyglass process.
- Disposable vanilla pack-loading and GameTest execution after explicit setup.
- Deterministic ZIP builds that fail when structural or vanilla command validation has errors.
- Paired datapack/resource-pack projects with truthful Minecraft
native,simulated,replacement, andrequires_modprofiles plus a separatecompilerSupportimplementation status. - A semantic custom-item model DSL,
minecraft:item_modelbindings, safe PNG import, profile-specific deterministic CPU previews, immutable repair revisions, and guarded multi-file commit. - Eight model-specific visual review profiles:
held_item,block,placeable,armor,head_wearable,projectile,gui_item, andentity_model, each with deterministic scenes, Packwright-authored reference geometry, advisory measurements, and an immutable render report. - Explicitly prepared, protocol-v3 framebuffer capture through the actual Minecraft 26.2 client renderer for items plus strict block, headwear, entity, and placeable representations. Required gameplay/world frames are authoritative for the recorded OpenGL environment; injected scale references, debug hitboxes, and matched empty-subject measurement controls are supplemental QA only. Every artifact carries an exact live-client fixture readback and canonical hash. The official client runs in a disposable deterministic studio with only Packwright's capture mod; the CPU renderer remains the fast deterministic first gate.
- Validation of the exact uncommitted proposal over stable datapack/resource-pack snapshots, followed by transactional deterministic ZIPs from the exact committed pack snapshots.
- Read-only MCP resources and workflow prompts for review, scaffolding, and GameTest authoring.
The visual compiler remains intentionally narrower than the Minecraft capability matrix: compilerSupport is full for custom_item, limited for conditional_item_state, and unsupported for every other target. The automatic compiler still emits custom items only. Protocol-v3 capture independently accepts a strict, declarative, hash-bound representation for block, head_wearable, entity_model, or placeable review; this stages existing vanilla identities, replacements, or display simulations but does not claim Packwright compiled a new native block/entity identity. Aggregate client-capture support is full for gui_item, limited for one-handed held_item, block, head_wearable, entity_model, and placeable, and unsupported for armor and projectile. Unsupported strategies are rejected before Minecraft launches. See the paired visual compiler guide and MCP tools, resources, and prompts.
Install and connect
Choose an existing directory that will contain the datapack projects Packwright may access. It must be an absolute path.
Generic MCP client configuration:
The workspace can instead be passed through the environment:
Using an exact package version is recommended for predictable automation. The server writes protocol messages only to stdout and sends logs to stderr.
CLI
The installed packwright-mcp binary defaults to serve when no subcommand is supplied:
Use --json with doctor, setup-version, capture, validate, test, or build for machine-readable output. Run packwright-mcp <command> --help for command-specific options. See the CLI reference and Configuration for all flags, precedence, environment variables, and exit behavior.
Vanilla setup and testing
setup-version is an explicit operator action. It records acceptance of the Minecraft EULA, obtains the official 26.2 server jar from Mojang, verifies the SHA-1 declared by Mojang's version manifest, and prepares local validation data. The MCP server never downloads the jar or accepts terms on a model's behalf.
Add --client-assets only to prepare the official client jar and asset-index readiness metadata used by asset-aware tooling. Add --client-capture to prepare the complete platform-specific launcher runtime, every indexed asset object, required libraries and natives, and pinned Fabric Loader 0.19.3; it implies the client-assets step. Every downloaded artifact is allow-listed and checked against the Mojang or Packwright-pinned digest. Minecraft client artifacts remain only in the local cache and are never copied into the workspace, npm package, or release artifacts. Semantic compilation still requires custom external textures/models to exist at their normal paths in the paired resource pack; it does not copy them from the client cache.
visual_capture is a separate, explicitly confirmed MCP operation. It requires Java 25, the completed --client-capture setup, and an interactive macOS graphical session capable of creating a real OpenGL window. Packwright creates hash-bound staging archives for the exact datapack/resource-pack proposal and launches the official client in offline developer mode with multiplayer and chat disabled. The resource-pack archive is staged as resourcepacks/packwright-proposal.zip and remains active during capture. The datapack archive is staged only as non-loadable provenance at packwright/provenance/datapack-proposal.zip; it is never installed in the disposable world, enabled, or selected. The world's loadable datapacks/ directory must remain empty, the integrated server must select exactly vanilla, and its available pack IDs must match Packwright's fixed Minecraft 26.2 built-in allow-list; any selected file/ pack, unexpected available pack, or filesystem entry aborts capture. The client runs only Packwright's bundled capture mod in a fresh disposable void-style studio, captures through Minecraft's screenshot API, and deletes the disposable game directory afterward. The report attests both activation modes, archive hashes, and selected pack IDs in addition to binding the representation, proposal and full pack snapshots, client/mod, OS/GPU/driver/OpenGL backend, resolution, GUI scale, FOV, render settings, camera, biome, time, weather, observed subject light plus deterministic light-source placement, tick/animation state, settling interval, source framebuffer hashes, and an exact live-client observed-fixture readback/hash for every view. Protocol v3 also requires a hash-bound ordinary-block floor ruler: black and white concrete occupy two fixed adjacent blocks, the capture mod places them through the integrated server, and every completed view records a live client readback plus canonical SHA-256. Because the ruler is ordinary studio geometry, it may provide authoritative world-scale context; the separate injected mannequin remains supplemental. An equippable_head plan always includes authoritative armor-stand front and side scenes. The studio records Minecraft's custom graphics preset because its fixed cloud, particle, shadow, render-distance, and simulation-distance overrides intentionally differ from an unmodified preset. Protocol v3 accepts static display nodes only, cannot claim a resettable block-atlas animation phase, and requires simulated entity rigs to provide separate exact idle, walk, and attack states.
By default, every first-person gameplay scene is first_person_vanilla: exact stock composition with no Packwright-injected arm. includeScaleReferenceViews adds paired first_person_scale_reference frames; includeDebugHitboxViews adds supported entity/placeable debug_hitbox_reference frames. Those opt-ins, bare-head comparisons, matched empty-subject measurement_control frames, and any same-frame injected comparison_reference or non-ordinary world_scale_reference aid carry augmented_qa_reference, appear only in the separate supplemental QA sheet, never enter pack output, and never satisfy authority. The entity profile's entity_player_scale mannequin is specifically a supplemental world_scale_reference, never authoritative gameplay/world evidence. Ordinary world geometry—and an armor stand when it is the actual declared headwear subject—can remain exact authoritative Minecraft frames. Non-skipped client measurements are derived from the bound framebuffer pixels; unavailable geometric checks are explicitly skipped with a reason rather than copied from CPU advisory measurements. A measurement that consumes a supplemental control remains advisory, even when its primary scene is required. Packwright never accepts account credentials, a user save, arbitrary commands/functions, executable content, or unapproved paths, and never falls back to CPU output.
For every profile with full or limited client support, production visual_validate requires current official-client evidence by default. visual_commit requires both the exact verified capture-report SHA-256 and proposalBindingStatus: "implemented". Protocol-v3 block, headwear, entity, and placeable results are currently capture_only: they provide exact representation QA but cannot authorize the current item-compiler proposal until that proposal implements the captured representation. A two-handed held item or unsupported representation is rejected rather than receiving incomplete client authority. Pass requireClientCapture: false only for explicitly advisory/fast validation; it does not make a supported-profile proposal committable. Profiles whose client implementation is truthfully unsupported keep their CPU-only path.
Required stock views, including first_person_vanilla, equipped player/armor-stand headwear subjects, and ordinary studio/world frames, have authoritative_environment_capture authority: they prove what the pinned client rendered for the exact recorded representation and environment. authorityScope: "required_views_only" explicitly excludes every bare-head or injected scale/comparison, debug-hitbox, matched measurement-control, and world_scale_reference aid—including the entity_player_scale mannequin; no supplemental frame or skipped supplemental measurement can replace a missing or failed required view. Every pixel measurement binds an explicit requiredForReadiness value. A failed or skipped critical measurement makes capture readiness false and blocks commit; critical warnings and best-effort skips remain visible without being greenwashed as measured passes. Supplemental-control/debug measurements are never critical. Hardware and drivers can legitimately change pixels, so screenshots are not promised byte-identical across GPUs or operating systems. A passed capture means the required evidence completed, verified, and has no failed or unavailable critical measurement—not that its appearance was aesthetically approved.
After setup, validate uses the pinned vanilla runtime by default to parse each logical .mcfunction command against Minecraft 26.2's real command dispatcher, loaded datapack registries, and component codecs. This catches invalid command, selector, item/component, particle, attribute, entity, and text-component syntax before packaging. validate --no-vanilla is the explicit structural-only escape hatch; builds never provide that bypass.
Both command validation and authoritative tests run Java 25 in newly created disposable state. Command validation substitutes inert placeholders for the pack's functions and validates unreferenced command probes, so it does not execute user functions. GameTests receive a freshly allocated universe; a user world path is never accepted. See Validation and vanilla testing.
Function-type GameTests resolve Minecraft's internal test_function registry; a datapack .mcfunction does not register a Test Function. Use minecraft:always_pass only for pack-load/runner smoke coverage, or an existing block-based test structure for behavior-focused tests.
Spyglass is deliberately not installed as a runtime dependency. The adapter is compatibility-pinned to Spyglass 0.4.65 and verifies the configured executable's --version output before use. An operator who has independently installed and reviewed a safe build may opt in with PACKWRIGHT_SPYGLASS_COMMAND; Packwright never downloads or enables it automatically.
Safety model
Packwright resolves every requested path beneath the configured workspace, rejects traversal and symlink escapes, limits scans and payloads, and never recursively deletes directories. Existing files can be replaced or deleted only with explicit intent and the current SHA-256. Raw authoring is limited to supported datapack text formats; binary NBT and pack.png may be inspected and packaged but not authored. Visual textures use a dedicated bounded PNG decoder, and accepted cross-pack proposals commit through a journaled transaction with all destination hashes checked first.
Read Security model before granting the server access to valuable projects. Consider source control and PACKWRIGHT_READ_ONLY=true for review-only sessions.
For common startup, cache, Java, validation, and build failures, see Troubleshooting. Maintainers and contributors can find the component boundaries in Architecture.
Development
Minecraft integration tests are intentionally separate because they download Mojang artifacts and require Java 25 plus explicit EULA acceptance. The official-client capture release gate additionally requires a protected, interactive macOS machine; ordinary CI does not download or launch the client. Contribution setup and test expectations are in CONTRIBUTING.md.
License and trademarks
Packwright MCP is available under the MIT License. External software and service terms are summarized in THIRD_PARTY_NOTICES.md.
Minecraft is a trademark of Microsoft Corporation. This project follows the Minecraft Usage Guidelines and uses no Mojang or Microsoft artwork.
來源:README.md,提交 a3ad619
工具
0版本歷史
1- v0.5.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分