/** * Navidrome MCP Server - Streamable HTTP transport * Copyright (C) 2025 * SPDX-License-Identifier: AGPL-3.0-or-later */ import type { Server } from '@modelcontextprotocol/sdk/server/index.js'; export interface HttpTransport { url: string; close: () => Promise; } interface HttpTransportOptions { host: string; port: number; /** * Undefined leaves /mcp unauthenticated, which is safe only on loopback or behind a network * policy or an authenticating proxy. */ authToken?: string | undefined; /** Matched against the literal Host header, port included, such as `mcp.example.com:8080`. */ allowedHosts?: string[] | undefined; /** Unset skips the Origin check, since non-browser MCP clients send no Origin. */ allowedOrigins?: string[] | undefined; /** Called once per `initialize`, since the stateful transport binds one Server per session. */ createMcpServer: () => Server; } /** * Lets a long-lived process, such as a container beside Navidrome, serve remote MCP clients with * no supergateway or mcp-proxy bridge. */ export declare function startHttpTransport(options: HttpTransportOptions): Promise; /** * An empty list disables the SDK Host check. Only an unauthenticated loopback bind gets a default * list, since a token defeats DNS rebinding and an exposed bind cannot know its Host names. */ export declare function resolveAllowedHosts(host: string, boundPort: number, authToken: string | undefined, operatorHosts: string[]): string[]; export {}; //# sourceMappingURL=http.d.ts.map