/**
 * @fileoverview MCP Authentication Middleware for Bearer Token Validation (JWT).
 *
 * This middleware validates JSON Web Tokens (JWT) passed via the 'Authorization' header
 * using the 'Bearer' scheme (e.g., "Authorization: Bearer <your_token>").
 * It verifies the token's signature and expiration using the secret key defined
 * in the configuration (`config.mcpAuthSecretKey`).
 *
 * If the token is valid, an object conforming to the MCP SDK's `AuthInfo` type
 * (expected to contain `token`, `clientId`, and `scopes`) is attached to `req.auth`.
 * If the token is missing, invalid, or expired, it sends an HTTP 401 Unauthorized response.
 *
 * @see {@link https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-03-26/basic/authorization.mdx | MCP Authorization Specification}
 * @module src/mcp-server/transports/authentication/authMiddleware
 */
import { AuthInfo } from "@modelcontextprotocol/sdk/server/auth/types.js";
import { NextFunction, Request, Response } from "express";
declare global {
    namespace Express {
        interface Request {
            /** Authentication information derived from the JWT, conforming to MCP SDK's AuthInfo. */
            auth?: AuthInfo;
        }
    }
}
/**
 * Express middleware for verifying JWT Bearer token authentication.
 */
export declare function mcpAuthMiddleware(req: Request, res: Response, next: NextFunction): void;
