tvsub MCP

io.github.launzi由 GitHub 帳號 launzi 發布v0.3.0更新於 Oct 26, 2026

Control tvsub for Apple TV.app: subtitles, glossary-aware translation, overlay, styling, and sync.

已驗證STDIO僅桌面媒體與設計AI 與機器學習

概覽

AI 產生的概覽

控制 macOS 上 Apple TV.app 的字幕疊加工具 tvsub:檢視播放狀態、載入或翻譯字幕、調整樣式並校準同步。

可以做什麼
  • 讀取 Apple TV.app 目前影片、播放位置與狀態,並彙整疊加層、字幕、樣式與校準狀態
  • 列出並解析 tvsub 字幕庫中的字幕檔,為目前內容選擇字幕並預設保留同步錨點
  • 預估或執行大型語言模型字幕翻譯,含時間軸驗證、後端選擇、詞彙表注入與依行或時間區段的局部重譯
  • 維護每部影片的詞彙表,並將譯文字幕標記為使用者已審閱
  • 列出已安裝的 macOS 字型與字形涵蓋範圍,調整字型、大小、顏色、描邊、背景與位置
  • 啟動或停止疊加層,記錄對白錨點以計算時間偏移與漂移
適用情境
適合在 macOS 上使用 tvsub、透過 Apple TV.app 觀看已購買或租借影片的使用者,希望由助理載入、翻譯、調整樣式並對齊字幕疊加,例如為外語片補上缺少的語言,或把韓語作品翻成其他語言。
執行需求
需要 macOS、已安裝並建置完成的 tvsub、Python 3.12 以上版本,以及用於建議 uvx 安裝方式的 uv;伺服器以本機 stdio 程序啟動,需傳入 tvsub 根目錄參數。翻譯需 Anthropic API 金鑰、已登入的 Claude Code CLI 或已登入的 Codex CLI 三者之一,其他工具則不需要。
安裝前請注意
使用 api 後端翻譯時會把字幕文字與上下文傳送給 Anthropic,API 費用由使用者負擔,預估值可能與最終帳單不同。匿名使用統計預設開啟,每天向遠端收集端傳送一次,可用 TVSUB_TELEMETRY=0 或 DO_NOT_TRACK=1 關閉。此伺服器依賴未公開的 macOS MediaRemote 介面,系統更新可能使其失效;專案自稱實驗性,內容版權由使用者自行負責。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 tvsub MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

tvsub MCP

[M8ven Score]

tvsub-mcp is the MCP companion for tvsub, an experimental subtitle overlay for Apple TV.app on macOS. It lets an MCP client inspect the current playback item, choose or translate a subtitle file, adjust its appearance, start or stop the overlay, and calibrate subtitle timing.

Supported player: purchased and rented films in macOS Apple TV.app (Prime Video support is being explored and is not currently available). Subtitle formats: SRT, SMI/SAMI, VTT. Translation runs on your choice of three backends: an Anthropic API key, a signed-in Claude Code CLI (Claude subscription), or a signed-in Codex CLI (ChatGPT subscription) — subscription backends add no API charges.

The server does not download subtitles, bypass DRM, modify video, or launch TV.app. You provide subtitle files that you have the right to use and start playback yourself.

Two directions, one workflow

If a foreign, classic, or multilingual film you purchased in Apple TV.app does not include Korean—or another language you need—bring a lawfully obtained subtitle file, translate it with your Claude or ChatGPT subscription, and display it as an overlay. The same workflow works in the other direction: viewers worldwide can translate lawfully obtained subtitles for Korean films and series into their own language.

Apple TV.app에서 구매한 외화·고전·다국어 영화에 한국어 또는 원하는 언어 자막이 없다면, 정당하게 보유한 자막 파일을 불러와 Claude나 ChatGPT 구독으로 번역한 뒤 오버레이로 표시할 수 있습니다. 같은 방식으로 전 세계 시청자도 한국 영화와 시리즈의 정당하게 보유한 자막을 자신의 언어로 번역해 시청할 수 있습니다.

Requirements

  • macOS
  • tvsub, installed and built
  • Python 3.12 or later
  • uv for the recommended uvx installation
  • For subtitle translation, one of: an Anthropic API key, a signed-in Claude Code CLI (Claude subscription), or a signed-in Codex CLI (ChatGPT subscription). No key or CLI is needed for any other tool

Install and register with Claude Code

Replace /absolute/path/to/tvsub with the directory containing tvsub's build/, config/, src/, and subtitles/ directories.

bash
brew install uv
claude mcp add --transport stdio --scope user tvsub -- \  uvx tvsub-mcp==0.3.0 \  --tvsub-root /absolute/path/to/tvsub
claude mcp get tvsubclaude mcp list

Translation picks a backend automatically: an Anthropic API key if present, then a signed-in Claude Code CLI, then a signed-in Codex CLI. Set TVSUB_TRANSLATE_BACKEND (auto, api, claude, codex) or the backend tool argument to override. With a subscription CLI signed in you can skip the key entirely. To use the API backend, export your key and include it when registering the server — or store it once in macOS Keychain (service kim.youngji.tvsub.anthropic), which the server also reads.

