Skip to main content
Glama
BruceWilliamChen

ChatGPT Apps MCP Server

post-build.js995 B
import fs from "fs"; import path from "path"; import { fileURLToPath } from "url"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); const ROOT_DIR = path.resolve(__dirname, ".."); const ASSETS_DIR = path.resolve(ROOT_DIR, "assets"); const baseUrl = process.env.BASE_URL || "http://localhost:4444"; const components = ["calculator"]; for (const component of components) { const jsFile = `${component}.js`; const cssFile = `${component}.css`; const htmlFile = `${component}.html`; const html = `<!doctype html> <html> <head> <script type="module" src="${baseUrl}/${jsFile}"></script> <link rel="stylesheet" href="${baseUrl}/${cssFile}"> </head> <body> <div id="${component}-root"></div> </body> </html> `; const htmlPath = path.join(ASSETS_DIR, htmlFile); fs.writeFileSync(htmlPath, html, { encoding: "utf8" }); console.log(`Generated ${htmlFile}`); } console.log("\nBuild complete! Assets ready in ./assets/"); console.log(`Using BASE_URL: ${baseUrl}`);

Latest Blog Posts

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/BruceWilliamChen/mcp-server'

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