Skip to main content
Glama

MCP Webcam Server

by evalstate
transport-factory.ts921 B
import { BaseTransport } from './base-transport.js'; import { StdioTransport } from './stdio-transport.js'; import { StreamableHttpTransport } from './streamable-http-transport.js'; import type { ServerFactory } from './base-transport.js'; import type { Express } from 'express'; export type TransportType = 'stdio' | 'streamable-http'; /** * Factory for creating transport instances */ export class TransportFactory { static create( type: TransportType, serverFactory: ServerFactory, app?: Express ): BaseTransport { switch (type) { case 'stdio': return new StdioTransport(serverFactory); case 'streamable-http': if (!app) { throw new Error('Express app is required for StreamableHTTP transport'); } return new StreamableHttpTransport(serverFactory, app); default: throw new Error(`Unknown transport type: ${type}`); } } }

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/evalstate/mcp-webcam'

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