Add mcp-apps module: Spring AI 2.1.0 MCP server with MCP Apps HTML views, app-only tool callbacks, CSP declarations, SDK client tests and a Chromium harness on the official AppBridge

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4RzcCS5JCAgcxLz7T
This commit is contained in:
Claude
2026-12-05 16:43:24 +05:30
parent 8fa3c5d682
commit 508fed3b98
46 changed files with 1730 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>sandbox proxy</title>
<style>html,body,iframe{margin:0;border:0;width:100%;height:100%}</style>
<body>
<script>
// The proxy of the spec: a second origin between the host and the view. It loads the HTML and relays messages.
const inner = document.createElement("iframe");
inner.id = "view";
inner.setAttribute("sandbox", "allow-scripts allow-same-origin");
const HOST = "http://localhost:7001";
window.addEventListener("message", (event) => {
if (event.source === window.parent && event.origin === HOST) {
if (event.data.method === "ui/notifications/sandbox-resource-ready") {
inner.srcdoc = event.data.params.html; // srcdoc inherits this page's CSP header
document.body.append(inner);
} else {
inner.contentWindow?.postMessage(event.data, "*");
}
} else if (event.source === inner.contentWindow) {
window.parent.postMessage(event.data, HOST);
}
});
window.parent.postMessage({ jsonrpc: "2.0", method: "ui/notifications/sandbox-proxy-ready", params: {} }, HOST);
</script>