Skip to main content
Glama
index.ts873 B
import { addTools, startToolsPolling, startServer } from "@/aggregator/server/server"; export const connectMCPAggregatorServer = async () => { try { // Set environment for stdio transport process.env.TRANSPORT_TYPE = "stdio"; // No port needed for stdio delete process.env.PORT; // Add initial tools await addTools(); // Start the tool polling with a 5-second interval startToolsPolling(5000); // Start the server with stdio transport const transportConfig = { transportType: "stdio", }; await startServer(transportConfig); // Handle graceful shutdown const cleanup = async () => { process.exit(0); }; process.on("SIGINT", cleanup); process.on("SIGTERM", cleanup); // Keep the process alive for MCP client connections } catch (error: any) { process.exit(1); } };

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/ashwwwin/furi'

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