import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import type express from "express";
export interface CreateMcpServerOptions {
    baseUrl: string;
    token: string;
    version: string;
    publicUrl: string;
}
export declare function createMcpServer({ baseUrl, token, version, publicUrl, }: CreateMcpServerOptions): McpServer;
export interface ResolveTokenOptions {
    /**
     * Server-configured token used as a fallback for unauthenticated requests.
     * Only consulted when `allowAnonymous` is true.
     */
    fallbackToken?: string;
    /**
     * When true, requests without a `Bearer` header fall back to `fallbackToken`
     * (the legacy behaviour). When false (the default in HTTP mode), a request
     * without a `Bearer` header is rejected and never uses the server token.
     */
    allowAnonymous: boolean;
}
export declare function getBearerToken(req: express.Request, options: ResolveTokenOptions): string | undefined;
export declare function sendUnauthorized(res: express.Response): void;
