* feat: add transcript-server example with live speech transcription - New example: transcript-server with Web Speech API transcription - Start/stop recording with timer display - Live transcript with interim results - Send button to send transcript as ui/message to host - Copy button to copy full transcript - Sent messages marked with divider, greyed out - Experimental ui/update-model-context for live context updates - Transparent background, respects host theme - Enable microphone and clipboard in basic-host sandbox iframes - Add allow="microphone; clipboard-write" to both outer and inner iframes - Required for Web Speech API, audio capture, and clipboard access - Add alert popup in basic-host for ui/message from apps 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * style: format transcript-server files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test: add e2e test and golden for transcript-server 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: use @types/dom-speech-recognition instead of hand-rolled types Removes ~50 lines of manually defined Web Speech API types in favor of the community-maintained type package. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: add newlines between transcript chunks when copying to clipboard * refactor: unify transcript formatting with timestamps - Add formatEntry() helper that includes [timestamp] prefix - Add formatEntries() helper that joins entries with newlines - Use same format for clipboard copy, send message, and model context - DRY up duplicate code in send button handler * fix: log model context update failures instead of silently swallowing * fix: log model context updates for debugging * refactor: pass permissions through loadSandboxProxy like csp - Add permissions parameter to loadSandboxProxy in implementation.ts - Build iframe allow attribute from permissions instead of hardcoding - Update sandbox.ts to not hardcode allow attribute (set via notification) - Add microphone + clipboardWrite permissions to transcript-server resource - Update README to reflect permission configuration via resource _meta.ui * fix(transcript-server): auto-expand instead of scroll - Remove min-height: 100vh and overflow-y: auto - Let content grow naturally with autoResize (default) - Remove unnecessary scrollTop calls * test: remove transcript timer mask (no longer dynamic) * refactor: pass permissions through loadSandboxProxy like csp * docs: document updateModelContext for transitional speech * test: update e2e screenshots * refactor: use app.updateModelContext() instead of raw request * package-lock.json * src/generated/schema.json * test: update e2e screenshots from CI --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
44 lines
1.3 KiB
JSON
44 lines
1.3 KiB
JSON
{
|
|
"name": "@modelcontextprotocol/server-transcript",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"description": "MCP App Server for live speech transcription",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/modelcontextprotocol/ext-apps",
|
|
"directory": "examples/transcript-server"
|
|
},
|
|
"license": "MIT",
|
|
"main": "server.ts",
|
|
"files": [
|
|
"server.ts",
|
|
"server-utils.ts",
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
|
|
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
|
|
"serve": "bun server.ts",
|
|
"start": "cross-env NODE_ENV=development npm run build && npm run serve",
|
|
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'",
|
|
"prepublishOnly": "npm run build"
|
|
},
|
|
"dependencies": {
|
|
"@modelcontextprotocol/ext-apps": "^0.3.1",
|
|
"@modelcontextprotocol/sdk": "^1.24.0",
|
|
"zod": "^3.23.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/cors": "^2.8.19",
|
|
"@types/dom-speech-recognition": "^0.0.7",
|
|
"@types/express": "^5.0.0",
|
|
"@types/node": "^22.0.0",
|
|
"concurrently": "^9.2.1",
|
|
"cors": "^2.8.5",
|
|
"cross-env": "^10.1.0",
|
|
"express": "^5.1.0",
|
|
"typescript": "^5.9.3",
|
|
"vite": "^6.0.0",
|
|
"vite-plugin-singlefile": "^2.3.0"
|
|
}
|
|
}
|