bash
export ANTHROPIC_API_KEY="your-key"
claude mcp add --transport stdio --scope user \  --env ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \  tvsub -- uvx tvsub-mcp==0.3.0 \  --tvsub-root /absolute/path/to/tvsub

Other stdio MCP clients can launch the same command:

bash
uvx tvsub-mcp==0.3.0 --tvsub-root /absolute/path/to/tvsub

Tools

ToolPurpose
now_playingRead the current Apple TV.app title, content ID, position, and playback state.
list_subtitlesList and parse SRT, SMI, SAMI, and VTT files in tvsub's subtitle library.
load_subtitleSelect a subtitle file for the current content while preserving sync anchors by default.
translate_subtitleEstimate or perform an LLM translation with cue and timecode validation. Supports backend selection, glossary injection, and partial retranslation by line or time range.
set_glossaryCreate or update a per-title glossary (names, honorifics, relationships, forbidden translations) that is injected into translation prompts.
mark_reviewedPromote a translated subtitle's provenance from ai_draft to user_reviewed.
list_fontsList installed macOS fonts and check sample glyph coverage.
set_styleChange font, size, colors, outline, background, and screen position.
start_overlayStart tvsub with the selected subtitle and style.
stop_overlayStop only the overlay process started by this server.
calibrate_syncStore one or more dialogue anchors and calculate timing offset and drift.
statusSummarize playback, overlay, subtitle, style, and calibration state.

Before translating, call translate_subtitle with dry_run=true to review the cue count, batch count, and estimated cost. Subscription backends report $0 (included in subscription). Every translation writes a .provenance.json sidecar recording backend, hashes, and review status.

Usage statistics

Starting with 0.2.3, anonymous usage statistics are enabled by default. The server stores a random installation ID (UUIDv4), daily tool and translation backend counts, and send dates in ~/Library/Application Support/tvsub/telemetry.json. The first enabled run prints a notice to stderr; the status tool reports whether collection is enabled, what is sent, and how to disable it.

On startup and after tool calls, the server checks for unsent days before today. It sends the oldest pending day in a background POST to https://youngji.kim/api/tvsub/telemetry, at most once per local calendar day. The timeout is 3 seconds. Failed attempts keep their counters and retry on the next eligible day; they do not interrupt tools. TVSUB_TELEMETRY_URL overrides the collector URL.

The JSON contains only install_id, day, tvsub_mcp_version, macos_version (major.minor), python_minor (major.minor), tools (counts for the 12 tool names), and backends (counts for api, claude, codex, pro, or auto). An omitted or empty backend is counted as auto; this records the requested backend, not the backend eventually selected by translation. Statistics never include subtitle text, titles, content IDs, filenames, paths, glossaries, API keys, raw errors, or IP addresses in the payload.

To disable both recording and sending, set TVSUB_TELEMETRY=0 (false, off, and no also work, case-insensitively), or DO_NOT_TRACK=1 in the MCP server's environment. For example, add --env TVSUB_TELEMETRY=0 to the claude mcp add command before tvsub. Mock mode (--mock or TVSUB_MCP_MOCK=1) and tests always disable statistics. Disabling leaves any existing local counters untouched; no statistics are recorded or sent while disabled.

Important notices

  • Experimental software: expect rough edges and breaking changes. Keep a backup of your tvsub configuration and subtitle files.
  • Data sent to Anthropic: translation sends the selected subtitle text and surrounding subtitle context to the Anthropic API. Loading, styling, sync, and overlay controls do not send subtitle text to Anthropic.
  • User-paid API usage: the api backend uses your Anthropic API key and all charges are your responsibility; estimates can differ from the final bill. The claude and codex backends run through your own signed-in subscription CLIs and add no API charges.
  • Private API risk: tvsub reads Apple playback state through undocumented macOS MediaRemote interfaces. Apple does not support this integration and a macOS update may change or disable it.
  • Content rights: you are responsible for having the right to process and translate subtitle files. Do not redistribute protected content without permission.
  • This project is independent from and not affiliated with Apple or Anthropic.

Development

bash
python3.12 -m venv .venv.venv/bin/python -m pip install -e ..venv/bin/python -m unittest discover -s tests -p 'test_*.py' -vTVSUB_TEST_PYTHON="$PWD/.venv/bin/python" .venv/bin/python tests/stdio_smoke.pybash scripts/hygiene-check.sh

Before tagging a release, run bash scripts/preflight.sh from the repository root.

Linux can run the unit tests and mock stdio smoke test. Apple TV.app, MediaRemote, CoreText, and the real overlay require macOS.

License

MIT. See LICENSE.

來源:README.md,提交 60f40d0

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:軟體包安裝失敗。

版本歷史

2
  1. v0.3.0最新Oct 22, 2026
  2. v0.2.2Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分