-
Notifications
You must be signed in to change notification settings - Fork 58
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
commit: |
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.
| description: "30MB", | ||
| }, | ||
| "bunny-50mb": { | ||
| url: "https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_50mb.mp4", |
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.
|
|
||
| // Register video resource template | ||
| // This fetches video from CDN and returns as base64 blob | ||
| server.resource( |
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).
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>
3ced9b3 to
ea7d2ee
Compare
|
@antonpk1 Looks like this may have broken e2e tests? |
|
on it! fix PR: #205 the video-resource-server was importing from |
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
🤖 Generated with Claude Code