Skip to main content
Glama
PlasmaChroma

Factorio MCP Bridge

by PlasmaChroma

Factorio MCP Bridge

M0 is a working, tested integration checkpoint for Factorio 2.0.77 on Windows. A Lua mod answers bounded JSON commands over loopback RCON; one shared TypeScript daemon serves MCP clients over stdio and authenticated Streamable HTTP.

The bounded M1 read-only checkpoint now passes live spatial, inventory, diagnostic, cache, isolation, and reload acceptance tests. Broader specification features remain deferred. See the M1 checkpoint guide. Gameplay mutations, plans, construction, and jobs remain unavailable.

Reproduce the checkpoint

Use Node 24.19.0 and Python 3.11+. In PowerShell:

npm ci
python -m venv .venv
.venv/Scripts/python.exe -m pip install -r requirements-test.txt
npm run checkpoint:m0

The live runner defaults to C:/Steam/steamapps/common/Factorio/bin/x64/Factorio.exe. Set FACTORIO_EXECUTABLE and optionally FACTORIO_RUNTIME_API for another installation. It requires matching 2.0.77 runtime documentation.

Every run creates a new .fmcp/live/<run>/ directory with separate game configuration, mods, and saves. It disables public/LAN discovery, binds game/RCON/daemon sockets to loopback, and stops its processes on completion. It never installs into your normal mod directory or opens an existing user save. Temporary test credentials stay in ignored local files; do not publish .fmcp/.

Command

Purpose

npm run check

Generate contracts, typecheck, validate specification fixtures, run unit/protocol tests, build

npm run test:live

Exercise the previously built CLI/mod against an isolated real server

npm.cmd run checkpoint:m1

Validate the bounded read slice using a copy of the running charted development world

npm run checkpoint:m0

Run the complete checkpoint and record compatibility/test status

npm.cmd run dev:world

Build, run the live checkpoint, then leave the disposable world running for manual MCP testing

npm run format:check

Check source formatting

dev:world prints a ready-to-copy stdio command with an explicit local configuration path. Keep that terminal open; press Ctrl+C to stop the test world and daemon. Do not run two checkpoint processes concurrently because they both update the latest report.

Outputs are dist/cli.js, dist/factorio-mcp-bridge_0.2.1.zip, and the unpacked mod under dist/mod/. The CLI bundles all non-Node runtime dependencies. Mod ZIP entries have fixed ordering and timestamps. Live reports are written to artifacts/live-latest.json and the individual run directory.

Related MCP server: godot-mcp-rts

The seven canonical tool definitions remain stable in the tool schema catalog. Effective discovery includes the tested integration, recipe, research, and production paths when an operator policy is configured. The bounded spatial, inventory, resource, artifact, and observation operations are now tested and advertised. Deferred tools return CAPABILITY_UNAVAILABLE, never simulated factory results.

The operator skill and workflow examples describe later operation flows as well; discover effective capabilities before using them. The original handoff validation describes static specification fixtures, while checkpoint test status records the implemented M0 lane.

Version 0.2.1 adds bounded, scoped event history through query.events; see the event contract.

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables control and inspection of a Factorio 2.0 server via RCON, with tools for administration, player management, game state queries, and Lua execution.
    19
    -
  • A
    license
    Not graded
    quality
    C
    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