pub fn spawn_http(
addr: SocketAddr,
state: Arc<SharedPlayerState>,
cmd_tx: Sender<PlayerCommand>,
db_path: PathBuf,
) -> Result<JoinHandle<()>>Expand description
Serve MCP over streamable HTTP at addr/mcp, on a thread of its own.
The gateway authenticates its user and then forwards a koan account in
x-koan-username / x-koan-password, which set the role each request acts
with. The headers are trusted to come from the gateway, so this listener
must not be reachable from anywhere else: bind it to an address only the
gateway can reach, and keep it off the public GraphQL port.