BR

bestimmaa/roon-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

2 stars 4 forks 质量 78 趋势 24MIT

通过AI代理控制 Roon 音乐播放器的 MCP 服务器

概览

一个MCP服务器来控制音乐播放器,因此AI代理可以找到音乐并开始回放. 建于官方的"龙"扩展API上(node-roon-api + node-roon-api-transport / node-roon-api-browse). Claude在你的图书馆对面搜索和流出,手取音轨,然后排队——都从一个单一的自然语言的快取. - Node.js 20+ - A 运行在本地网络上与 - 在安装主机上 - -- 节点-roon-api* 依赖性发布在 GitHub (npm) 上,并在安装时通过 git URL 获取 将此添加到您的 MCP 客户端配置 。 npx 在第一次运行时获取软件包 : 在第一次发射时,打开并启用对接. 对等状态被登录为stderr;stdout被保留给MCP协议. 配对符被坚持到 ~/.config/roon-mcp/config.json(由ROON MCP CONFIG完成),因此扩展符在重启时都会被批准,而不是每次作为"发现"的新条目出现.

概述(AI 翻译)

一个控制 ** Roon ** 音乐的 MCP 服务器 player,因此AI代理可以找到音乐并开始回放. 盖在官上 Roon扩展 API ([T0] + node-roon-api-transport] / node-roon-api-browse。

– – . . .

在Roon(Zone: This Computer)上播放一首女性相声配音曲——2000年代的荷兰相声, 开始像4个弦’带我离开。**

翻译: *Claude在您的库中搜索并流出,手取出音轨并排队——都来自一个单一的自然语言提示. *

– – . . .

□ 要求

  • 20多号节点
  • 本地网络上运行的** Roon Core**与
  • git在安装主机上——node-roon-api*依赖性发布 在 GitHub( 不是 npm) 上, 安装时通过 git URL 获取

□ MCP 客户端配置

将此添加到您的 MCP 客户端配置 。 npx 在第一次运行时获取软件包 :

首次发射时,开放车道 → 设置 → 扩展并启用车道 MCP 到对对。 对等状态登录为 stderr; stdout 保留给 MCP 协议。 相配的符号坚持到~/.config/roon-mcp/config.json

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

roon-mcp

An MCP server to control the Roon music player, so an AI agent can find music and start playback. Built on the official Roon Extension API (node-roon-api + node-roon-api-transport / node-roon-api-browse).


“Play a female vocal trance mix on Roon (Zone: This Computer) — 2000s Dutch trance vibes, the kind of set you’d hear at Amnesia in its prime. Start with something like 4 Strings’ Take Me Away.”

Claude searches across your library and streaming, hand-picks the tracks, and queues them — all from a single natural-language prompt.


Requirements

  • Node.js 20+
  • A running Roon Core on the local network to pair with
  • git on the install host — the node-roon-api* dependencies are published on GitHub (not npm) and are fetched via git URLs during install

MCP Client Configuration

Add this to your MCP client config. npx fetches the package on first run:

{
  "mcpServers": {
    "roon": {
      "command": "npx",
      "args": ["-y", "roon-mcp"],
      "env": { "ROON_DEFAULT_ZONE": "Office" }
    }
  }
}

On first launch, open Roon → Settings → Extensions and enable Roon MCP to pair. Pairing status is logged to stderr; stdout is reserved for the MCP protocol. The pairing token is persisted to ~/.config/roon-mcp/config.json (override with ROON_MCP_CONFIG), so the extension stays authorized across restarts rather than appearing as a new “Discovered” entry each time.

Global install (optional)

npm install -g roon-mcp
{
  "mcpServers": {
    "roon": {
      "command": "roon-mcp",
      "env": { "ROON_DEFAULT_ZONE": "Office" }
    }
  }
}

Configuration

Env var Purpose
ROON_DEFAULT_ZONE Optional fallback target for play_now / enqueue_and_play when no zoneId is given — a zone/output id or a display-name substring. If unset, the server falls back to the only zone, an Office zone, or the currently-playing zone; if it still can’t decide it returns ZONE_AMBIGUOUS so the agent can ask.
ROON_HOST Optional direct-connection host for the Core’s API, bypassing SOOD multicast discovery — for VLAN-segmented networks, VPNs, or containers where discovery doesn’t survive. Unset (default) uses discovery as before.
ROON_PORT WebSocket port of the Core’s API when ROON_HOST is set. Defaults to 9330.
ROON_MCP_CONFIG Optional path for the persisted pairing token. A value ending in .json is the file itself; anything else is a directory to hold config.json. Defaults to $XDG_CONFIG_HOME/roon-mcp/config.json (i.e. ~/.config/roon-mcp/config.json).

Tools

Tool Purpose
list_zones() List playable zones/outputs (id, name, state, output ids).
在 GitHub 查看完整 README

安装

npx -y roon-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "roon": { "command": "npx", "args": ["-y", "roon-mcp"], "env": { "ROON_DEFAULT_ZONE": "Office" } } } }