Factorio as an idle game: an agent plays it on its own, everyone else watches
  • Go 81.6%
  • Lua 11.5%
  • Nix 6.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Mikhail Lukianchenko dbf237a67a
Serve humans their own MCP endpoint at /human
The binary trusts the gateway's JWT validation and only asks Pocket ID
userinfo for the groups claim, since access tokens carry none. Game tool
calls and agent turns go to a harness_log table so the log survives
restarts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 20:55:02 +00:00
.beads bd: register wayfinder types and sections 2026-11-28 14:03:58 +00:00
cmd/factorioidle Serve humans their own MCP endpoint at /human 2026-11-28 20:55:02 +00:00
docs Add fi_production: every item produced, total and last minute 2026-11-28 20:54:57 +00:00
internal Serve humans their own MCP endpoint at /human 2026-11-28 20:55:02 +00:00
mods Add fi_production: every item produced, total and last minute 2026-11-28 20:54:57 +00:00
nix Add fi_production: every item produced, total and last minute 2026-11-28 20:54:57 +00:00
.gitignore Track issues in beads 2026-11-28 13:46:04 +00:00
flake.lock Run the server the agent plays on 2026-11-28 13:45:16 +00:00
flake.nix Seed science-pack milestones and preempt on human prompts 2026-11-28 20:39:58 +00:00
go.mod Add the game MCP tools 2026-11-28 16:23:34 +00:00
go.sum Add the game MCP tools 2026-11-28 16:23:34 +00:00
README.md Rename to factorioidle 2026-11-28 13:55:54 +00:00

factorioidle

Factorio as an idle game: an agent plays it on its own, everyone else watches.

nixosModules.server is the server it plays on. Every player who joins is a spectator; the game runs with nobody joined; RCON listens on loopback.

{
  inputs.factorioidle.url = "git+https://sarak.sh/mikluko/factorioidle";

  # in a NixOS configuration
  imports = [ inputs.factorioidle.nixosModules.server ];
  services.factorioidle.server = {
    enable = true;
    rcon.environmentFile = "/run/secrets/factorio/rcon.env"; # RCON_PASSWORD=...
  };
}

The host must allow the unfree factorio-headless. Factorio takes the RCON password only on its command line, so any local user can read it.

nix flake check boots the server in a VM and checks it over RCON.