feat(mcp): 增加游戏内方块调试桥接

新增 stdio MCP server 和 mcp 子命令,通过调试会话状态文件连接内置 TCP bridge,并提供 place_block 工具。

Bridge 将请求投递到服务端 System 的游戏线程执行,限制请求大小与队列长度,并按会话端口安全清理状态文件和连接。
This commit is contained in:
2026-07-21 21:04:45 +08:00
parent 94b1b9a1f5
commit 1a7bc6aca1
15 changed files with 1375 additions and 11 deletions

View File

@@ -12,6 +12,8 @@ clap = { version = "4.5.32", features = ["derive"] }
uuid = { version = "1.4", features = ["v4", "fast-rng", "macro-diagnostics"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
rmcp = { version = "0.16.0", features = ["server", "macros", "transport-io"] }
tokio = { version = "1", features = ["macros", "rt", "io-std", "time"] }
base64 = "0.22"
toml = "0.8"
zip = "2.2.2"