-
Notifications
You must be signed in to change notification settings - Fork 49
feat(examples): Add video-resource-server example #175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Demonstrates serving binary content (video) via MCP resources using the
base64 blob pattern:
1. Server fetches video from CDN
2. Returns as base64 blob via `videos://{id}` resource template
3. Widget fetches resource and plays in `<video>` element
Includes multiple video sizes for testing (1MB to 150MB).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/ext-apps@175
commit: da95f0c
@jonathanhefner
jonathanhefner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two nitpicks, but looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This URL isn't loading for me.
I also tried https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/720/Big_Buck_Bunny_720_10s_50MB.mp4, but that's 404.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably want to use server.registerResource() here (resource() is deprecated).
Uh oh!
There was an error while loading. Please reload this page.
Summary
Adds a video resource example that demonstrates serving binary content (video) via MCP resources using the base64 blob pattern.
How It Works
videos://{id}resource templateresources/read<video>elementAvailable Videos
Test Plan
- Build succeeds
- Video plays correctly in basic-host
- Video plays correctly in Claude.ai
- [ ]
Screenshot 2025年12月17日 at 15 02 24🤖 Generated with Claude Code