@nanocollective/nanocoder
Version:
A local-first CLI coding agent that brings the power of agentic coding tools like Claude Code and Gemini CLI to local models or controlled APIs like OpenRouter
39 lines • 1.47 kB
TypeScript
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
import { WebSocketClientTransport } from '@modelcontextprotocol/sdk/client/websocket.js';
import type { MCPServer, MCPTransportType } from '../types/mcp.js';
type ClientTransport = StdioClientTransport | WebSocketClientTransport | StreamableHTTPClientTransport;
/**
* Factory for creating MCP client transports based on server configuration
*/
export declare class TransportFactory {
/**
* Creates a transport instance for the given MCP server configuration
*/
static createTransport(server: MCPServer): ClientTransport;
/**
* Creates a stdio transport for local MCP servers
*/
private static createStdioTransport;
/**
* Creates a WebSocket transport for remote MCP servers
*/
private static createWebSocketTransport;
/**
* Creates an HTTP transport for remote MCP servers
*/
private static createHTTPTransport;
/**
* Validates the server configuration for the given transport type
*/
static validateServerConfig(server: MCPServer): {
valid: boolean;
errors: string[];
};
/**
* Gets transport-specific configuration tips for users
*/
static getTransportTips(transportType: MCPTransportType): string[];
}
export {};
//# sourceMappingURL=transport-factory.d.ts.map