演员mcp
MCP服务器 Google Cast --通过mDNS发现本地网络上的设备、播放媒体、控制音量、启动应用程序和管理整个stdio中的队列。不需要环境变量或API密钥;服务器使用castv2协议直接连接到Cast接收器。
安装
bunx @daanrongen/cast-mcp工具(共17个)
| 域 | 工具 | 覆盖范围 |
|---|---|---|
| 发现 | discover_devices | 通过mDNS扫描本地网络以查找启用Cast的设备 |
| 媒体 | play_media, pause, resume, stop, seek, get_media_status | 播放控制和媒体状态 |
| 队列 | load_queue, queue_next, queue_prev | 播放列表排队和导航 |
| 应用 | get_status, launch_app, stop_app | Cast接收器上的应用程序生命周期 |
| 体积 | get_volume, set_volume, mute, unmute | 音量和静音控制 |
设置
克劳德桌面版
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"cast": {
"type": "stdio",
"command": "bunx",
"args": ["@daanrongen/cast-mcp"]
}
}
}克劳德代码CLI
claude mcp add cast -- bunx @daanrongen/cast-mcp发展
bun install
bun run dev # run with --watch
bun test # run test suite
bun run typecheck # type check without emitting
bun run build # bundle to dist/main.js
bun run inspect # open MCP Inspector in browser就地检查
bun run inspect 启动 MCP检查员 反对当地建筑:
bun run build && bun run inspect这将在浏览器中打开检查器UI,您可以在其中交互式调用任何工具并检查请求/响应形状。
建筑
src/
├── config.ts # (no env config required)
├── main.ts # Entry point — ManagedRuntime + StdioServerTransport
├── domain/
│ ├── CastClient.ts # Context.Tag service interface (port)
│ ├── errors.ts # CastError, DeviceNotFoundError
│ ├── models.ts # Schema.Class models (CastDevice, MediaStatus, …)
│ ├── discovery.test.ts # Discovery domain tests
│ ├── media.test.ts # Media domain tests
│ └── volume.test.ts # Volume domain tests
├── infra/
│ ├── CastClientLive.ts # Layer.scoped — mDNS discovery + castv2 connections
│ └── CastClientTest.ts # In-memory test adapter
└── mcp/
├── server.ts # McpServer wired to ManagedRuntime
├── utils.ts # formatSuccess, formatError
└── tools/ # discovery.ts, media.ts, queue.ts, apps.ts, volume.ts许可证
麻省理工学院
