/** * postgres-mcp - HTTP Transport Server * * Dual-protocol HTTP transport with backward compatibility: * - `/mcp` — Streamable HTTP transport (MCP protocol 2025-11-25) * - `/sse` + `/messages` — Legacy SSE transport (MCP protocol 2024-11-05) * * Transport-specific handlers are in ./streamable.ts, ./stateless.ts, and ./legacy-sse.ts. * Security utilities and endpoint handlers are in ./security.ts and ./handlers.ts. * Config types and constants are in ./types.ts. */ import type { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js"; import type { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js"; import type { Transport } from "@modelcontextprotocol/sdk/shared/transport.js"; import type { HttpTransportConfig } from "./types.js"; export type { HttpTransportConfig } from "./types.js"; /** * HTTP Transport for MCP * * Supports two transport protocols simultaneously: * 1. Streamable HTTP (2025-11-25) via `/mcp` — preferred for modern clients * 2. Legacy SSE (2024-11-05) via `/sse` + `/messages` — backward compatibility */ export declare class HttpTransport { private server; readonly config: HttpTransportConfig; private readonly onConnect?; /** Active transports by session ID (supports both transport types) */ private readonly transports; private readonly rateLimitMap; private rateLimitCleanupInterval; constructor(config: HttpTransportConfig, onConnect?: (transport: Transport) => void | Promise); /** * Start the HTTP server */ start(): Promise; /** * Stop the HTTP server */ stop(): Promise; /** * Check if a path is public (bypasses authentication) */ private isPublicPath; /** * Handle incoming HTTP request */ private handleRequest; /** * Get all active transports (for testing/introspection) */ getTransports(): Map; } /** * Create an HTTP transport instance */ export declare function createHttpTransport(config: HttpTransportConfig, onConnect?: (transport: Transport) => void): HttpTransport; //# sourceMappingURL=server.d.ts.map