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

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.1
File Size Uploaded
clannad_mcp-0.1.1.tar.gz 17.3 kB Details

Built distribution (wheel)

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

Total release size: 35.9 kB

Release files / clannad_mcp-0.1.1.tar.gz

Download URL clannad_mcp-0.1.1.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
64b16c5c3233f9af3fad02509352eeb717b1165ffd15bc949a385338568076ac
BLAKE2b-256 checksum
How to use checksums
1f9904d6c151279cbdf44a750ae8135c89d4142b6b73d651dc62f64685984d74
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.1-py3-none-any.whl

Download URL clannad_mcp-0.1.1-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d3a1c1445ca5177ac9538e4fc6ce91b833e9c87e258cc31ae53dc5f6b2ac512
BLAKE2b-256 checksum
How to use checksums
808fc95ce8fd6ea36d2e7170828c95b08c7f15576f6775b960ee027449e68c55
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

This release

0.1.1 This release

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