deep-roon-mcp 0.4.7 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/deep-roon-mcp.js +35 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -200,6 +200,15 @@ status; it holds no secrets).
|
|
|
200
200
|
- Several clients at once (Claude Desktop and Claude Code, or ChatGPT next to them) work: Roon keeps one connection
|
|
201
201
|
per extension, and the client that asks a question takes it over for that moment.
|
|
202
202
|
- Album, track and artist keys stay valid between calls.
|
|
203
|
+
- Track artists: a track's `artist` is its album's artist (on a compilation that is often "Various Artists"). Where the
|
|
204
|
+
track's own main artist differs, it comes as `track_artist` — in search, `roon_tracks`, albums, playlists, the queue
|
|
205
|
+
and what plays now. Roon keeps it in the track's credits.
|
|
206
|
+
- Covers: every `image` key comes with an `image_url` to load it from your Core. Roon has two kinds of image keys that
|
|
207
|
+
aren't interchangeable. Deep Roon reads Roon's internal library, so most keys are internal ones (short, like
|
|
208
|
+
`doicaaaa`): the Core serves them at `http://<core>:9330/image/<key>.jpg`, or scaled at `/image/<key>.300.jpg` (any
|
|
209
|
+
width). The zones (`roon_now_playing`) come from Roon's official extension API, whose keys (long hex) are served at
|
|
210
|
+
`/api/image/<key>?scale=fit&width=600&height=600`. The URL uses the Core's address as Deep Roon sees it — when Deep
|
|
211
|
+
Roon runs on the Core's own machine that is `127.0.0.1`; from another device, put the Core's IP there.
|
|
203
212
|
- The log goes to stderr (your MCP client keeps it).
|
|
204
213
|
- At the start it asks GitHub once whether a newer release is out (`DEEP_ROON_NO_UPDATE_CHECK=1` turns that off). Nothing
|
|
205
214
|
else leaves your network except what your client sends to its model.
|
package/dist/deep-roon-mcp.js
CHANGED
|
@@ -15525,7 +15525,7 @@ var require_lib2 = __commonJS({
|
|
|
15525
15525
|
var version2;
|
|
15526
15526
|
var init_package = __esm({
|
|
15527
15527
|
"package.json"() {
|
|
15528
|
-
version2 = "0.4.
|
|
15528
|
+
version2 = "0.4.9";
|
|
15529
15529
|
}
|
|
15530
15530
|
});
|
|
15531
15531
|
|
|
@@ -15699,7 +15699,7 @@ async function setVolume(name, change) {
|
|
|
15699
15699
|
}
|
|
15700
15700
|
return { zone: z2.display_name, outputs: outs.map((o) => ({ output: o.display_name, scale: `${o.volume.min}\u2013${o.volume.max}` })), volume: change.value, muted: change.mute };
|
|
15701
15701
|
}
|
|
15702
|
-
var import_fs, import_net, import_os, import_path, import_node_roon_api, import_node_roon_api_transport, STATE_FILE, readState, writeState, transport, zones, started, waiting, zonesIn, zoneWaiting, roon, core, open2, retrying, officialZones, isPaired;
|
|
15702
|
+
var import_fs, import_net, import_os, import_path, import_node_roon_api, import_node_roon_api_transport, STATE_FILE, readState, writeState, transport, zones, started, waiting, zonesIn, zoneWaiting, roon, core, open2, retrying, officialZones, coreWeb, isPaired;
|
|
15703
15703
|
var init_official = __esm({
|
|
15704
15704
|
"src/core/official.ts"() {
|
|
15705
15705
|
"use strict";
|
|
@@ -15741,6 +15741,7 @@ var init_official = __esm({
|
|
|
15741
15741
|
__name(afterClose, "afterClose");
|
|
15742
15742
|
__name(paired, "paired");
|
|
15743
15743
|
officialZones = /* @__PURE__ */ __name(() => [...zones.values()], "officialZones");
|
|
15744
|
+
coreWeb = /* @__PURE__ */ __name(() => core ? `http://${core.host}:${core.port}` : null, "coreWeb");
|
|
15744
15745
|
isPaired = /* @__PURE__ */ __name(() => !!transport, "isPaired");
|
|
15745
15746
|
__name(officialReady, "officialReady");
|
|
15746
15747
|
__name(officialZone, "officialZone");
|
|
@@ -16032,6 +16033,7 @@ function resultRow(c, o) {
|
|
|
16032
16033
|
if (t === "TrackLite" || t === "Track") {
|
|
16033
16034
|
const al = obj(c, field2(o, "Album"));
|
|
16034
16035
|
const r = { kind: "track", key: String(field2(o, "TrackId") ?? ""), title: field2(o, "Title") ?? "", artist: clean(field2(al, "PerformedBy") ?? field2(o, "PerformedBy") ?? "") };
|
|
16036
|
+
trackArtist(c, r, o, al);
|
|
16035
16037
|
const album2 = field2(al, "Title");
|
|
16036
16038
|
if (album2) r.album = album2;
|
|
16037
16039
|
const ak = field2(al, "AlbumId");
|
|
@@ -16047,6 +16049,17 @@ function resultRow(c, o) {
|
|
|
16047
16049
|
}
|
|
16048
16050
|
return { kind: t, title: field2(o, "Title") ?? field2(o, "Name") ?? "" };
|
|
16049
16051
|
}
|
|
16052
|
+
function trackArtist(c, r, tr, al) {
|
|
16053
|
+
const namen = [];
|
|
16054
|
+
for (const cr of items(c, field2(tr, "Credits"))) {
|
|
16055
|
+
if (field2(cr, "Type") !== 3) continue;
|
|
16056
|
+
const n = field2(obj(c, field2(cr, "Performer")), "Name");
|
|
16057
|
+
if (typeof n === "string" && n && !namen.includes(n)) namen.push(n);
|
|
16058
|
+
}
|
|
16059
|
+
const albumArtiest = clean(field2(al, "PerformedBy") ?? "");
|
|
16060
|
+
if (!namen.length || namen.includes(albumArtiest) || namen.every((n) => albumArtiest.includes(n))) return;
|
|
16061
|
+
r.track_artist = namen.join(", ");
|
|
16062
|
+
}
|
|
16050
16063
|
var obj, clean, typeOf, items, strings, flag, yearOf, wait;
|
|
16051
16064
|
var init_graph = __esm({
|
|
16052
16065
|
"src/roon/graph.ts"() {
|
|
@@ -16081,6 +16094,7 @@ var init_graph = __esm({
|
|
|
16081
16094
|
__name(sourceOf, "sourceOf");
|
|
16082
16095
|
__name(albumRow, "albumRow");
|
|
16083
16096
|
__name(resultRow, "resultRow");
|
|
16097
|
+
__name(trackArtist, "trackArtist");
|
|
16084
16098
|
}
|
|
16085
16099
|
});
|
|
16086
16100
|
|
|
@@ -16325,6 +16339,7 @@ async function album(key, withCredits) {
|
|
|
16325
16339
|
const n = field2(t, "TrackNumber");
|
|
16326
16340
|
if (n != null) r.n = n;
|
|
16327
16341
|
r.title = field2(t, "Title");
|
|
16342
|
+
trackArtist(c, r, t, al);
|
|
16328
16343
|
const l = field2(t, "LengthSeconds");
|
|
16329
16344
|
if (typeof l === "number") {
|
|
16330
16345
|
r.length = duration3(l);
|
|
@@ -49614,6 +49629,7 @@ async function nowPlaying() {
|
|
|
49614
49629
|
r.title = field2(tr, "Title");
|
|
49615
49630
|
r.artist = clean(field2(al, "PerformedBy"));
|
|
49616
49631
|
r.album = field2(al, "Title");
|
|
49632
|
+
trackArtist(c, r, tr, al);
|
|
49617
49633
|
const tk = field2(tr, "TrackId");
|
|
49618
49634
|
if (tk !== void 0 && tk !== null) r.track_key = String(tk);
|
|
49619
49635
|
const ak = field2(al, "AlbumId");
|
|
@@ -49869,6 +49885,7 @@ function queueRow(c, oid) {
|
|
|
49869
49885
|
const tr = obj(c, field2(items(c, field2(c.graph.getObject(oid), "Tracks"))[0], "Track"));
|
|
49870
49886
|
const al = obj(c, field2(tr, "Album"));
|
|
49871
49887
|
const r = { title: field2(tr, "Title") ?? null, artist: clean(field2(al, "PerformedBy") ?? "") };
|
|
49888
|
+
trackArtist(c, r, tr, al);
|
|
49872
49889
|
const album2 = field2(al, "Title");
|
|
49873
49890
|
if (album2) r.album = album2;
|
|
49874
49891
|
const l = field2(tr, "LengthSeconds");
|
|
@@ -50418,10 +50435,23 @@ function updateNotice() {
|
|
|
50418
50435
|
__name(updateNotice, "updateNotice");
|
|
50419
50436
|
|
|
50420
50437
|
// src/tools/run.ts
|
|
50438
|
+
init_official();
|
|
50439
|
+
function withImageUrls(v, base) {
|
|
50440
|
+
if (Array.isArray(v)) return v.map((x) => withImageUrls(x, base));
|
|
50441
|
+
if (!v || typeof v !== "object") return v;
|
|
50442
|
+
const url2 = /* @__PURE__ */ __name((k) => /^[0-9a-f]{32,}$/.test(k) ? `${base}/api/image/${k}?scale=fit&width=600&height=600` : `${base}/image/${k}.jpg`, "url");
|
|
50443
|
+
const o = {};
|
|
50444
|
+
for (const [k, x] of Object.entries(v)) o[k] = withImageUrls(x, base);
|
|
50445
|
+
if (typeof o.image === "string" && o.image && o.image_url === void 0) o.image_url = url2(o.image);
|
|
50446
|
+
if (Array.isArray(o.images) && o.image_urls === void 0) o.image_urls = o.images.filter((k) => typeof k === "string").map(url2);
|
|
50447
|
+
return o;
|
|
50448
|
+
}
|
|
50449
|
+
__name(withImageUrls, "withImageUrls");
|
|
50421
50450
|
var compact = /* @__PURE__ */ __name((_k, v) => v === void 0 ? void 0 : typeof v === "bigint" ? v.toString() : v, "compact");
|
|
50422
50451
|
async function run(work2) {
|
|
50423
50452
|
try {
|
|
50424
|
-
const
|
|
50453
|
+
const base = coreWeb();
|
|
50454
|
+
const result = base ? withImageUrls(await work2(), base) : await work2();
|
|
50425
50455
|
const notice = updateNotice();
|
|
50426
50456
|
return { content: [{ type: "text", text: JSON.stringify(result, compact) }, ...notice ? [{ type: "text", text: notice }] : []] };
|
|
50427
50457
|
} catch (e) {
|
|
@@ -50458,7 +50488,7 @@ function registerReadTools(server, internal = true) {
|
|
|
50458
50488
|
const reg = /* @__PURE__ */ __name(((name, cfg, cb) => R(name) ? server.registerTool.call(server, name, cfg, cb) : void 0), "reg");
|
|
50459
50489
|
reg("roon_search", {
|
|
50460
50490
|
title: "Search Roon",
|
|
50461
|
-
description:
|
|
50491
|
+
description: "Search Roon \u2014 the user's Roon library and the catalogues of the streaming services signed in (Qobuz, TIDAL) at once; each row says its `source` (library, Qobuz, TIDAL). Rows carry `image`, the key of the cover, and `image_url`, where the Core serves it (for clients that draw; a chat shows covers with roon_cover). Deep Roon's keys are Roon's internal ones (/image/<key>.jpg, scaled /image/<key>.300.jpg), not the official API's (roon_now_playing; /api/image/<key>) \u2014 `image_url` always has the right one. Returns albums (with format, e.g. FLAC 96kHz 24bit), artists and tracks. `kind` narrows to album, track or artist \u2014 use `kind: \"track\"` with the song title (and artist) to find one specific track; a broad query without `kind` can fill up with artists. Albums and tracks carry a `key` for `roon_album`; artists carry a `key` for `roon_artist` and `roon_bio`. Albums say their `year`, and `in_library` when the user has them in Roon. Keys stay valid between calls.",
|
|
50462
50492
|
inputSchema: { query: external_exports.string().min(1), kind: external_exports.enum(["album", "track", "artist"]).optional(), limit: limit(100, 30) },
|
|
50463
50493
|
annotations: READ
|
|
50464
50494
|
}, ({ query, kind, limit: n }) => run(() => search(query, n ?? 30, kind)));
|
|
@@ -50996,6 +51026,7 @@ async function playlist(key, limit3) {
|
|
|
50996
51026
|
const tr = obj(c, field2(obj(c, x), "Track"));
|
|
50997
51027
|
const al = obj(c, field2(tr, "Album"));
|
|
50998
51028
|
const r = { n: i + 1, key: String(field2(tr, "TrackId") ?? ""), title: field2(tr, "Title") ?? null, artist: clean(field2(al, "PerformedBy") ?? ""), album: field2(al, "Title") ?? void 0 };
|
|
51029
|
+
trackArtist(c, r, tr, al);
|
|
50999
51030
|
const ak = field2(al, "AlbumId");
|
|
51000
51031
|
if (ak !== void 0 && ak !== null) r.album_key = String(ak);
|
|
51001
51032
|
const im = imageKey(c, al);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deep-roon-mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"description": "An MCP server for Roon that reaches the parts the official API doesn't: reviews, biographies, Qobuz's and TIDAL's shelves, TIDAL's playlists, your history, search across your library and the streaming services",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "René Bouwmeester <21277119+renebouwmeester@users.noreply.github.com>",
|