
widami/factomcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
RCON을 통해 Factorio Player를 제어하는 기본 MCP 서버
개요
Claude play Factorio를 하게 하는 MCP 서버. Claude는 주변, 광산 자원, 장소 건물, 연구 관리 및 공장을 구축 할 수 있습니다. - 모든 자연 언어를 통해. 그것은 느리고, 공간적인 사고를 만들고, 토큰을 빠르게 태울 수 있습니다. 하지만 그것은 작동, 그리고 그것은 정말 재미를 볼. 서버는 RCON을 통해 실행 Factorio 인스턴스에 연결하고 게임에서 Lua 명령을 실행하는 MCP 도구 세트를 노출합니다. Claude는 게임 상태를 인식하고 플레이어로 작업을 수행 할 수있는이 도구를 사용합니다. - Factorio (tested on 2.0) - Python 3.10 + - Claude Code (또는 MCP 호환 클라이언트) - 서버는 Factorio에서 실행해야합니다. RCON은 멀티플레이어 모드에서만 작동합니다. 당신은: 그런 다음 Factorio를 정상적으로 시작하고 멀티 플레이어 (LAN) 게임을 엽니 다. Factorio는 GUI에서 일반적으로 표시되지 않는 숨겨진 구성 옵션의 수를 지원합니다.
개요(AI 번역)
Claude play Factorio를 하게 하는 MCP 서버. Claude는 주변, 광산 자원, 장소 건물, 연구 관리 및 공장을 구축 할 수 있습니다. - 모든 자연 언어를 통해.
** 층 경고: ** 그것은 느리고, 공간적인 사고를 만들고, 토큰을 빠르게 태울 수 있습니다. 하지만 그것은 작동, 그리고 그것은 정말 재미를 볼.
어떻게 작동합니까?
서버는 RCON을 통해 실행 Factorio 인스턴스에 연결하고 게임에서 Lua 명령을 실행하는 MCP 도구 세트를 노출합니다. Claude는 게임 상태를 인식하고 플레이어로 작업을 수행 할 수있는이 도구를 사용합니다.
요구 사항
- Factorio (2.0에서 테스트)
- 파이썬 3.10+
- Claude Code (또는 MCP 호환 클라이언트)
- 서버는 Factorio로 same Machine에서 실행해야 합니다.
설치
##1. Factorio에서 RCON 구성
RCON은 멀티플레이어 모드에서만 작동합니다. 당신은:
** 옵션 A - 명령줄에서 시작:**
** 옵션 B - 로컬 멀티 플레이어 게임을 시작하고 RCON을 config.ini:**
그런 다음 Factorio를 정상적으로 시작하고 멀티 플레이어 (LAN) 게임을 엽니 다.
** 옵션 C - 게임 GUI를 통해 구성: **
Factorio는 GUI에서 일반적으로 표시되지 않는 숨겨진 구성 옵션의 수를 지원합니다.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
FactoMCP
An MCP server that lets Claude play Factorio. Claude can walk around, mine resources, place buildings, manage research, and build out a factory — all through natural language.
Fair warning: It’s slow, makes spatial reasoning mistakes, and burns through tokens fast. But it works, and it’s genuinely fun to watch.
How it works
The server connects to a running Factorio instance via RCON and exposes a set of MCP tools that execute Lua commands in the game. Claude uses these tools to perceive the game state and take actions as the player.
Requirements
- Factorio (tested on 2.0)
- Python 3.10+
- Claude Code (or any MCP-compatible client)
- The server must run on the same machine as Factorio
Setup
1. Configure RCON in Factorio
RCON only works in multiplayer mode. You need to either:
Option A — start from the command line:
factorio --start-server mysave.zip --rcon-port 25575 --rcon-password CHANGE_ME
Option B — start a local multiplayer game and set RCON in config.ini:
[rcon]
rcon-port=25575
rcon-password=CHANGE_ME
Then start Factorio normally and open a multiplayer (LAN) game.
Option C — configure via the in-game GUI:
Factorio supports a number of hidden configuration options that are not normally shown in the GUI. They can be accessed by holding CTRL + ALT when clicking the “Settings” button in the pause menu, which will cause a new button labeled “The rest” to appear. The RCON port and password settings are in there.
2. Install the server
git clone https://github.com/WidAmi/FactoMCP.git
cd FactoMCP
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
3. Configure the MCP connection
The repo includes a mcp.json.example you can use as a starting point. Copy it to .mcp.json and edit it to match your setup:
{
"mcpServers": {
"factomcp": {
"type": "stdio",
"command": "/path/to/FactoMCP/.venv/bin/python",
"args": ["/path/to/FactoMCP/server.py"],
"env": {
"RCON_HOST": "127.0.0.1",
"RCON_PORT": "25575",
"RCON_PASSWORD": "CHANGE_ME"
}
}
}
}
Or set the environment variables manually and run:
RCON_PASSWORD=CHANGE_ME python server.py
4. Connect Claude Code
From the FactoMCP directory, start Claude Code:
claude
Claude Code will automatically pick up .mcp.json. You can verify the server connected with /mcp.
5. Start playing
With Factorio running and Claude Code connected, just tell Claude what to do:
Take a look around and find the ore patches
Build a basic iron smelting setup near the iron ore
Set up automated coal mining to keep the furnaces running
Environment variables
| Variable | Default | Description |
|---|
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
{
"mcpServers": {
"factomcp": {
"type": "stdio",
"command": "/path/to/FactoMCP/.venv/bin/python",
"args": ["/path/to/FactoMCP/server.py"],
"env": {
"RCON_HOST": "127.0.0.1",
"RCON_PORT": "25575",
"RCON_PASSWORD": "CHANGE_ME"
}
}
}
}