/** * Custom HTTP Transport for MCP over Azure Web Service. * Uses direct JSON responses (not SSE streaming) for Azure orchestrator compatibility. */ import type { Server } from '@modelcontextprotocol/sdk/server/index.js'; import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js'; import type { JSONRPCMessage } from '@modelcontextprotocol/sdk/types.js'; import type { Express } from 'express'; import type { XppServerContext } from '../types/context.js'; /** * MCP methods this server does NOT implement: they always come back * "Method not found", so logging them is noise. * * Keep this list to methods with NO registered handler — tests/server/silentProbes.test.ts * pins that invariant against the SDK's real handler registry. Four of the five * entries it used to hold were served, not probed: `resources/list`, * `resources/templates/list` and `prompts/list` have had handlers since * src/resources/index.ts and src/prompts/codeReview.ts registered them, and * `logging/setLevel` is auto-registered by the SDK because the capabilities * block declares `logging: {}` — a fact no grep for a request schema in this * repo can find, which is how it stayed hidden. * * What the mistake cost was visibility, not correctness: silencing them * discarded the only signal that says whether any client actually reads what we * volunteer — which is exactly the evidence docs/BACKLOG.md's context-pipeline * Phase 3b and VSIX entries are waiting on before either is worth building. */ export declare const SILENT_PROBES: Set; export declare class CustomHttpTransport implements Transport { private server; private app; private context; private pendingRequests; onmessage?: (message: JSONRPCMessage) => void; onerror?: (error: Error) => void; onclose?: () => void; constructor(server: Server, app: Express, context: XppServerContext); /** * Connects MCP server to this transport * CRITICAL: Must be called for proper protocol lifecycle and completion signaling */ connectServer(): Promise; start(): Promise; close(): Promise; send(message: JSONRPCMessage): Promise; private setupRoutes; } export declare function createStreamableHttpTransport(server: Server, app: Express, context: XppServerContext): CustomHttpTransport; //# sourceMappingURL=transport.d.ts.map