Skip to main content
Glama

Convex MCP server

Official
by get-convex
node-browser.mjs1.26 kB
/** * Create two new entry points for convex/browser, one just for Node.js. * * The Node.js build includes in a WebSocket implementation. */ import url from "url"; import path from "path"; import fs from "fs"; const [tempDir] = process.argv .filter((arg) => arg.startsWith("tempDir=")) .map((arg) => arg.slice(8)); const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); const convexDir = path.join(__dirname, ".."); const distDir = path.join(convexDir, tempDir); const cjsBrowserIndex = path.join(distDir, "cjs", "browser", "index.js"); const esmBrowserIndex = path.join(distDir, "esm", "browser", "index.js"); const cjsBrowserIndexNode = path.join( distDir, "cjs", "browser", "index-node.js", ); const esmBrowserIndexNode = path.join( distDir, "esm", "browser", "index-node.js", ); let output = fs.readFileSync(cjsBrowserIndex, { encoding: "utf-8" }); output = output.replace('"./simple_client.js"', '"./simple_client-node.js"'); fs.writeFileSync(cjsBrowserIndexNode, output, { encoding: "utf-8" }); output = fs.readFileSync(esmBrowserIndex, { encoding: "utf-8" }); output = output.replace('"./simple_client.js"', '"./simple_client-node.js"'); fs.writeFileSync(esmBrowserIndexNode, output, { encoding: "utf-8" });

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