Skip to main content
Glama
getConfigData.jsโ€ข748 B
import { IniSectionType } from "@smithy/types"; import { CONFIG_PREFIX_SEPARATOR } from "./constants"; export const getConfigData = (data) => Object.entries(data) .filter(([key]) => { const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); if (indexOfSeparator === -1) { return false; } return Object.values(IniSectionType).includes(key.substring(0, indexOfSeparator)); }) .reduce((acc, [key, value]) => { const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); const updatedKey = key.substring(0, indexOfSeparator) === IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; acc[updatedKey] = value; return acc; }, { ...(data.default && { default: data.default }), });

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/consigcody94/office-whisperer'

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