
Chromecast / DLNA casting (catt)
io.github.amineutron由 GitHub 账号 amineutron 发布v0.3.0更新于 Oct 24, 2026
Cast YouTube videos and media to a Chromecast or DLNA device with catt, and control playback.
概览
让助手把 YouTube 视频和其他媒体链接投放到 Chromecast 或 DLNA 设备,并控制播放。
- 可以做什么
- 把 catt 投屏工具封装成约 15 个 MCP 工具。可以按链接或视频 ID 投放 YouTube 视频,投放任意媒体链接,停止、暂停、继续、跳转和调节音量,并查询投放状态与媒体信息。它还能扫描局域网中的 Chromecast 和 DLNA 设备;在装有 Hyprland 的 Linux 桌面上,可以把 Firefox 当前标签页的视频镜像到电视,并支持 PC 与电视同步播放的双屏模式。
- 适用场景
- 适合希望用助手在同一网络内的电视或 Chromecast 上开始或控制播放的场景,例如投放 YouTube 链接、暂停或继续、调节音量。Firefox 镜像和双屏工具只在运行 Hyprland 和 Firefox 的 Linux 桌面上才有意义。
- 运行要求
- 本地进程,可用 uvx 从 PyPI 包 catt-mcp 运行,或用 pip 安装。需要 Python 3.10+、catt 和 yt-dlp 包,以及同一网络中的 Chromecast 或 DLNA 设备。用 CATT_DEVICE 指定设备名称或 IP;TV_HOST 可选,用于通过 ADB 唤醒 Android TV;adb 不在 PATH 时用 ADB_PATH。双屏工具还需要 Hyprland 的 hyprctl、playerctl、Firefox 和 lz4。
安装
在 SourceWeft 中
- 打开 控制台中的 Chromecast / DLNA casting (catt),将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
catt-mcp
[tests] [License: MIT] [Python 3.10+]
MCP server for casting YouTube videos and media to Chromecast/DLNA devices via catt.
Exposes 15 tools covering YouTube casting, playback control, dual-screen sync, and device discovery.
Demo
[MCP client: the 15 tools, then cast_scan finding the TV]
Recorded on the real network with docs/demo/record.sh: a minimal MCP client (docs/demo/mcp_demo.py) starts the server over stdio with CATT_DEVICE in the environment, lists the tools and calls cast_scan (read-only). Private IP addresses are replaced with documentation addresses.
Tools
YouTube ID extraction
_extract_video_id (URL watch?v=, youtu.be/, shorts/ or a bare 11-character ID, anything else rejected before it reaches catt/ADB) is deliberately duplicated in pylips-mcp (youtube_video, TV app with Premium account). Both servers stay installable on their own; each one tests its copy with the same table of cases (tests/test_youtube_id.py). Decision recorded on 2026-09-20.
Requirements
- Python 3.10+
- catt:
pip install catt - yt-dlp:
pip install yt-dlp - A Chromecast or DLNA-compatible device on the same network
lz4(optional, for cache compression):pip install lz4
Dual cast (Linux + Hyprland)
cast_browser, cast_browser_dual, cast_dual_resync, cast_dual_stop and
cast_dual_offset drive Firefox from the running desktop session. They are
advertised only when the required binaries are present:
- Hyprland with
hyprctlinPATH playerctlfor MPRIS playback control- Firefox holding the video to mirror
lz4(Python) to read Firefox's session cache
Without them the server starts normally and simply does not expose these five tools, instead of failing when they are called.
Installation en une ligne
Configuration Claude Desktop / Claude Code (mcpServers) :
Setup
1. Install dependencies
2. Discover your device
Note the device name (e.g. 55OLED705/12, Living Room TV).
3. Configure
Copy config.example.yaml to config.yaml:
4. Run
Or with environment variable:
The code lives in the catt_mcp package (catt_mcp/server.py, catt_mcp/sync_watcher.py),
so it can be installed next to other MCP servers without module name clashes.
The dual-screen tools (dual_cast, dual_resync, dual_offset) drive the TV through
ADB and need its IP address. Set it with TV_HOST (or tv.host in config.yaml),
for example TV_HOST="192.0.2.10"; the built-in default is only a placeholder.
Claude Desktop Configuration
License
MIT
Part of the Lyra ecosystem
来源:README.md,提交 9709a1e
工具
0版本历史
2- v0.3.0最新Sep 25, 2026
- v0.2.1Sep 24, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分