[package] name = "cartopolis_mcp" version.workspace = true edition.workspace = true license.workspace = true [lib] # No runnable doc fence in the crate; see `cartopolis_core`'s manifest. doctest = false # **Bevy-free, and it must stay that way.** The server talks to the client's ECS # only through the job channel (`protocol::Job`), so everything here — rmcp's # `#[tool]` handlers, its transport and tokio — compiles outside the client # crate. Do not add `bevy` or `cartopolis` here. # # The client depends on this crate only on the predicate its `build.rs` sets the # `mcp` cfg on — Unix, Android included (`crates/cartopolis/Cargo.toml` says # why) — so nothing here is built for the web or Windows. On Android the socket # is never opened: the tools are reached in-process (`local`). [dependencies] # `ShotEnv`, which a `view` call builds, and the script API catalogue the # `scripting_guide` tool lists. cartopolis_core = { path = "../core" } # The SDK rather than a hand-rolled JSON-RPC handler, and the reason is the # specification rather than convenience: capability negotiation, notifications # and *long-running tasks* are in it, and a settle that takes twenty seconds is # precisely a long-running task. `default-features = false` drops the client # half and the OAuth stack; `server` brings the async-rw transport, which is # line-delimited JSON-RPC over any `AsyncRead + AsyncWrite` — here, a Unix # socket per session. The streamable-HTTP transport (and axum, hyper and tower # with it) went with the bearer token; see `server.rs`'s module note. rmcp = { version = "3.4", default-features = false, features = [ # The client half too, for one in-process session: the voice agent calls # these same tools through it (`voice_tools`). It adds only tokio-stream. "client", "server", "macros", "schemars", ] } # MCP carries an image as base64 in a JSON message, so a capture has to be # encoded before it can be handed over. Already in the lock under the simulator. base64.workspace = true futures-channel = { version = "0.3", default-features = false, features = ["std"] } # The voice agent's `ToolHost`, which `voice_tools` implements with these tools. cartopolis_voice = { path = "../voice" } serde.workspace = true serde_json.workspace = true tokio.workspace = true tokio-util.workspace = true tracing.workspace = true # `getuid`, for the per-user socket directory under `/tmp` and the check that # it is ours. Already in the lock under half the graph. [target.'cfg(unix)'.dependencies] libc = "0.2" [dev-dependencies] futures-util.workspace = true [lints] workspace = true