How to merge video clips with Medux MCP
Learn to merge video clips with the Medux API through Codex or Claude MCP. Check inputs, tool calls, task status, and output.
Follow the Codex or Claude workflow
The Medux operation and request fields are shared. Switch tabs for the client-specific prompt, approval pattern, screenshots, and walkthrough.
Codex-specific workflow
Run Merge Video Clips as a Codex MCP task
Use the active workspace as the source of truth. Ask Codex to identify the source video clips in the intended playback order, select the Medux video merge tool, and keep the Medux task ID and returned output with the rest of the project. Naming the input roles and the expected result prevents an agent from guessing which file should be used where.
Codex prompt pattern
In this workspace, use the Medux video merge tool through Medux MCP to merge video clips.
First inspect and identify the source video clips in the intended playback order.
Show me the exact tool arguments before execution.
After the task completes, return the merged MP4 and verify that every clip appears once in the correct order and the final video plays from start to finish.
Approval gate
Before approving the call, compare the selected tool, file or asset IDs, ordering, timing, and output settings with the request. If a local filename was mapped to an uploaded Medux file ID, keep that mapping visible so it can be audited later.
Result verification
Let Codex monitor an asynchronous task until it reaches a terminal state, then save or report the merged MP4. The final check is explicit: confirm that every clip appears once in the correct order and the final video plays from start to finish.
Before you start
Make sure the Medux MCP server is available in Codex and your Medux credentials are configured.
Place both MP4 files in the same workspace. Similar resolution, frame rate, codec, and audio settings help produce a cleaner join.
Merge two video clips in five steps
Describe the result in one prompt
Name the source files and ask Codex to use Medux. The tutorial starts with this focused request:
Use Medux to merge two video clips:
sample-clip-3s.mp4 and sample-clip-7s.mp4.

Let Codex inspect the workspace and request upload URLs
Codex confirms that both clips exist, identifies the Medux video merge tool, and requests temporary upload URLs and file IDs through MCP. Approve the Medux calls when Codex asks.

Upload each MP4 to its signed URL
Codex uploads the local clips with curl. The real signed URLs are generated by Medux and expire, so do not hard-code them into a reusable script.
curl -sS -X PUT \
-H "Content-Type: video/mp4" \
--upload-file "./sample-clip-3s.mp4" \
"SIGNED_UPLOAD_URL_FOR_CLIP_1"
curl -sS -X PUT \
-H "Content-Type: video/mp4" \
--upload-file "./sample-clip-7s.mp4" \
"SIGNED_UPLOAD_URL_FOR_CLIP_2"

Start the Medux merge task and monitor it
After both uploads succeed, Codex sends the two Medux file IDs in the intended order to the video merge tool. It keeps querying the same task until processing finishes.
Both uploads are complete.
Merge FILE_ID_1 followed by FILE_ID_2 with Medux,
then keep checking the task until the result is ready.

Download, preview, and verify the merged video
When Medux returns the result URL, Codex downloads the output as merged-sample-clips.mp4. The demo verifies a duration of 10.023220 seconds and a file size of approximately 9.2 MB.


Workflow at a glance
Why use Codex, MCP, and Medux?
Codex handles the planning and coordination; MCP gives it a standard connection to Medux; Medux performs the media processing. You avoid building a custom upload interface, writing a dedicated API client, or switching between separate editing dashboards.
Result: one natural-language request becomes a repeatable video merge workflow and a verified MP4 output.
Frequently asked questions
Can Codex merge videos through MCP?
Yes. Once Medux is connected, Codex can create upload destinations, send the clips, start the merge task, poll its status, and download the finished MP4.
What should I check before merging clips?
Confirm the intended clip order and compare resolution, aspect ratio, frame rate, video codec, and audio settings. Similar source properties generally create a cleaner result.
What should I verify after the merge?
Check the clip order, transition point, total duration, audio continuity, playback quality, resolution, and output file size.
Explore related workflows
Continue with another practical Medux workflow for video, image, audio, or document processing.
Related Medux tutorials
Claude-specific workflow
Run Merge Video Clips as a Claude MCP workflow
Keep the goal, source assets, and constraints together in the conversation. Ask Claude to restate the source video clips in the intended playback order before proposing the Medux video merge tool. That context checkpoint makes the file roles and desired outcome easy to correct before any Medux call is approved.
Claude prompt pattern
Using the assets and requirements in this conversation, help me merge video clips with Medux MCP.
Restate which input fulfills each role: the source video clips in the intended playback order.
Propose the the Medux video merge tool call and summarize its arguments before asking for approval.
When it finishes, return the merged MP4 with a checklist confirming that every clip appears once in the correct order and the final video plays from start to finish.
Context checkpoint
Have Claude summarize the intended transformation, identify every source asset by role, and list the important constraints. Review that summary together with the proposed tool arguments; correct the conversation first if a file, order, time range, or setting is ambiguous.
Result verification
Keep the Medux task ID in the conversation while Claude checks progress. When processing ends, ask for the merged MP4 plus a concise validation checklist confirming that every clip appears once in the correct order and the final video plays from start to finish.
Before you start
Make sure the Medux MCP connector is available in Claude and that your API credentials are configured.
Place both MP4 files in an accessible local project folder. Using clips with compatible dimensions and codecs usually produces the cleanest transition.
Step-by-step workflow
Describe the merge task in one prompt
Tell Claude which files to combine and explicitly ask it to use Medux through MCP. In the recorded workflow, the two files are sample-clip-3s.mp4 and sample-clip-7s.mp4.
Use Medux to merge two video clips:
sample-clip-3s.mp4 and sample-clip-7s.mp4.
Upload the files using the curl command.
Let Claude inspect the files and choose the Medux tools
Claude checks that both clips exist, loads the Medux connector, and prepares signed upload URLs. This removes the need to manually search for endpoints or assemble the merge request yourself.

Upload each clip to the generated URL
Medux returns temporary signed URLs for the source files. Run the generated curl commands in your local terminal when the hosted Claude environment cannot directly reach the storage endpoint.
# The signed URL is generated by Medux and expires.
curl -X PUT "SIGNED_UPLOAD_URL_FOR_CLIP_1" -H "Content-Type: video/mp4" --data-binary "@/path/to/sample-clip-3s.mp4"
curl -X PUT "SIGNED_UPLOAD_URL_FOR_CLIP_2" -H "Content-Type: video/mp4" --data-binary "@/path/to/sample-clip-7s.mp4"
Confirm the uploads and start the merge
After both uploads succeed, tell Claude they are complete. Claude then submits the two uploaded asset URLs to the Medux video merge tool and begins monitoring the task.
Both uploads completed successfully.
Please start the Medux video merge task and keep checking until the result is ready.
Open and review the merged output
When processing finishes, Medux returns the final video URL. Open the result, verify that the clips appear in the intended order, and check the transition point, audio continuity, duration, and playback quality.

Workflow at a glance
Why this workflow is useful
Claude handles the coordination while Medux handles the media processing. You keep the entire operation in one conversational workflow without building a custom upload interface, writing a dedicated API client, or switching between multiple dashboards.
Result: two source clips become one ready-to-use MP4 through a repeatable MCP workflow.
Explore related workflows
Continue with a nearby Medux workflow or compare how the same task works across Claude MCP and Codex MCP.