@adcp/sdk API Reference - v7.9.0
    Preparing search index...

    Interface AdcpServerTransport

    Structural shape of an MCP transport the server can connect to.

    Matches @modelcontextprotocol/sdk/shared/transport.js Transport without importing it — keeping the SDK type off our public API surface. StreamableHTTPServerTransport, StdioServerTransport, and InMemoryTransport from the SDK all satisfy this shape.

    message / callback parameters are typed with any (not unknown) so SDK-specific transports with narrower message types (JSONRPCMessage) are assignable bi-directionally without forcing downstream consumers to widen their own transport types.

    interface AdcpServerTransport {
        start(): Promise<void>;
        send(message: any, options?: any): Promise<void>;
        close(): Promise<void>;
        onmessage?: (message: any, extra?: any) => void;
        onclose?: () => void;
        onerror?: (error: Error) => void;
        sessionId?: string;
        setProtocolVersion?: (version: string) => void;
    }
    Index

    Properties

    onmessage?: (message: any, extra?: any) => void
    onclose?: () => void
    onerror?: (error: Error) => void
    sessionId?: string
    setProtocolVersion?: (version: string) => void

    Methods