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 分