/** * Authentication Middleware * * Provides API key authentication for the MCP server. * Supports both X-API-Key header and Bearer token authentication. */ import type { Request, Response, NextFunction } from 'express'; /** * Authentication configuration */ export interface AuthConfig { /** API keys that are allowed to access the server (hashed for security) */ apiKeys: string[]; /** Endpoints that don't require authentication */ publicEndpoints: string[]; /** Whether authentication is enabled */ enabled: boolean; } /** * Default authentication configuration */ export declare const DEFAULT_AUTH_CONFIG: AuthConfig; /** * Hash an API key for secure comparison */ export declare function hashApiKey(key: string): string; /** * Create authentication middleware */ export declare function createAuthMiddleware(config?: Partial): (req: Request, res: Response, next: NextFunction) => void; /** * Load API keys from environment variable * Supports comma-separated list of keys */ export declare function loadApiKeysFromEnv(): string[]; //# sourceMappingURL=auth.d.ts.map