Skip to content

feat: add MCP server multi-source/sink and cloud graph mode support#809

Merged
leszko merged 3 commits into
mainfrom
rafal/7-mcp-multi
Apr 7, 2026
Merged

feat: add MCP server multi-source/sink and cloud graph mode support#809
leszko merged 3 commits into
mainfrom
rafal/7-mcp-multi

Conversation

@leszko
Copy link
Copy Markdown
Collaborator

@leszko leszko commented Apr 2, 2026

Summary

  • Add multi-source/sink support to MCP server router and tools
  • Add cloud graph mode support for MCP operations
  • Update mcp_router.py with expanded endpoint handling (241 lines changed)
  • Update mcp_server.py with new tool definitions (82 lines changed)

Test plan

  • Verify MCP tools work with multi-source/sink pipelines
  • Test cloud graph mode via MCP server
  • Run existing MCP tests to ensure no regressions

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

🚀 fal.ai Preview Deployment

App ID daydream/scope-pr-809--preview
WebSocket wss://fal.run/daydream/scope-pr-809--preview/ws
Commit f848025

Livepeer Runner

App ID daydream/scope-livepeer-pr-809--preview
WebSocket wss://fal.run/daydream/scope-livepeer-pr-809--preview/ws
Auth private

Testing Livepeer Mode

SCOPE_CLOUD_MODE=livepeer SCOPE_CLOUD_APP_ID="daydream/scope-livepeer-pr-809--preview/ws" uv run daydream-scope

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

❌ E2E Tests failed

Status failed
fal App daydream/scope-pr-809--preview
Run View logs

Test Artifacts

Check the workflow run for screenshots, traces, and failure details.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 2, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7f0851d2-c222-431b-99da-36897f2ac597

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rafal/7-mcp-multi

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@leszko leszko force-pushed the rafal/7-mcp-multi branch from a076b3f to dbb9834 Compare April 2, 2026 08:58
leszko added a commit that referenced this pull request Apr 7, 2026
connect() recreates the output_handlers list, so callbacks registered
before it were silently discarded. This caused the sink to receive no
frames in cloud relay mode.

Port of 50b871c9 from PR #809.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Rafał Leszko <rafal@livepeer.org>
@leszko leszko force-pushed the rafal/6-frontend branch from c57ba8c to 21bab7e Compare April 7, 2026 08:18
@leszko leszko changed the base branch from rafal/6-frontend to main April 7, 2026 08:28
leszko and others added 2 commits April 7, 2026 08:36
Update MCP server to support multi-source/multi-sink workflows:
- start_stream: graph mode with validation, cloud relay support,
  returns sink_node_ids/source_node_ids
- capture_frame: sink_node_id parameter for per-sink capture
- _wire_cloud_outputs: wire cloud WebRTC outputs to FrameProcessor
  sink/record queues for headless cloud mode
- start_stream/capture_frame MCP tools: graph parameter, sink_node_id

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Rafal Leszko <rafal@livepeer.org>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Rafał Leszko <rafal@livepeer.org>
@leszko leszko force-pushed the rafal/7-mcp-multi branch from 3600d3b to 72c44bc Compare April 7, 2026 08:49
Fix four runtime AttributeErrors in _wire_cloud_outputs:
- Use frame_processor.sink_manager._sink_queues_by_node (not FP directly)
- Use frame_processor._cloud_relay.on_frame_from_cloud (not FP directly)
- Use webrtc_client.output_handlers[i] list indexing (not .extra_output_handlers.get())
- Use pipeline_id_list for chain_produces_audio (not [None] in graph mode)

Also add model_validator to StartStreamRequest, remove redundant torch
import, and clean up dead code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Rafał Leszko <rafal@livepeer.org>
@leszko leszko merged commit c4a1317 into main Apr 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant