Skip to main content
Glama

YCloud WhatsApp API MCP Server

openapi.js784 B
import axios from 'axios'; import fs from 'fs/promises'; import yaml from 'js-yaml'; export async function loadOpenApiSpec(specPath) { try { let spec; if (specPath.startsWith('http://') || specPath.startsWith('https://')) { // 从URL加载 const response = await axios.get(specPath); spec = response.data; } else { // 从本地文件加载 const content = await fs.readFile(specPath, 'utf8'); // 根据文件扩展名决定解析方式 if (specPath.endsWith('.yaml') || specPath.endsWith('.yml')) { spec = yaml.load(content); } else { spec = JSON.parse(content); } } return spec; } catch (error) { throw new Error(`无法加载OpenAPI规范: ${error.message}`); } }

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/YCloud-Developers/ycloud-whatsapp-mcp-server'

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