diff --git a/src-tauri/src/mcp/http_transport.rs b/src-tauri/src/mcp/http_transport.rs index 396b1a3..87bd6f4 100644 --- a/src-tauri/src/mcp/http_transport.rs +++ b/src-tauri/src/mcp/http_transport.rs @@ -25,7 +25,7 @@ use tokio_util::sync::CancellationToken; /// listening socket for MCP (FR-MCP-1, NFR-SEC-5). Kept generic over `host` /// purely so the refusal path is directly unit-testable; the only production /// caller (`mcp::server`) always passes `"127.0.0.1"`. -pub(crate) async fn bind_loopback(host: &str, port: u16) -> Result { +pub async fn bind_loopback(host: &str, port: u16) -> Result { let ip: IpAddr = host.parse().map_err(|_| McpError::NonLoopback)?; if !ip.is_loopback() { return Err(McpError::NonLoopback); @@ -37,7 +37,7 @@ pub(crate) async fn bind_loopback(host: &str, port: u16) -> Result, @@ -54,7 +54,7 @@ impl HttpServerHandle { /// routing) on an already-bound loopback listener. Every request must present /// `Authorization: Bearer ` matching the stored token (constant-time /// compare, `mcp::token::verify`) or it never reaches `rmcp`. -pub(crate) fn serve( +pub fn serve( listener: TcpListener, expected_token: String, handler: WaMcpHandler,