Skip to main content
Glama
nikhilkumaragarwal-shyftlabs

MCP Executor Server

sse.ts596 B
import { Express, Response } from 'express'; let clients: Response[] = []; export function setupSSE(app: Express) { app.get('/sse', (req, res) => { res.set({ 'Content-Type': 'text/event-stream', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive' }); res.flushHeaders(); res.write(': connected\n\n'); clients.push(res); req.on('close', () => { clients = clients.filter(c => c !== res); }); }); } export function broadcastSSE(data: any) { for (const client of clients) { client.write(`data: ${JSON.stringify(data)}\n\n`); } }

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/nikhilkumaragarwal-shyftlabs/MCP'

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