Skip to main content
Glama

MCPDemo - Visual SQL Chat Platform

by Ayi456
cors.ts563 B
import cors from 'cors'; /** * 配置 CORS 中间件 */ export function configureCors(): cors.CorsOptions { const allowedOrigins = (process.env.ALLOWED_ORIGINS || '') .split(',') .map(s => s.trim()) .filter(Boolean); return { origin: (origin, callback) => { if (!origin) return callback(null, true); if (allowedOrigins.length === 0) return callback(null, true); if (allowedOrigins.includes(origin)) return callback(null, true); return callback(new Error('Not allowed by CORS')); }, credentials: true }; }

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/Ayi456/visual-mcp'

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