Skip to main content
Glama
by microsoft
dom.ts696 B
import { genaiscriptDebug } from "./debug" import { resolveGlobal } from "./global" const dbg = genaiscriptDebug("dom") export async function installWindow() { const glb = resolveGlobal() // Get the global context if (glb.window) return dbg(`installing window`) const { JSDOM } = await import("jsdom") const createDOMPurify = (await import("dompurify")).default const { window } = new JSDOM("<!DOCTYPE html>") const DOMPurify = createDOMPurify(window) glb.window = window glb.DOMPurify = DOMPurify // mermaid workaround createDOMPurify.addHook = DOMPurify.addHook.bind(DOMPurify) createDOMPurify.sanitize = DOMPurify.sanitize.bind(DOMPurify) }

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/microsoft/genaiscript'

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