Skip to main content
Glama

Fetch MCP

by jae-jae
stdio.ts1.08 kB
import { Server } from "@modelcontextprotocol/sdk/server/index.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { TransportProvider } from "./types.js"; import { logger } from "../utils/logger.js"; /** * Stdio Transport Provider implementation * Handles MCP communication via standard input/output */ export class StdioTransportProvider implements TransportProvider { private transport: StdioServerTransport | null = null; /** * Connect server to Stdio transport * @param server MCP server instance */ async connect(server: Server): Promise<void> { logger.info("[Transport] Connecting server using Stdio transport"); this.transport = new StdioServerTransport(); await server.connect(this.transport); logger.info("[Transport] Stdio transport connected"); } /** * Close Stdio transport connection */ async close(): Promise<void> { if (this.transport) { logger.info("[Transport] Closing Stdio transport"); this.transport.close(); this.transport = null; } } }

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/jae-jae/fetcher-mcp'

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