UNPKG

@sei-js/mcp-server

Version:

Model Context Protocol (MCP) server for interacting with EVM-compatible networks

16 lines (15 loc) 619 B
import { StdioTransport } from './stdio.js'; import { StreamableHttpTransport } from './streamable-http.js'; import { HttpSseTransport } from './http-sse.js'; export const createTransport = (config) => { switch (config.mode) { case 'stdio': return new StdioTransport(); case 'streamable-http': return new StreamableHttpTransport(config.port, config.host, config.path); case 'http-sse': return new HttpSseTransport(config.port, config.host, config.path); default: throw new Error(`Unsupported transport mode: ${config.mode}`); } };