Skip to main content
Glama
stdio.ts793 B
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import type { ITransport, ITransportFactory } from "./types.js"; export class StdioTransport implements ITransport { private transport: StdioServerTransport; constructor() { this.transport = new StdioServerTransport(); } async connect(server: McpServer): Promise<void> { await server.connect(this.transport); } async disconnect(): Promise<void> { // StdioServerTransport doesn't have a disconnect method // The process will exit when the connection is closed } } export class StdioTransportFactory implements ITransportFactory { createTransport(): ITransport { return new StdioTransport(); } }

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/samuraikun/aws-s3-mcp'

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