factorio-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@factorio-mcp list connected players"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
factorio-mcp
MCP server for controlling and inspecting a Factorio 2.0 server over RCON.
It exposes tools for common server administration and game-state queries, plus escape hatches for raw console commands and Lua snippets.
Requirements
Node.js 23+ with native TypeScript stripping support
A running Factorio server with RCON enabled
An MCP client that can launch stdio servers
Related MCP server: mc-rcon-mcp
Factorio RCON Setup
For a local Factorio game, enable RCON from the hidden advanced options:
Hold
Ctrl+Altwhile clicking Settings.Click the newly visible The rest button.
Enable the local RCON socket.
Set an RCON password.
Use the same password as
FACTORIO_RCON_PASSWORDwhen starting this MCP server.
For a dedicated server, start Factorio with RCON enabled, or set the equivalent values in your server config:
factorio --start-server save.zip \
--rcon-port 27015 \
--rcon-password "change-me"Keep the RCON port private. This server can execute admin commands and arbitrary Lua through Factorio's /silent-command.
Install
npm install
npm run typecheckRun
FACTORIO_RCON_HOST=localhost \
FACTORIO_RCON_PORT=27015 \
FACTORIO_RCON_PASSWORD=change-me \
npm startEnvironment variables:
Name | Default | Description |
|
| Factorio RCON host |
|
| Factorio RCON port |
| empty | Factorio RCON password |
MCP Client Config
Example stdio configuration:
{
"mcpServers": {
"factorio": {
"command": "node",
"args": ["/path/to/factorio-mcp/src/index.ts"],
"env": {
"FACTORIO_RCON_HOST": "localhost",
"FACTORIO_RCON_PORT": "27015",
"FACTORIO_RCON_PASSWORD": "change-me"
}
}
}
}If you install it as a package or link it locally, you can use the factorio-mcp bin instead of calling node src/index.ts directly.
Tools
Command tools:
rcon_command: execute a raw Factorio console command.lua_exec: execute Lua through/silent-command; return values are printed and tables are serialized withserpent.line.send_chat: send a chat message as[MCP].save_game: save the current game, optionally with a save name.
Player tools:
get_players: list connected players.get_player_info: inspect a player's position, inventory, health, and crafting state.player_action: kick, ban, unban, mute, unmute, promote, or demote a player.
Game-state tools:
get_game_status: tick, age, player count, evolution, research, and speed.get_research_status: current research, progress, queue, and completed technologies.get_production_stats: item or fluid production and consumption stats.get_surface_info: surface details, pollution, and entity counts.find_entities: search entities by name, type, area, or radius.get_logistics_info: logistic network robot and storage information.get_planets: list Space Age planets.get_space_platforms: list Space Age platforms.get_alerts: active alerts for a force.get_electric_network: electric network production, consumption, and satisfaction.get_train_info: train state, schedules, and cargo.get_player_surroundings: nearby entities, resources, enemies, GUI state, cursor stack, vehicle, and walking state.
Resources
factorio://server-status: connection status and basic game information.
Development
npm run typecheckThere is no build step at the moment; the server runs directly from src/index.ts.
Available Tools
19 toolsfind_entitiesA
Search for entities on a surface. Can search by name, type, or area. Returns position, name, health, and other info for each match.
Inputs: name, type, limit, radius, +2 more.
get_alertsB
Get active alerts for a force (entity destroyed, turret fire, no storage, etc.).
Inputs: force, surface.
get_electric_networkA
Get electric network statistics: power production, consumption, battery charge, satisfaction.
Inputs: force, surface, position.
get_game_statusA
Get high-level game state: tick count, map age, player count, evolution factor, current research, game speed.
Inputs: no named parameters.
get_logistics_infoB
Get logistics network information: robot counts, items in logistic storage, pending requests.
Inputs: force, surface, position.
get_planetsB
List all planets in the game (Space Age). Shows name, surface properties, and connections.
Inputs: no named parameters.
get_player_infoA
Get detailed information about a specific player: position, inventory summary, character stats, crafting queue.
Inputs: player (required).
get_playersB
List all online players with basic info (position, surface, force).
Inputs: no named parameters.
get_player_surroundingsA
See what's around a player — nearby entities grouped by type, what they're looking at, open GUI, walking state, and the terrain/resources in the area. Use this to understand what the player is currently doing.
Inputs: player, radius.
get_production_statsB
Get item/fluid production and consumption statistics for a force on a surface. In Factorio 2.0, stats are per-surface.
Inputs: item, type, force, surface.
get_research_statusB
Get research status for a force: current research, progress, research queue, and recently completed technologies.
Inputs: force.
get_space_platformsA
List all space platforms (Space Age). Shows platform name, state, location, and hub info.
Inputs: force.
get_surface_infoB
Get information about a game surface (planet): name, map settings, daytime, pollution stats, entity counts.
Inputs: surface.
get_train_infoC
Get information about trains: list trains, their schedules, states, and cargo.
Inputs: force, limit, surface.
lua_execA
Execute Lua code on the Factorio server via /silent-command. The code is wrapped in a function — use 'return' to send results back. Results are serialized via serpent.line for tables. Use this for any game state query not covered by specific tools.
Inputs: code (required).
player_actionC
Perform an admin action on a player: kick, ban, unban, mute, unmute, promote, or demote.
Inputs: action (required), player (required), reason.
rcon_commandA
Execute a raw console command on the Factorio server via RCON. Use this as an escape hatch for commands not covered by other tools.
Inputs: command (required).
save_gameB
Save the current game. Optionally specify a save name.
Inputs: name.
send_chatA
Send a chat message visible to all players on the server.
Inputs: message (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Each tool targets a distinct aspect of the Factorio server: players, entities, surfaces, logistics, etc. Overlaps are minimal and clarified by descriptions, e.g., get_game_status vs get_research_status serve different detail levels.
Most tools follow a 'get_' prefix for queries, but there are deviations like 'find_entities', 'lua_exec', 'player_action', and 'save_game'. The naming is readable and mostly consistent, though not perfectly uniform.
With 19 tools covering player info, world state, actions, and escape hatches, the count is well-scoped for a complex game server. Each tool serves a clear purpose without redundancy.
The tool set covers key game aspects (players, entities, logistics, production, research, trains, surfaces) and includes escape hatches (lua_exec, rcon_command) for any uncovered queries. Missing features like blueprint management are not core to the server's purpose.
Related MCP Connectors
Manage FadeHost game servers, Discord bots and VPS: console, stats, backups, logs, lifecycle.
Manage NodePal Minecraft servers, worlds, mods, backups and console from AI agents.
Start your own Minecraft: Java Edition server, add mods from Modrinth, and run its console.
Manage game servers, configurations, players, and groups through the GameServerApp MCP server.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables control of a Minecraft server through RCON commands via natural language, including game commands, chat-based AI interactions, and server management capabilities.6-
- AlicenseAqualityDmaintenanceEnables Minecraft server management via RCON: execute commands, list players, get server info, manage whitelist and operators.91MIT
- AlicenseAqualityCmaintenanceLets an AI assistant control a live Minecraft server over RCON: list players, broadcast chat, teleport, give items, change weather/time, kick, or run any raw vanilla/plugin command.8MIT
- FlicenseNot gradedqualityCmaintenanceEnables MCP clients to query a live Factorio 2.0 world through bounded read-only operations covering spatial, inventory, resource, and diagnostic data over loopback RCON.1-