Skip to main content
Glama
shapez 1 游玩 MCP

shapez 1 游玩 MCP

by aymidasing

shapez 1 游玩 MCP

本地 stdio 服务连接 Steam shapez 1.5.6 的调试端口。项目配置入口为 dist/server.mjs,默认允许写入。玩家在游戏里打开目标档,agent 通过 status 核对名称与内部 ID,再用 game select 绑定当前世界。切档、重新加载和重连后需要重新绑定。服务依赖本机 Node.js 22+、已安装的游戏和监听在 127.0.0.1:9222 的调试端口。若尚未启用,在 Steam 游戏启动选项加入 --remote-debugging-port=9222 并重新启动游戏。

在 Codex 中打开本项目,使用项目自带的 shapez1-play skill。完整的建筑、端口、电路和满带配比随项目提供。其他 MCP 客户端可用 node 启动本目录下 dist/server.mjs 的绝对路径,并将该 skill 目录加入客户端的技能发现路径。要仅观察游戏,可设置 SHAPEZ_MODE=observe。

一段实际游玩流程

工具

参数

效果

status

{}

当前存档名、internalId、世界规模、活动图层、写入绑定状态

game

{"op":"select","id":"从 status 读取"}

绑定该存档

map_region

{"region":[-8,0,8,8]}

区域实体和逐格资源,或加 format:"image" 查看 PNG

game

{"op":"route","route":[[-8,3],[-2,3],[-2,0]]}

覆盖直段并按进出方向铺出折角

game

{"op":"layer","layer":"wires"}

通过 E 键对应的游戏处理器切到电路视角

game

{"op":"wire","route":[[1,2],[6,2]],"color":"second"}

铺电线并检查沿线意外接网

game

{"op":"building","at":[3,2],"layer":"wires"}

查询信号、网络编号及冲突

game

{"op":"blueprint","region":[0,0,8,8]}

缓存所选建筑并返回短句柄和单次粘贴费用

game

{"op":"blueprint","blueprintMode":"paste","handle":"返回的句柄","targets":[[12,0],[24,0]]}

按玩家蓝图规则连续复制两份

排查停产时用 game {"op":"trace","at":[-4,32]},从出料端沿物料端口反查。批量验线用 game {"op":"check_signals","layer":"regular","reference":[-99,55],"tiles":[[-100,57],[-99,59]]}。正常只返回检查数和失败数,查询原始网络值仍可用 signals。

同档重连会自动恢复只读查询。分页返回 restarted:true 时,从该页重新累计。写操作支持唯一 requestId,重连后先查原回执。已知部分成功的批建会列出首个失败格及其后跳过的数量。MCP 进程重启后,游标和服务端回执失效。

矩形右下角不包含在内。区域图每边最多 32 格,一次返回覆盖该矩形的全部实体;当前屏幕与 HUD 用 screenshot。较大范围可按块平铺,或用 entities、resources 的摘要和冻结分页。坐标推荐 [x,y],兼容旧式坐标对象。批建回报完成数量及首个失败位置。预演直带的快照只记录该批格子的带布局,MCP 重启后失效。

Related MCP server: bitbrowser-agent-kit

构建、运行与验证

npm ci
npm test
npm run verify:live
npm run verify:engine

已有依赖时直接运行 npm test。离线测试不访问游戏。两项实机检查需游戏调试端口已启动。verify:live 通过官方 stdio 客户端以只读模式验证当前存档、分页、区域图像和产能;verify:engine 在同版本引擎中创建独立的内存工厂,验证折弯连通、电线并网冲突、蓝图设置、扣费和拆除。修改后重新构建并重连 MCP,使客户端重新发现工具。旧设计稿中的固定存档、只读限制和待实现清单属于历史记录。

Available Tools

11 tools
apply_beltsA

提交已预演的计划并留存快照,返回携带快照编号的回执。

Inputs: plan (required), requestId (required). Returns: data, error

entitiesA
Read-only

查询建筑分组或冻结明细。region 为半开 tile 区间,摘要的 firstCursor 用于同一视图的分页。

Returns: data, error

gameC

