Skip to main content
Glama

Convex MCP server

Official
by get-convex
astIds.ts1.26 kB
import { isId } from "id-encoding"; import { Node, LiteralNode } from "@common/elements/ObjectEditor/ast/types"; export class IdWalker { private ids: LiteralNode[] = []; walk(n: Node): LiteralNode[] { switch (n.type) { case "ArrayExpression": { n.elements.forEach((element) => { if (element !== null) { this.walk(element); } }); break; } case "ObjectExpression": { n.properties.forEach((property) => { this.walk(property.key); this.walk(property.value); }); break; } case "UnaryExpression": { break; } case "NewExpression": { break; } case "TemplateLiteral": { n.expressions?.forEach((expr) => this.walk(expr)); break; } case "Literal": { if (typeof n.value === "string" && isId(n.value)) { this.ids.push(n); } break; } case "Identifier": { // Identifiers are not string literals, so we skip them. break; } case "CallExpression": { break; } default: { // Unsupported syntax, do nothing. break; } } return this.ids; } }

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/get-convex/convex-backend'

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