Skip to main content
Glama
cloudflare.ts554 B
// Helper to get CloudFlare env from the request context interface CloudflareContext { env?: Record<string, unknown>; } interface CloudflareGlobal extends Record<symbol, unknown> { [key: symbol]: unknown; } export function getCloudflareEnv(): Record<string, unknown> | undefined { // Try different ways to access the CloudFlare env const context = (globalThis as CloudflareGlobal)[ Symbol.for("__cloudflare-context__") ] as CloudflareContext | undefined; if (context?.env) { return context.env; } // Fallback methods return undefined; }

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/b-open-io/bsv-mcp'

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