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.0

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.0
File Size Uploaded
clannad_mcp-0.1.0.tar.gz 17.4 kB Details

Built distribution (wheel)

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

Total release size: 36.2 kB

Release files / clannad_mcp-0.1.0.tar.gz

Download URL clannad_mcp-0.1.0.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
838b229e6d37097377f082b09510064d495a6decd4a4757fac85917b32cf482e
BLAKE2b-256 checksum
How to use checksums
f8e9b014e1c641d243be219314d2ce9c9c0795d9283f4dd093922cdd24685e24
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.0-py3-none-any.whl

Download URL clannad_mcp-0.1.0-py3-none-any.whl
Size 18.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4fdfffa0bfd2e6c83b2e6adf19806edbf80837bc553f77dd7a8cf55ab19b6f9
BLAKE2b-256 checksum
How to use checksums
e98427433823d77a165b8abc9f8952a85a446c5730365a7aff0c085174a12fc5
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

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

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