Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
MCP (Model Context Protocol) server library — transport-agnostic dispatch for exposing CAR capabilities to MCP-aware clients.
Two transports use this crate today:
- stdio —
car-mcp-serverbinary, one client per process. Suitable for Claude Desktop / Cursor / Claude Code's--mcp-configand any other client that follows the MCP spec's stdio framing. See [transport::stdio_loop]. - HTTP-streamable —
car-serverdaemon endpoint, many concurrent clients sharing the sameRuntime/ policy chain / eventlog. Implemented incar_server_core::mcpagainst the same [Server::handle] entry point:POST /mcpfor one JSON-RPC request/response,GET /mcpfor the SSE stream,GET /mcp/healthfor liveness. Bind address is--mcp-bind/CAR_MCP_BIND; passdisabledto skip the listener.
Both share the same Server::handle(Request) -> Option<Response>
pure function, so transports stay separable from protocol logic.
The tool set, however, is per-[Server], not per-process. A
transport may register tools it alone can serve via
[Server::register_tool]: the daemon holds a live Runtime, so it
can carry tools the stdio binary has no way to run and must not
advertise. With nothing registered, a server advertises exactly the
built-in schemas, unchanged.
The daemon uses that seam for exactly one thing today:
assistant_start / assistant_poll / assistant_cancel
(car_server_core::mcp_assistant, car#972 §6), which drive the agent
behind car do through a run handle. They are absent from stdio because
car-mcp-server is this crate plus telemetry — no Runtime, no inference
engine — so a stdio client gets -32601 for a tool that never existed
there rather than a tool that exists and cannot work.
Why a library crate
Originally this lived in car-mcp-server's main.rs as a
self-contained binary. v0.8 + the external-agent work made it
clear MCP needs to be a first-class daemon surface so every
external client (Claude Code, Codex, Gemini, custom GPTs) gets
CAR's tools through the same governance layer. Extracting the
dispatch logic into a library lets the daemon embed it without
shelling out to a subprocess. See
docs/proposals/external-agent-detection.md. The daemon endpoint
landed in 0542d10f; docs/websocket-protocol.md and
docs/cookbook/07-mcp-server.md document the live surface.