factorio-mcp

jerome3o/factorio-mcp

3.3

If you are the rightful owner of factorio-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Model Context Protocol (MCP) server for managing Factorio servers using Claude.

The Factorio MCP Server is designed to streamline the management of Factorio game servers by leveraging the capabilities of Claude, an advanced AI model. This server setup includes two primary components: an HTTP backend that securely wraps RCON commands, and an MCP server that provides a high-level interface for interacting with Factorio. The architecture ensures secure communication and command execution, isolating sensitive information like the RCON password. By using this setup, server administrators can efficiently manage game servers, execute commands, and interact with players through a user-friendly interface. The system is built to be robust, secure, and easy to deploy, making it an ideal solution for both small and large-scale Factorio server management.

Features

  • Secure HTTP interface for RCON commands
  • High-level interaction with Factorio using Claude
  • Player management and server monitoring
  • Screenshot capabilities
  • Lua command execution with explanations

Usages

usage with local integration stdio

python
mcp.run(transport='stdio')  # Tools defined via @mcp.tool() decorator

usage with local integration ide plugin

{
  "mcpServers": {
    "factorio": {
      "command": "python",
      "args": ["factorio_mcp.py"]
    }
  }
}

usage with remote integration sse

python
mcp.run(transport='sse', host="0.0.0.0", port=8000)  # Specify SSE endpoint

usage with remote integration streamable http

yaml
paths:
  /mcp:
    post:
      x-ms-agentic-protocol: mcp-streamable-1.0  # Copilot Studio integration

usage with platform integration ai toolchains

{"command": "docker", "args": ["run", "-e", "API_KEY=your_backend_api_key", "ghcr.io/github/github-mcp-server"]}

usage with platform integration enterprise saas

{
  "mcpServers": {
    "factorio": {
      "command": "python",
      "args": ["factorio_mcp.py"]
    }
  }
}

Tools

  1. execute_command

    Execute raw RCON commands

  2. run_lua

    Run Lua code with announcements

  3. get_player_count

    Check online players

  4. send_message

    Broadcast to all players

  5. give_items

    Give items to players

  6. teleport_player

    Teleport players

  7. get_player_info

    Get player details

  8. take_screenshot

    Take screenshots