Skip to main content
Glama
transports.d.ts1.84 kB
/** * Transport abstraction layer for MCP Host RPC * * This module provides a unified interface for different transport mechanisms * (Unix sockets and HTTP) used by the MCP Host RPC system. It allows the host * to communicate with MCP servers through various protocols while maintaining * the same API surface. */ import type { IncomingMessage, ServerResponse } from "http"; export interface ConnectionInfo { type: 'socket' | 'http'; path?: string; url?: string; } export interface TransportOptions { debug?: boolean; } export declare abstract class Transport { protected host: any; protected debug: boolean; constructor(host: any, options?: TransportOptions); protected log(message: string, ...args: any[]): void; abstract start(): Promise<void>; abstract stop(): Promise<void>; abstract getConnectionInfo(): ConnectionInfo; } export declare class SocketTransport extends Transport { private socketServer?; private socketPath; private isStarted; constructor(host: any, socketPath: string, options?: TransportOptions); start(): Promise<void>; stop(): Promise<void>; getConnectionInfo(): ConnectionInfo; } export declare class HttpTransport extends Transport { private httpPath; private httpUrl?; constructor(host: any, httpPath: string, options?: TransportOptions & { httpUrl?: string; }); start(): Promise<void>; stop(): Promise<void>; handleRequest(req: IncomingMessage | { body: any; headers: any; }, res: ServerResponse | { status: Function; json: Function; end?: Function; }): Promise<void>; private readBody; private sendResponse; private sendError; getConnectionInfo(): ConnectionInfo; getHttpUrl(): string; } //# sourceMappingURL=transports.d.ts.map

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/botanicastudios/mcp-host-rpc'

If you have feedback or need assistance with the MCP directory API, please join our Discord server