UNPKG

@n8n/n8n-nodes-langchain

Version:

![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)

16 lines (15 loc) 640 B
import type { JSONRPCMessage } from '@modelcontextprotocol/sdk/types.js'; import type { Response } from 'express'; import type { IncomingMessage, ServerResponse } from 'http'; export type CompressionResponse = Response & { flush?: () => void; }; export type TransportType = 'sse' | 'streamableHttp'; export interface McpTransport { readonly transportType: TransportType; readonly sessionId: string | undefined; send(message: JSONRPCMessage): Promise<void>; handleRequest(req: IncomingMessage, resp: ServerResponse, body?: unknown): Promise<void>; close?(): Promise<void>; onclose?: () => void | Promise<void>; }