smart-subtitle-converter-mcp
v1.5.0MCP server for the Smart Subtitle Converter API (community wrapper around Subtitle Edit libse; not an official Subtitle Edit project).
It handles SRT, WebVTT, TTML, ASS and broadcast formats such as EBU STL, PAC and Cavena 890. The agent is told whether anything was lost in the conversion and which setting fixes it. Files go by path, so their contents don't need to pass through the model's context. The MCP server does no conversion itself. It passes requests to the API, which runs in a container, and handles the files on your machine. If you want to call the converter from your own platform instead of an AI client, use the API directly.
Summary extracted from the README.
Smart Subtitle Converter MCP
An MCP server for converting and checking subtitles from Claude, Cursor or any other MCP client.
It handles SRT, WebVTT, TTML, ASS and broadcast formats such as EBU STL, PAC and Cavena 890. The agent is told whether anything was lost in the conversion and which setting fixes it. Files go by path, so their contents don't need to pass through the model's context.
Built on Subtitle Edit. Conversions run in the Smart Subtitle Converter API, which wraps
libse, the library behind Subtitle Edit by Nikolaj Olsson (MIT). This is a community project, not an official Subtitle Edit project.Early software. Expect changes, and please report issues.
How it works
The MCP server does no conversion itself. It passes requests to the API, which runs in a container, and handles the files on your machine. If you want to call the converter from your own platform instead of an AI client, use the API directly.
What you get
- A verdict on every broadcast output. EBU STL, PAC and the other binary outputs are read back and reported
as
lossless,quantised,lossyorunverified. Warnings carry ahintand structureddetails, such as aremedyfor lost characters. - Files go by path. Their contents don't need to pass through the model's context. Content, keys and tokens are never logged.
- Access to named folders only. The server reads and writes inside the folders you set
(
SUBTITLE_MCP_ALLOWED_DIRS/SUBTITLE_MCP_READONLY_DIRS). Read-only folders stay read-only. - Subtitle files only. It reads, lists and writes only files with a subtitle extension, never touches hidden
files or folders (names starting with
.), and never follows symbolic links (security). - Atomic writes. Single files are staged and committed with a rename. Existing files are never overwritten unless you allow it.
- Errors the agent can act on. Each has a stable
code, ahintand, for path errors, the allowed folders. With a broken setup the server still starts and every tool reports what to fix, so the agent doesn't just see a closed connection.
Quick start (Claude Code)
1. Start the API. Its quick start serves
http://localhost:8080 and writes an API key to api_keys.txt.
2. Give the MCP the key. The API's api_keys.txt belongs to its container user, so copy the first key into a
private file of your own, from the API's folder:
sudo grep -v -e '^#' -e '^$' api_keys.txt | head -n 1 > ~/subtitle-api-key.txt && chmod 600 ~/subtitle-api-key.txt
The MCP uses the first line of the file that isn't empty or a comment (lines starting with # are skipped), so a
copy of the whole api_keys.txt works too.
3. Add the server. Point SUBTITLE_MCP_ALLOWED_DIRS at the folder that holds your subtitles:
claude mcp add \
--env SUBTITLE_API_URL=http://localhost:8080 \
--env SUBTITLE_API_KEY_FILE=/Users/me/subtitle-api-key.txt \
--env SUBTITLE_MCP_ALLOWED_DIRS=/Users/me/Subtitles \
--transport stdio \
smart-subtitle-convert -- npx -y smart-subtitle-converter-mcp
SUBTITLE_API_KEY=<key> works too. Without a key, conversions fail with unauthorized.
4. Ask for a conversion:
Convert
movie123.srtin/Users/me/Subtitlesto EBU STL
Convert
movie123.srtin/Users/me/Subtitlesto EBU STL, place it ins3://customer1/2026-11-12/
The second one needs that bucket in the API's storage allowlist.
Claude Desktop, Cursor, VS Code, Codex, other clients, Windows, or building from source: see docs/clients.md.
Supported subtitle formats
| Formats | |
|---|---|
| Text, read and write | SRT, WebVTT, ASS/SSA, TTML/DFXP, SBV, SMI and Subtitle Edit's other text formats |
| Editing and post-production | Final Cut Pro XML captions (.fcpxml), and marker lists from Avid and EDIUS |
| Binary broadcast, read and write | EBU STL, PAC, FPC, Cavena 890, CapMaker Plus, Cheetah CAP |
| Binary, read only | Avid STL, Ayato and others |
| Not supported | Image-based and container formats (Blu-ray sup, VobSub, Matroska, MP4) |
The list_formats tool has the live list. Code pages, frame rates and detection rules are in the API's
formats page, and Subtitle
Edit's supported formats page
describes the formats themselves.
Tools
| Tool | What it does |
|---|---|
convert_subtitle |
Convert one file (path, inline, or API input) to inline, local output, or API output |
get_job |
Status and result metadata of a conversion job, for work that outlasted a call |
detect_format |
Format, encoding, BOM, line endings and language of a file |
list_formats |
Formats with read/write and text/binary flags |
list_presets / get_profile |
Built-in and mounted presets, raw and resolved |
validate_profile |
Check a profile, with pointer-level errors and hints |
preview_text |
Read the text of an API job's stored input or output, or of a file by location, page by page (binary formats shown as SRT) |
list_files |
List a local folder or an API storage location, page by page (SUBTITLE_MCP_LIST_ENABLED=false hides it) |
list_allowed_folders |
The folders in effect right now, with mode and source; with browsing on, also the API's storage locations |
Inputs, results and warning fields: docs/tools.md. Each result is sent both as structured data
and as the same JSON in a text block, because apps differ in which part they pass to the model;
SUBTITLE_MCP_RESULT_IN keeps one (why).
API storage and job tracking
- API locations. Besides local files,
convert_subtitlecan hand the API its owninputandoutputlocations (an allowlisted folder on the API server, an S3-compatible bucket or an HTTPS URL), with an optionalsidecarJSON next to the output.detect_formatacceptsinputtoo. These are resolved by the API with its own allowlists, separately from the MCP's local folders. - No silent overwrites. Outputs are never overwritten unless you send
ifExists: "replace". One file per call. - Jobs. Every conversion returns a
jobId. When work outlasts the wait, the MCP polls the job, andget_jobchecks it later. The API keeps metadata only, so: if a conversion may take long or another system picks the file up from API storage, give an APIoutput. - Previewing.
preview_textreads the text of a job's stored input or output, in pages that end on whole cues, while the API still has its record. - Browsing.
list_fileslists a folder andpreview_textreads a file by its full URI or path. The API's storage is browsable whenever the API allows it (its default) (browsing). - Inline results. Without any output location,
convert_subtitleattaches the whole converted file to its result for the client to save.
See tools, configuration and writing files.
Safeguards
The usual setup is stdio: the server talks to one local client, not the network. It has not been independently audited, and it is meant for a trusted environment, not the public internet. Details: docs/security.md and the API's security notes.
Documentation
| Read this | When you want to |
|---|---|
| docs/clients.md | Set it up in Claude Code, Claude Desktop, Cursor, VS Code, Codex and other clients; Windows; build from source |
| docs/folders-and-roots.md | Understand which folders it may use |
| docs/tools.md | See every tool's inputs, results, verification and warning fields |
| API errors and warnings | Look up what an API error or warning means, why it happened and what to do |
| docs/writing-files.md | Know how files are staged and committed, ifExists, race windows |
| docs/configuration.md | Look up every SUBTITLE_MCP_* variable and flag |
| docs/security.md | See allowed folders, writes, API keys and HTTP-mode safeguards |
| docs/http-sidecar.md | Run it over Streamable HTTP next to the API in Docker |
| docs/troubleshooting.md | Fix MCP-local errors (folders, writes, talking to the API); API codes are on the errors and warnings page above |
| docs/development.md | Build, test, run the contract suite and the smoke checklist |
| CHANGELOG.md | See what changed in each version |
Versions: use the MCP release whose major.minor matches your API; patch versions may differ. If the API's
major.minor differs in any way (major or minor, older or newer), the server still runs and adds an
mcp-api-version-mismatch warning to tool results.
Feedback and author
Bug reports are welcome, especially with the file and the client involved: open an issue.
Built by Wauter De Bruyne, a solution architect working on media workflow automation for broadcasters, sports organisations and streaming platforms.
Credits and license
All subtitle format support comes from Subtitle Edit and its
libse library by Nikolaj Olsson and contributors (MIT), through the
Smart Subtitle Converter API.
This server is MIT licensed, see LICENSE.