factorio-mcp

factorio-mcp

Enables control and inspection of a Factorio 2.0 server via RCON, with tools for administration, player management, game state queries, and Lua execution.

Category
Visit Server

README

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

Factorio RCON Setup

For a local Factorio game, enable RCON from the hidden advanced options:

  1. Hold Ctrl + Alt while clicking Settings.
  2. Click the newly visible The rest button.
  3. Enable the local RCON socket.
  4. Set an RCON password.
  5. Use the same password as FACTORIO_RCON_PASSWORD when 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 typecheck

Run

FACTORIO_RCON_HOST=localhost \
FACTORIO_RCON_PORT=27015 \
FACTORIO_RCON_PASSWORD=change-me \
npm start

Environment variables:

Name Default Description
FACTORIO_RCON_HOST localhost Factorio RCON host
FACTORIO_RCON_PORT 27015 Factorio RCON port
FACTORIO_RCON_PASSWORD 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 with serpent.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 typecheck

There is no build step at the moment; the server runs directly from src/index.ts.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured