Function run_http

Source
pub async fn run_http(
    server: EntityGraphServer,
    addr: SocketAddr,
    cancel: CancellationToken,
) -> Result<()>
Expand description

Run the MCP server over Streamable HTTP using Axum.

The MCP endpoint is mounted at /mcp (POST + GET, as required by the Streamable HTTP spec). A lightweight /health route is also provided.

ยงArguments

  • server โ€” the EntityGraphServer instance (will be cloned per session).
  • addr โ€” the socket address to bind (e.g. "0.0.0.0:8080".parse()?).
  • cancel โ€” cancellation token; call .cancel() to initiate shutdown.