LorAI MCP
The LorAI MCP server lets an AI agent fully control and automate gameplay in Library of Ruina via game state monitoring, battle automation, UI navigation, static data queries, and debug tools.
Game State & Diagnostics
health_check— Verify the in-game mod HTTP bridge is onlineget_game_state— Retrieve the full current game state (navigation, progression, floors, inventory, battle info)get_state_layer— Fetch a specific layer of game state (e.g.battle,floors,navigation)get_battle_units— Get detailed HP, speed dice, hand cards, and emotion level for all battle unitsget_emotion_candidates— List available emotion card choices duringRoundEndPhaseget_stage_info— Get controller state for a specific stageget_action_status— Check status of async/deferred actions
Static Data Queries
get_static_data_list— List all available static game data files (cards, books, enemies, passives, etc.)get_game_data_item/get_game_data_items— Retrieve one or multiple items from a static collection by ID
UI Navigation
navigate— Navigate to a specific UI phase (e.g. Sephirah, Invitation, BattleSetting)start_game— Click Continue/New Game on the title screenskip_story— Skip the current story or event scene
Battle Automation
start_battle— Full flow: navigate to stage, auto-select books, prepare and start the battlebattle_loop— Auto-play an entire battle end-to-end (handles dice, card placement, emotion cards, phase stuck detection, story skips)play_round— Play a single battle round (stop dice → auto-play cards → confirm)select_emotion_card— Manually select an emotion card by indexclick_battle_result— Click the battle result button after a battle endsclose_battle_scene— Close the battle scene and return to the main UI
Low-Level / Debug
act— Execute any raw game action by namelist_methods/call_method— List or call public methods on game objects via reflectionkill_all_enemy— Instantly kill all enemy units (debug/cheat)
Click on "Install 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., "@LorAI MCPstart a battle in Urban Nightmare"
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.
LorAI MCP
让 AI 智能体玩《废墟图书馆》。
通过 MCP 协议将游戏状态、战斗操作、UI 导航全部暴露给 LLM——AI 读血量、看手牌、选情绪卡、出牌打怪,全自动。
AI Agent ←MCP→ Python Server ←HTTP→ C# Mod (in-game)安装
面向人类用户
复制以下提示并粘贴到你的 LLM 智能体(kimi-code、Claude Code、Cursor 等):
按照以下安装指南安装和配置 LorAI MCP,游戏安装路径是:<填你的游戏路径,例如 D:\steam\steamapps\common\Library Of Ruina> https://raw.githubusercontent.com/hongyue0721/lorAI-mcp/refs/heads/master/docs/guide/installation.md
安装完成后,用 health_check 工具验证 MCP 连通。
面向 LLM 智能体
获取安装指南并按照说明操作。第一步:向用户询问 Library of Ruina 的游戏安装路径。
curl -s https://raw.githubusercontent.com/hongyue0721/lorAI-mcp/refs/heads/master/docs/guide/installation.md拿到路径后,安装指南中的 <游戏路径> 占位符全部替换为用户提供的路径。
卸载
要移除 LorAI MCP:
按照 https://raw.githubusercontent.com/hongyue0721/lorAI-mcp/refs/heads/master/docs/guide/installation.md 中的「卸载」章节执行卸载步骤。
Related MCP server: Pokemon MCP Server
前置条件
依赖 | 说明 |
Steam | 安装 Library of Ruina (1.1.0.6a13) |
Python 3.10+ | MCP Server 运行环境 |
.NET Framework 4.7.2 | C# Mod 编译(需 Developer Pack 或 VS Build Tools) |
游戏内 Mod 加载器 |
它能做什么
读取游戏状态 — 关卡列表、角色血量、手牌、骰子、buff、敌人信息
自动战斗 — AI 决策出牌、推进回合、处理情绪卡选择
UI 导航 — 选楼层、进邀请、开战、结算、跳剧情
静态数据查询 — 卡牌、书籍、敌人、被动能力的完整数据
反射调试 — 列出/调用任意游戏方法,深度控制
项目结构
lorAI-mcp/
├── lor_mcp/ # Python MCP Server
│ ├── server.py # FastMCP 入口 + 基础 tools
│ ├── tools.py # Guided tools(战斗自动化)
│ ├── setup.py # MCP 一键注册脚本
│ ├── proxy_server.py # HTTP 代理回退
│ └── config.py # 环境变量配置
├── LorAIHost/ # C# Mod(HTTP bridge + 状态导出 + 战斗自动化)
│ ├── LorAIHostMod.cs # ModInitializer 入口
│ ├── HttpServer.cs # HTTP 服务(端口 17127)
│ ├── StateExporter.cs # 游戏状态导出
│ ├── ActionHandler.cs # Action 分发
│ ├── AdvancedActions.cs # 选书/情绪卡/phase 推进
│ ├── BattleActions.cs # 出牌/确认/结束战斗
│ └── ...
├── docs/guide/installation.md # 安装指南(给智能体读的)
└── pyproject.toml配置
环境变量 | 默认值 | 说明 |
|
| 游戏 bridge 地址 |
|
| Python 代理回退地址 |
|
| 工具集( |
| (Steam 默认路径) | 代理服务器的游戏数据目录 |
许可证
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hongyue0721/lorAI-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server