Skip to main content
Glama

AI Code Toolkit

by AgiFlow
stdio.ts852 B
import type { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import type { TransportHandler } from './types.js'; /** * Stdio transport handler for MCP server * Used for command-line and direct integrations */ export class StdioTransportHandler implements TransportHandler { private server: Server; private transport: StdioServerTransport | null = null; constructor(server: Server) { this.server = server; } async start(): Promise<void> { this.transport = new StdioServerTransport(); await this.server.connect(this.transport); console.error('Scaffolding MCP server started on stdio'); } async stop(): Promise<void> { if (this.transport) { await 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/AgiFlow/aicode-toolkit'

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