@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
26 lines (25 loc) • 912 B
TypeScript
/**
* Eufemia Docs MCP — Cloudflare Worker entry.
*
* Hosts the Eufemia documentation MCP tools on Cloudflare Workers using the
* MCP SDK's web-standard Streamable HTTP transport.
*
* Endpoints:
* - `GET /healthz` — health check.
* - `POST /mcp` — Streamable HTTP transport (initialize and subsequent messages).
* - `GET /mcp` — SSE stream for server-to-client notifications.
* - `DELETE /mcp` — terminate a session.
*
* Auth (optional): set the `MCP_AUTH_TOKEN` Worker secret. When set, every
* request to `/mcp` must send `Authorization: Bearer <token>`.
*
* The docs corpus is shipped inside the Worker bundle as `docs.bundle.json`,
* generated by `tools/eufemia-llm-metadata/scripts/buildDocsBundle.ts`.
*/
export type Env = {
MCP_AUTH_TOKEN?: string;
};
declare const handler: {
fetch(request: Request, env: Env): Promise<Response>;
};
export default handler;