select(id=活动档 internalId) 绑定写入;layer 切 E 视角;trace(at) 查上游堵点;check_signals(tiles,reference 或 network,pin,value) 只报异常;hub/speeds/catalog/building/path/flow 查询;place(items)/remove(tiles 或 region)/route(route)/wire(route,color,join)/blueprint(capture 或 paste)/configure/upgrade。坐标 [x,y]。

Inputs: op (required), at, dx, dy, +22 more. Returns: data, error

map_regionB
Read-only

完整局部地图。region=[x0,y0,x1,y1] 右下不含,最多 32×32,format=rows/image,layer=regular/wires/both。

Inputs: region (required), layer, format. Returns: data, error

operation_statusB
Read-only

按请求键查询施工或恢复回执。

Inputs: requestId (required). Returns: data, error

preview_beltsA
Read-only

预演直带施工:返回每格前后状态与邻格影响,不改变现场,计划 60 秒有效。

Inputs: ops (required), region (required). Returns: data, error

resourcesC
Read-only

查询资源斑块。用 color:green 或 shape:CuCuCuCu 等规范键筛选。

Returns: data, error

restore_snapshotB

按快照编号与原施工请求键恢复施工前现场。

Inputs: snapshot (required), requestId (required), applyRequestId (required). Returns: data, error

sample_flowB
Read-only

在时间窗内多次采样指定区域的物流与交付进度,返回序列与增量。

Inputs: points (required), region (required), samples, seconds. Returns: data, error

screenshotA
Read-only

截取当前存档的游戏画面与 HUD,返回 PNG 图像。窗口不可见时会失败。

Inputs: no named parameters. Returns: data, error

statusB
Read-only

查看当前活动存档、关卡、世界规模、视野和可用能力。

Inputs: no named parameters. Returns: data, error

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 11 tools

    Disambiguation2/5

    Most dedicated tools (status, entities, resources, screenshot, map_region, preview_belts, apply_belts, operation_status, restore_snapshot) have reasonably distinct purposes, but the 'game' tool is an overloaded mega-tool whose many query and mutation subcommands overlap with several of those dedicated tools. Agents may struggle to decide when to use 'game' versus 'entities', 'resources', 'sample_flow', or 'map_region', creating unclear boundaries.

    Naming Consistency3/5

    All names use snake_case and are readable, but the naming pattern is mixed: some are bare nouns (status, entities, resources, game), some are verb_noun (sample_flow, preview_belts, apply_belts, restore_snapshot), and some are noun phrases (map_region, operation_status). There is no predictable verb or noun convention across the set.

    Tool Count3/5

    Eleven tools is a reasonable raw count, but the 'game' tool bundles dozens of distinct operations into one entry, so the effective surface is much larger than the count suggests. The count under-represents the domain and hides complexity inside a single catch-all tool.

    Completeness4/5

    The set covers inspection, construction preview, apply, snapshot restore, operation receipts, signal checks, and several query modes, giving solid lifecycle coverage for a shapez automation server. Minor gaps such as explicit cancellation or broader save/load management may exist, but core workflows appear workable.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides status, stats, nearby scans, item analysis, screenshots, ghost placement, in-game replies, and drone status for Factorio via stdio JSON-RPC.
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Exposes BitBrowser automation to MCP hosts over stdio, letting agents check online status and inspect windows, tabs, and displays, and carry out authorized window creation, launch, close, delete, rename, URL browsing, tab actions, fingerprint randomization, grid/diagonal/adaptive arrangement, and Cookie or HTTP cache cleanup through the official local API. Write operations follow a prepare → execute → inspect flow with handoff artifacts built from tab snapshots.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Exposes a live shapez.io factory to MCP clients through eight tools, letting them read world state, place and delete buildings, fast-forward game ticks deterministically, and move blueprints or savegame snapshots. All operations run locally against a companion bridge process over 127.0.0.1.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Exposes 21 civ_* tools over a zero-dependency JSON-RPC stdio layer so AI agents can create worlds, open deterministic simulation sessions, advance turns, inspect chronicles/states, export, and replay-verify results. It also enables AI monarch rounds, DM/petty-event adjudication, configurable and tile-level field plugins, and a local browser viewer for maps, decisions, and logs.
      AGPL 3.0