AI companions for Factorio 2.x via MCP. 51 RCON commands, hybrid mining, autonomous skills. Control companions with natural language through Claude Code.
git clone https://github.com/lveillard/factorio-ai-companion.gitFactorio AI Companion creates a bidirectional communication channel between Claude Code and Factorio 2.x multiplayer servers using the MCP protocol and RCON. Players send messages prefixed with /companion in Factorio chat, which Claude Code receives and can respond to, enabling natural language interaction with the game. The skill bridges Node.js (via Bun) with Factorio's Lua mod system, establishing a TCP connection to Factorio's RCON server on port 27000. This foundation supports future phases including AI-controlled characters, game state introspection, and automated building tasks. Setup requires installing a Factorio mod, configuring RCON in the game's config file, and running the MCP server locally.
Install the included Factorio mod to your mods directory, configure RCON in Factorio's config.ini (port 27000, password 'factorio'), then run the MCP server with 'bun run src/index.ts'. Type '/companion [message]' in Factorio chat—Claude Code will receive it via get_companion_messages tool and can respond with send_companion_message.
Get real-time game status updates from Factorio chat while playing
Send Claude-generated advice or planning strategies to teammates in-game
Create custom game narratives by having Claude respond to player messages
Prototype AI coordination logic between Claude and future autonomous agents
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/lveillard/factorio-ai-companionCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Create a Factorio AI companion named [NAME] with the following skills: [SKILLS]. The companion should prioritize [PRIORITIES] and avoid [RESTRICTIONS]. Provide the MCP configuration and Claude Code instructions for deployment.
Based on your request, I've created an AI companion named 'MinerMax' with the following skills: hybrid mining, resource prioritization, and automated construction. MinerMax will focus on iron ore and copper mining while avoiding areas with high enemy presence. Here's the MCP configuration: ``` [MCP] Name = MinerMax Skills = hybrid_mining, resource_prioritization, automated_construction Priorities = iron_ore, copper Restrictions = high_enemy_presence ``` To deploy MinerMax, use the following Claude Code instructions: ``` !deploy mcp MinerMax !set mining_priority iron_ore copper !set avoidance high_enemy_presence ``` MinerMax is now ready to assist you in your Factorio base. It will start by setting up mining outposts and expanding your resource gathering capabilities.
AI assistant built for thoughtful, nuanced conversation
Get more done every day with Microsoft Teams – powered by AI
Automate security compliance and monitor real-time security posture seamlessly.
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan