Add project-aware Coproducer and MCP server #1941

Open
bmatherly opened 5:32pm on October 19, 2026 wants to merge 4938 Ξ” into mltframework/shotcut master from
coproducer
Reviewing
341 fewer changed lines
(6% less) vs GitHub
This saves about 10.5 hours per year vs conventional diff tools
bmatherly authored
of work between October 4 and October 19
Diff Delta:
4938
About 290 Diff Delta/hour
Classified as:  Feature Add

bmatherly's Description of Work

Summary

This PR adds Coproducer, a project-aware AI assistant for Shotcut, and exposes its tools through a Streamable HTTP MCP endpoint. Coproducer and external MCP clients use the same endpoint.

Coproducer


  • Adds a QML-based Coproducer dock, opened with Ctrl+Shift+7.

  • Adds Chat and Search User Guide entries to Help.

  • Adds two interchangeable AI provider modes:



    • OpenAI-compatible API: configure the API key, model, and base URL. HTTPS is required except for localhost endpoints.


    • Local model: select a GGUF model; Shotcut starts and manages llama-server.




  • AI Chat sends model-requested tools through MCP for project inspection, timeline summaries, and forum search.


  • Search User Guide calls the forum-search MCP tool directly, without invoking an AI model.

  • Streams Markdown responses, supports citations, and includes cancellation and new-chat controls.

MCP


  • Implements a stateless Streamable HTTP endpoint at /mcp, with dynamic localhost ports and MCP initialization, tool discovery, and tool calls.

  • Adds Help β†’ Copy MCP Endpoint so users can provide the current Shotcut instance’s URL to external MCP clients.

  • Registers three tools: shotcut_project_inspect, shotcut_timeline_summary, and shotcut_forum_search.

  • Project inspection returns read-only clip, playlist, timeline, and UI context. Timeline summaries can omit per-track details to reduce payload size.

  • Restricts connections to loopback and validates Host and Origin headers.

  • Moves MCP-only forum search and project inspection into the mcp/ module.

Testing


  • MCP tests cover initialization, tool listing and calls, per-instance isolation, HTTP Origin and GET handling, and timeline summary track inclusion.

  • MCP Inspector was used to verify connection, tool discovery, and tool calls.

52 total changed files
(12 files ignored)
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
You’ve reached the end of the pull request
All files reviewed β€” nice work, champ! πŸ’ͺ