Content
# Galgame Is Not Like This — MCP Edition
> Galgame is not like this.
A **visual novel world engine**, running as an MCP Server. Any AI client that supports the MCP protocol can drive it.
## Relationship with Skill Edition
This is the MCP refactoring of [galgame_world_engine skill](https://github.com/mchenziyi/galgame-is-not-like-this).
| | Skill Edition | MCP Edition |
|---|---------|--------|
| Runtime | Reasonix subagent | Standalone MCP Server |
| Format Guarantee | Prompt constraints | Code enforcement |
| Compatibility | Reasonix only | All MCP clients |
| State Management | LLM self-maintenance | Code auto-maintenance |
The MCP edition is fully compatible with the `.game/` archives of the skill edition, no migration required.
## Installation
```bash
git clone https://github.com/mchenziyi/galgame-mcp-engine.git
cd galgame-mcp-engine
pip install -e .
```
Dependencies: Python 3.12+, DeepSeek API (called by clients, MCP Server does not call LLM itself).
## Configuration
### Reasonix
Add to `reasonix.toml` in the project root:
```toml
[[plugins]]
name = "galgame-engine"
command = "python"
args = ["path/to/galgame-mcp-engine/src/galgame_engine/server.py"]
env = { GALGAME_DIR = ".game" }
```
Use the content of `prompt.md` in the project root as the system prompt.
Restart Reasonix, input `/galgame_world_engine` to start.
### Claude Desktop
```json
{
"mcpServers": {
"galgame-engine": {
"command": "python",
"args": ["path/to/galgame-mcp-engine/src/galgame_engine/server.py"],
"env": { "GALGAME_DIR": "path/to/your/.game directory" }
}
}
}
```
### Cursor / Windsurf
Add the same stdio server configuration to the MCP configuration.
## Usage
After installation and configuration, call MCP tools in the AI client:
| Tool | Description |
|------|------|
| `galgame_start` | Load archive, return complete world context (characters/relationships/timeline/mysteries) |
| `galgame_action` | Submit player actions, engine verifies narrative format and auto-maintains archive |
| `galgame_status` | Narrative tone world state summary |
Recommended to use with `prompt.md` in the project root - it defines narrative quality standards, character rules, and decision priorities. Client-specific bridge configurations see [galgame-is-not-like-this](https://github.com/mchenziyi/galgame-is-not-like-this).
## Architecture
```
prompt.md ← General narrative prompt (narrative philosophy, quality requirements)
│
▼
AI Client (LLM)
│ Generate narrative
▼
┌─────────────────────────────┐
│ galgame-engine (MCP) │
│ │
│ server.py Tool entry │
│ engine.py Core coordination │
│ state_manager Archive read/write │
│ response_builder Format verification │
└─────────────────────────────┘
│
▼
.game/ (4 JSON files)
```
## License
MIT