Add RESOURCE_MIME_TYPE constant (#108)

* Add RESOURCE_MIME_TYPE constant

* Update app-bridge.ts

* update syntax
This commit is contained in:
Olivier Chafik 2025-12-09 19:10:56 +01:00 • committed by GitHub
commit 3ac7c7935b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,7 +5,7 @@ import cors from "cors";
import express, { type Request, type Response } from "express";
import fs from "node:fs/promises";
import path from "node:path";
import { RESOURCE_URI_META_KEY } from "../../dist/src/app";
import { RESOURCE_MIME_TYPE, RESOURCE_URI_META_KEY } from "../../dist/src/app";
const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 3001;
const DIST_DIR = path.join(import.meta.dirname, "dist");
@ -50,7 +50,7 @@ const server = new McpServer({
contents: [
// Per the MCP App specification, "text/html;profile=mcp-app" signals
// to the Host that this resource is indeed for an MCP App UI.
{ uri: resourceUri, mimeType: "text/html;profile=mcp-app", text: html },
{ uri: resourceUri, mimeType: RESOURCE_MIME_TYPE, text: html },
],
};
},