MCP tool for adding text overlays to an OTIO timeline.
Project description
clipwright-text
MCP tool for annotating an OTIO timeline with text overlay markers.
Text is not rendered here — clipwright-render reads the markers and applies
drawtext filters when producing the output video.
Overview
clipwright-text is part of the clipwright
suite. It is designed for AI agents, not humans — there is no GUI or
interactive CLI. All interaction is via the MCP (Model Context Protocol) stdio
transport.
Available Tools
| Tool | Description |
|---|---|
clipwright_add_text |
Append a text_overlay marker to an OTIO timeline for later rendering. |
How It Works
- AI calls
clipwright_add_text(timeline, output, options)once per text overlay. - The tool appends a
text_overlaymarker (nametext_0,text_1, …) to the first video track of the timeline and writes a new.otiofile tooutput. - The input timeline is never modified (non-destructive).
- Repeated calls with identical options are idempotent — the second call returns
applied=0with a warning instead of duplicating the marker. - After annotating, pass the output OTIO to
clipwright-renderwhich converts the markers intodrawtextffmpeg filters and bakes the text into the video.
MCP Client Registration
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"clipwright-text": {
"command": "clipwright-text",
"args": []
}
}
}
If clipwright-text is not on PATH, use the full path to the script or the
Python interpreter:
{
"mcpServers": {
"clipwright-text": {
"command": "/path/to/.venv/bin/clipwright-text",
"args": []
}
}
}
clipwright_add_text Reference
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
timeline |
str |
Yes | Path to the input .otio timeline file. |
output |
str |
Yes | Path for the new .otio output (must end in .otio, must differ from timeline). |
options |
AddTextOptions |
Yes | Text overlay options (see below). |
AddTextOptions Fields
| Field | Type | Default | Description |
|---|---|---|---|
text |
str |
— | Text to display. Single-line; no newlines or control characters. |
start_sec |
float |
— | Start time in seconds (>= 0). |
duration_sec |
float |
— | Duration in seconds (> 0). |
x |
str |
"(w-tw)/2" |
Horizontal position (ffmpeg drawtext expression). |
y |
str |
"h-th-40" |
Vertical position (ffmpeg drawtext expression). |
font_size |
int |
48 |
Font size in points (> 0). |
font_color |
str |
"white" |
Font color: named color, #RRGGBB, or name@alpha. |
box |
bool |
False |
Draw a background box behind the text. |
box_color |
str |
"black@0.5" |
Background box color. |
fade_in_sec |
float |
0.3 |
Fade-in duration (>= 0; fade_in + fade_out <= duration). |
fade_out_sec |
float |
0.3 |
Fade-out duration (>= 0). |
font_path |
str | None |
None |
Absolute path to a .ttf/.otf font file. None lets clipwright-render resolve a platform default. |
Return Value
{
"ok": true,
"summary": "Added text overlay \"Hello\" at 1.0s for 3.0s. Timeline now has 1 text overlay(s). Output: out.otio.",
"data": {
"applied": 1,
"overlay_count": 1,
"start_sec": 1.0,
"duration_sec": 3.0
},
"artifacts": [
{ "role": "timeline", "path": "/abs/path/out.otio", "format": "otio" }
],
"warnings": []
}
On error:
{
"ok": false,
"error": {
"code": "INVALID_INPUT",
"message": "...",
"hint": "..."
}
}
Requirements
- Python >= 3.11
- opentimelineio >= 0.18
- mcp >= 1.27.2
- clipwright >= 0.3.0 (core library)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clipwright_text-0.1.0.tar.gz.
File metadata
- Download URL: clipwright_text-0.1.0.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
add32191c27f4d41d4b4459cb2b5e0a58b11956ae3496851137831cb1a55630e
|
|
| MD5 |
ace4da47060e887802e30c760372d98b
|
|
| BLAKE2b-256 |
32f39d3865e1337a18c4365d34dff232bc2ffa7d0551f5736d9959be9c340936
|
Provenance
The following attestation bundles were made for clipwright_text-0.1.0.tar.gz:
Publisher:
publish.yml on satoh-y-0323/clipwright
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clipwright_text-0.1.0.tar.gz -
Subject digest:
add32191c27f4d41d4b4459cb2b5e0a58b11956ae3496851137831cb1a55630e - Sigstore transparency entry: 1853474939
- Sigstore integration time:
-
Permalink:
satoh-y-0323/clipwright@a7c1aabba859347ea67a13d1531cf075a71f51d9 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/satoh-y-0323
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a7c1aabba859347ea67a13d1531cf075a71f51d9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file clipwright_text-0.1.0-py3-none-any.whl.
File metadata
- Download URL: clipwright_text-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
150ce3392a41b75d3477a29af2de643fd857e4164dd5a681c6350d34404ba141
|
|
| MD5 |
16214a3a030e8063b471852ffea58873
|
|
| BLAKE2b-256 |
c4bc40bbd02c41830e10e487b23c64dc742f1cbb59e4cda76f7702cabfa267de
|
Provenance
The following attestation bundles were made for clipwright_text-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on satoh-y-0323/clipwright
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clipwright_text-0.1.0-py3-none-any.whl -
Subject digest:
150ce3392a41b75d3477a29af2de643fd857e4164dd5a681c6350d34404ba141 - Sigstore transparency entry: 1853474950
- Sigstore integration time:
-
Permalink:
satoh-y-0323/clipwright@a7c1aabba859347ea67a13d1531cf075a71f51d9 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/satoh-y-0323
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a7c1aabba859347ea67a13d1531cf075a71f51d9 -
Trigger Event:
push
-
Statement type: