{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreieoabrxsbzmchjulwxdgw3bjzlz3nkjmil7qdojynf5b3322cn2ta",
    "uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3ml7m7dsuou42"
  },
  "path": "/t/mcp-apps-in-chatgpt-are-fundamentally-broken-2-critical-bugs/1377697#post_16",
  "publishedAt": "2026-05-06T20:30:27.000Z",
  "site": "https://community.openai.com",
  "tags": [
    "@modelcontextprotocol"
  ],
  "textContent": "If it’s of any help, here’s what I see when testing:\n\nAnd my test code:\n\n\n    import { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\n\n    const server = new McpServer({\n      name: \"meta-probe\",\n      version: \"1.0.0\",\n    });\n\n    const TEMPLATE_URI = \"ui://widget/meta-probe.html\";\n\n    const widgetHtml = `<!doctype html>\n    <html>\n      <head>\n        <meta charset=\"utf-8\" />\n        <style>\n          body {\n            font-family: system-ui, sans-serif;\n            margin: 0;\n            padding: 16px;\n            color: #111;\n            background: #fff;\n          }\n          h1 { font-size: 18px; margin: 0 0 8px; }\n          pre {\n            white-space: pre-wrap;\n            background: #f5f5f5;\n            border: 1px solid #ddd;\n            border-radius: 6px;\n            padding: 12px;\n          }\n        </style>\n      </head>\n      <body>\n        <h1>Widget rendered</h1>\n        <p>If you can see this, the iframe received template HTML.</p>\n        <pre id=\"debug\">Waiting for bridge data...</pre>\n\n        <script>\n          const debug = document.getElementById(\"debug\");\n\n          function snapshot(label) {\n            const data = {\n              label,\n              hasOpenAI: Boolean(window.openai),\n              toolOutput: window.openai?.toolOutput ?? null,\n              toolResponseMetadata: window.openai?.toolResponseMetadata ?? null,\n              widgetState: window.openai?.widgetState ?? null\n            };\n\n            debug.textContent = JSON.stringify(data, null, 2);\n          }\n\n          snapshot(\"initial\");\n\n          window.addEventListener(\"openai:set_globals\", (event) => {\n            snapshot(\"openai:set_globals\");\n          });\n\n          window.addEventListener(\"message\", (event) => {\n            const msg = event.data;\n            if (msg?.method === \"ui/notifications/tool-result\") {\n              debug.textContent = JSON.stringify(\n                {\n                  label: \"ui/notifications/tool-result\",\n                  params: msg.params\n                },\n                null,\n                2\n              );\n            }\n          });\n        </script>\n      </body>\n    </html>`;\n\n    server.registerResource(\"meta-probe-widget\", TEMPLATE_URI, {}, async () => ({\n      contents: [\n        {\n          uri: TEMPLATE_URI,\n          mimeType: \"text/html\",\n          text: widgetHtml,\n          _meta: {\n            \"openai/widgetDescription\": \"Validates MCP _meta delivery.\",\n            \"openai/widgetPrefersBorder\": true,\n            \"openai/widgetCSP\": {\n              connect_domains: [],\n              resource_domains: [],\n            },\n          },\n        },\n      ],\n    }));\n\n    server.registerTool(\n      \"show_meta_probe\",\n      {\n        title: \"Show meta probe\",\n        description: \"Render a read-only widget that verifies MCP tool result metadata.\",\n        inputSchema: {},\n        annotations: {\n          readOnlyHint: true,\n          destructiveHint: false,\n          openWorldHint: false,\n        },\n        _meta: {\n          \"openai/outputTemplate\": TEMPLATE_URI,\n          \"openai/toolInvocation/invoking\": \"Running meta probe...\",\n          \"openai/toolInvocation/invoked\": \"Meta probe ready\",\n        },\n      },\n      async () => ({\n        content: [\n          {\n            type: \"text\",\n            text: \"hello from the MCP server\",\n          },\n        ],\n        structuredContent: {\n          visibleMessage: \"hello from the MCP server\",\n          structuredOnlyValue: 12345,\n        },\n        _meta: {\n          secretProbeValue: \"private meta reached widget\",\n          largePrivateState: {\n            hydratedFromMeta: true,\n            timestamp: new Date().toISOString(),\n          },\n        },\n      })\n    );\n\n    export default server;\n\n",
  "title": "MCP Apps in ChatGPT are fundamentally broken - 2 critical bugs"
}