import { AuthInfo, AuthMetadataOptions, BearerAuthOptions, McpHandlerRequestOptions, ServerEventBus, ServerNotifier } from "@modelcontextprotocol/server"; //#region src/auth/mcp-resource-server.d.ts interface McpFetchHandler { fetch(request: Request, options?: McpHandlerRequestOptions): Promise; close(): Promise; readonly notify: ServerNotifier; readonly bus: ServerEventBus; } interface McpResourceServerOptions { readonly bearerAuth: BearerAuthOptions; readonly metadata?: AuthMetadataOptions; /** * Fail-closed anonymous fallback. When bearer verification refuses a * request, this policy is consulted with the raw request; returning an * `AuthInfo` admits the request under that identity, and returning * `undefined` keeps the original `401`/`403`. Absent, every request must * carry a valid bearer token. Metadata (well-known) responses bypass it. */ readonly anonymous?: (request: Request) => AuthInfo | undefined | Promise; } /** * OAuth resource-server facade around an MCP HTTP handler. * * It serves RFC 9728/RFC 8414 discovery when configured, validates bearer tokens before MCP * dispatch, and passes the resulting `AuthInfo` into the official handler context. */ declare class McpResourceServer implements McpFetchHandler { #private; readonly notify: ServerNotifier; readonly bus: ServerEventBus; constructor(handler: McpFetchHandler, options: McpResourceServerOptions); fetch(request: Request, options?: McpHandlerRequestOptions): Promise; close(): Promise; } //#endregion export { McpResourceServer as n, McpResourceServerOptions as r, McpFetchHandler as t }; //# sourceMappingURL=mcp-resource-server-C4RxIuQl.d.mts.map