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
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Writes output/08: builds the official ext-apps basic-host, points it at this server and drives it in Chromium.
# Needs the jar (mvn -pl mcp-apps package) and harness/node_modules (npm install in harness/).
set -euo pipefail
MODULE="$(cd "$(dirname "$0")/.." && pwd)"
WORK="$(mktemp -d)"
git clone -q https://github.com/modelcontextprotocol/ext-apps.git "$WORK/ext-apps"
git -C "$WORK/ext-apps" checkout -q 87bcdc8
cp -r "$WORK/ext-apps/examples/basic-host" "$WORK/basic-host"
cd "$WORK/basic-host"
sed -i 's/"@modelcontextprotocol\/ext-apps": "\^2.1.0"/"@modelcontextprotocol\/ext-apps": "2.0.4"/' package.json
npm install --silent
npm install --silent tsx
INPUT=index.html npx vite build >/dev/null
INPUT=sandbox.html npx vite build >/dev/null
java -jar "$MODULE/target/mcp-apps.jar" --spring.profiles.active=browserhost --logging.level.root=warn &
JAVA_PID=$!
SERVERS='["http://localhost:3001/mcp"]' node_modules/.bin/tsx serve.ts &
HOST_PID=$!
trap 'kill $JAVA_PID $HOST_PID 2>/dev/null || true' EXIT
sleep 15
cd "$MODULE/harness" && node basic-host.mjs