Skip to main content

clannad-mcp

MCP (stdio) server that drives the CLANNAD engine (siglus_engine.exe, the Rust reimplementation in ../siglus_rs) over its local TCP control bridge.

完整安装/运行/发布说明见仓库根目录的 ../README.md。要点:

安装

uvx clannad-mcp                 # 不安装,直接运行
uv tool install clannad-mcp     # 常驻安装(命令:clannad-mcp)

使用前提

  1. 引擎已在跑,并开了控制桥: siglus_engine.exe --project-dir "<GAME_DIR>" --bridge --auto-start (仓库根的 run_engine.cmd 就是干这个的,只需改里面的 GAME_DIR
  2. 端口文件两端一致 —— 默认已经一致:引擎(经 run_engine.cmd)写 %TEMP%\clannad_bridge.port,本客户端也默认读这个文件,所以通常不需要配任何环境变量

MCP 宿主配置示例

{
  "mcpServers": {
    "clannad": {
      "command": "uvx",
      "args": ["clannad-mcp"]
    }
  }
}

工具

get_status · get_dialogue · get_choices · advance · choose · skip_to_choice · save · load · jump · get_save_list · get_recovered

目录

src/mcp_server/
  clannad_mcp.py   # MCP 工具定义(stdio server)
  bridge.py        # 控制桥客户端(一行命令 -> 一行 JSON 状态)

环境变量

变量 说明 默认
CLANNAD_BRIDGE_PORT_FILE 端口文件路径;想放到别处时两端都要设成同一个值 %TEMP%\clannad_bridge.port(另会探测检出目录、当前目录及其父目录下的 clannad_bridge.port
CLANNAD_SKIP_TIMEOUT skip_to_choice 的兜底等待秒数;须小于 MCP 宿主超时 45

许可

Mozilla Public License 2.0(MPL-2.0),全文见 LICENSE。 项目地址:https://github.com/5h1nnN/can-ai-beat-clannad

发布

uv build     # dist\clannad_mcp-0.1.0-py3-none-any.whl / .tar.gz(含 LICENSE)
uv publish   # 需要 PyPI token:--token pypi-xxxx 或 UV_PUBLISH_TOKEN

Release files for clannad-mcp 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clannad-mcp 0.1.2
File Size Uploaded
clannad_mcp-0.1.2.tar.gz 17.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clannad-mcp 0.1.2
File Interpreter ABI Platform
clannad_mcp-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 35.9 kB

Release files / clannad_mcp-0.1.2.tar.gz

Download URL clannad_mcp-0.1.2.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
000706d3796ffe7980173924a9561202078a9e85f329bf94fbd801206f8a9069
BLAKE2b-256 checksum
How to use checksums
02676374b5f27ad39735ddd9058720cc75e63d0b29171ce9127225f8f969bee9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / clannad_mcp-0.1.2-py3-none-any.whl

Download URL clannad_mcp-0.1.2-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a97362660fa4ed6f07f5242b8b4f67b280c4796eda5eefeb1bc9b0282d3ce5ec
BLAKE2b-256 checksum
How to use checksums
87c134c1efecd0fdf51b993bc474fc8ec18df8242c1b9b345ccabe7249234ae6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.1.3

2 release files

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page