galgame-mcp-engine
Click on "Deploy 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., "@galgame-mcp-engine Start a new game"
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.
# 旮旯给木里不是这样的 — MCP 版
Galgame 不是这样的。
一个视觉小说世界引擎,以 MCP Server 形式运行。任何支持 MCP 协议的 AI 客户端都能驱动它。
谁不想在公司摸鱼的时候来一场甜甜的恋爱呢。
与 skill 版的关系
这是 galgame_world_engine skill 的 MCP 重构版。
Skill 版 | MCP 版 | |
运行方式 | Reasonix subagent | 独立 MCP Server |
格式保证 | 提示词约束 | 代码强制 |
兼容性 | 仅 Reasonix | 所有 MCP 客户端 |
状态管理 | LLM 自觉维护 | 代码自动维护 |
MCP 版完全兼容 skill 版的 .game/ 存档,无需迁移。
Related MCP server: OpenWebGAL Assistant
安装
git clone https://github.com/mchenziyi/galgame-mcp-engine.git
cd galgame-mcp-engine
pip install -e .依赖:Python 3.12+,DeepSeek API(由客户端调用,MCP Server 自身不调 LLM)。
配置
Reasonix
在项目根目录的 reasonix.toml 中添加:
[[plugins]]
name = "galgame-engine"
command = "python"
args = ["路径/galgame-mcp-engine/src/galgame_engine/server.py"]
env = { GALGAME_DIR = ".game" }然后将项目根目录的 prompt.md 内容作为系统提示词使用。
重启 Reasonix,输入 /galgame_world_engine 开始。
Claude Desktop
{
"mcpServers": {
"galgame-engine": {
"command": "python",
"args": ["路径/galgame-mcp-engine/src/galgame_engine/server.py"],
"env": { "GALGAME_DIR": "路径/你的/.game目录" }
}
}
}Cursor / Windsurf
在 MCP 配置中添加同上的 stdio server 配置。
使用
安装并配置后,在 AI 客户端中调用 MCP tools:
Tool | 说明 |
| 加载存档,返回完整世界上下文(角色/关系/时间线/谜团) |
| 提交玩家操作,引擎校验叙事格式并自动维护存档 |
| 叙事口吻的世界状态摘要 |
推荐配合项目根目录的 prompt.md 使用——它定义了叙事品质标准、角色规则和决策优先级。适配各客户端的桥接配置见 galgame-is-not-like-this。
架构
prompt.md ← 通用叙事 prompt(叙事哲学、品质要求)
│
▼
AI 客户端(LLM)
│ 生成叙事
▼
┌─────────────────────────────┐
│ galgame-engine (MCP) │
│ │
│ server.py 工具入口 │
│ engine.py 核心协调 │
│ state_manager 存档读写 │
│ response_builder 格式校验 │
└─────────────────────────────┘
│
▼
.game/ (4 个 JSON)许可证
MIT
Available Tools
3 toolsgalgame_actionB
提交一轮玩家操作。choice: A/B/C/自由文本。narrative: 完整四段叙事。引擎校验格式后更新存档并返回下一幕上下文。
Inputs: choice (required), narrative (required).
galgame_startA
启动或恢复 Galgame 世界引擎。返回完整世界状态上下文(角色全档案+关系+时间线+谜团+位置+物品)。
Inputs: no named parameters.
galgame_statusB
获取世界状态的口吻式摘要。
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a distinct purpose: starting the game, submitting actions, and getting status. No overlap or confusion.
All tools follow the 'galgame_' prefix with a clear verb (start, action, status), consistent snake_case pattern.
Three tools is appropriate for a galgame engine MCP, covering initialization, interaction, and state summary without bloat.
Covers core game loop well, but lacks an explicit save/load tool (though start handles recovery). Minor gap.
Maintenance
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
An MCP server that integrates with Discord to provide AI-powered features.
AI memory governance & hallucination-blocking MCP server with verifiable knowledge cells.
1
Related MCP Servers
- FlicenseBqualityDmaintenanceA novel game server supporting multi-branch visual novel scenarios in English and Japanese, designed to help understand MCP Resources.36-
- FlicenseNot gradedqualityDmaintenanceMCP server that automates WebGAL game development tasks such as resource management, script editing, documentation lookup, and AI-powered voice generation using LLMs.1-
- AlicenseNot gradedqualityDmaintenanceLocal MCP server that gives AI agents 44 engine tools to build, run, and debug real 2D and 3D games through conversation.MIT
- AlicenseCqualityAmaintenanceAn MCP server for Ren'Py project tooling that enables AI agents to inspect game state, evaluate expressions, read/write variables, and capture screenshots from running Ren'Py games.54395 PyPI12MIT