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 · 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.3

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.3
File Size Uploaded
clannad_mcp-0.1.3.tar.gz 17.5 kB Details

Built distribution (wheel)

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

Total release size: 36.6 kB

Release files / clannad_mcp-0.1.3.tar.gz

Download URL clannad_mcp-0.1.3.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bb56a1830982e2fedc44cc0dc8101e43690f90140ed4a07aa1fe2f016e0ec752
BLAKE2b-256 checksum
How to use checksums
19c81cf31976c5de2a46b2471457521c361fedbfc596ab608e9825494fb7b6a0
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.3-py3-none-any.whl

Download URL clannad_mcp-0.1.3-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4266c7f6a17283ad0ebb91c69f9df67b9063e59420947a1e9cb8900967eae8e
BLAKE2b-256 checksum
How to use checksums
09ecf76353a94f8da8059c71cce6ec5851f7a8fb81f2387b5566f47a5a757ad6
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

This release

0.1.3 This release

2 release files

0.1.2

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