stagebook-mcp 0.1.1 → 0.1.3
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 -8
- package/README.pt-BR.md +11 -10
- package/dist/index.js +5 -0
- package/dist/server.js +14 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [Português (Brasil)](README.pt-BR.md)
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/stagebook-mcp)
|
|
6
|
+
|
|
5
7
|
Lets AI assistants read and edit the songs and setlists on your Stagebook tablet: "build a 15-song setlist for Saturday
|
|
6
8
|
without repeating artists", "move every Skank song down a half tone", "check the chords of Hazard", "import this page".
|
|
7
9
|
It's a [Model Context Protocol](https://modelcontextprotocol.io) server that runs on your computer and talks to the
|
|
@@ -19,7 +21,7 @@ Windsurf, Gemini CLI, OpenAI Codex CLI…).
|
|
|
19
21
|
| Songs | `list_songs` (filters: text, tag, key), `get_song`, `create_song`, `update_song`, `delete_song`, `transpose_song`, `set_capo` |
|
|
20
22
|
| Import | `import_song` (pasted lyrics/chords in any common format, or a song page address) |
|
|
21
23
|
| Backing tracks | `set_backing_track` (OGG, MP3 or WAV from this computer), `remove_backing_track` |
|
|
22
|
-
| Setlists | `list_setlists
|
|
24
|
+
| Setlists | `list_setlists` (filter: name), `setlist_order` (newest or A to Z, the same as the app's tab), `get_setlist`, `create_setlist`, `update_setlist`, `delete_setlist` |
|
|
23
25
|
| Receiving | `receive_by_code` (the 3 words), `receive_create`, `band_inbox`, `band_sync`, `open_band_item` |
|
|
24
26
|
| Backup | `restore_backup` (inspect a `.stagebook` file, add what's missing or replace the library) |
|
|
25
27
|
|
|
@@ -34,14 +36,11 @@ Files to send (backing tracks, backups) take a full path; `~` is your home folde
|
|
|
34
36
|
|
|
35
37
|
## Install
|
|
36
38
|
|
|
37
|
-
Needs [Node.js](https://nodejs.org) 20 or newer.
|
|
39
|
+
Needs [Node.js](https://nodejs.org) 20 or newer. The server is on npm as
|
|
40
|
+
[`stagebook-mcp`](https://www.npmjs.com/package/stagebook-mcp): nothing to download from GitHub.
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
That's the server: your assistant starts it by itself with the settings below (`npx` downloads it the first time and
|
|
44
|
-
keeps it up to date), so there's nothing to run by hand.
|
|
42
|
+
You don't run it by hand: your assistant starts it by itself with the settings below (`npx` downloads it the first time and
|
|
43
|
+
keeps it up to date). Run by hand, it just waits for an assistant: Ctrl+C closes it.
|
|
45
44
|
|
|
46
45
|
## Connect your assistant
|
|
47
46
|
|
|
@@ -119,6 +118,8 @@ conversation. Lyrics are copyrighted: the server tells the assistant not to repr
|
|
|
119
118
|
|
|
120
119
|
## Development
|
|
121
120
|
|
|
121
|
+
Only to change the server itself; to use it, [Install](#install) is all you need.
|
|
122
|
+
|
|
122
123
|
```sh
|
|
123
124
|
git clone https://github.com/julianoAffonso/stagebook.git
|
|
124
125
|
cd stagebook/mcp
|
package/README.pt-BR.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) · **Português (Brasil)**
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/stagebook-mcp)
|
|
6
|
+
|
|
5
7
|
Deixa assistentes de IA lerem e editarem as músicas e os setlists do seu tablet com o Stagebook: "monta um setlist de
|
|
6
8
|
15 músicas para sábado sem repetir artista", "passa todas as do Skank meio tom abaixo", "confere os acordes de Hazard",
|
|
7
9
|
"importa esta página". É um servidor [Model Context Protocol](https://modelcontextprotocol.io) que roda no seu computador
|
|
@@ -19,7 +21,7 @@ Copilot, Windsurf, Gemini CLI, OpenAI Codex CLI…).
|
|
|
19
21
|
| Músicas | `list_songs` (filtros: texto, tag, tom), `get_song`, `create_song`, `update_song`, `delete_song`, `transpose_song`, `set_capo` |
|
|
20
22
|
| Importar | `import_song` (letra e cifra coladas em qualquer formato comum, ou o endereço de uma página) |
|
|
21
23
|
| Backing tracks | `set_backing_track` (OGG, MP3 ou WAV do computador), `remove_backing_track` |
|
|
22
|
-
| Setlists | `list_setlists
|
|
24
|
+
| Setlists | `list_setlists` (filtro: nome), `setlist_order` (recentes ou A a Z, o mesmo da aba do app), `get_setlist`, `create_setlist`, `update_setlist`, `delete_setlist` |
|
|
23
25
|
| Receber | `receive_by_code` (as 3 palavras), `receive_create`, `band_inbox`, `band_sync`, `open_band_item` |
|
|
24
26
|
| Backup | `restore_backup` (ver o que um arquivo `.stagebook` tem, juntar o que falta ou substituir a biblioteca) |
|
|
25
27
|
|
|
@@ -36,14 +38,11 @@ param também.
|
|
|
36
38
|
|
|
37
39
|
## Instalar
|
|
38
40
|
|
|
39
|
-
Precisa do [Node.js](https://nodejs.org) 20 ou mais novo.
|
|
41
|
+
Precisa do [Node.js](https://nodejs.org) 20 ou mais novo. O servidor está no npm como
|
|
42
|
+
[`stagebook-mcp`](https://www.npmjs.com/package/stagebook-mcp): nada para baixar do GitHub.
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Esse é o servidor: o assistente abre ele sozinho com os ajustes abaixo (o `npx` baixa da primeira vez e mantém
|
|
46
|
-
atualizado), então não precisa rodar nada à mão.
|
|
44
|
+
Não precisa rodar à mão: o assistente abre ele sozinho com os ajustes abaixo (o `npx` baixa da primeira vez e mantém
|
|
45
|
+
atualizado). Rodado à mão, ele só fica esperando um assistente: Ctrl+C fecha.
|
|
47
46
|
|
|
48
47
|
## Ligar no seu assistente
|
|
49
48
|
|
|
@@ -86,7 +85,7 @@ O app do ChatGPT só se conecta a servidores remotos (pela internet), então nã
|
|
|
86
85
|
2. Peça ao assistente para conectar no Stagebook. Ele procura na rede (ou você passa o endereço) e o tablet mostra um
|
|
87
86
|
pedido com um código. Se mais de um tablet com o Stagebook responder (uma banda no mesmo Wi-Fi), ele pergunta qual
|
|
88
87
|
endereço é o seu; se o endereço do seu tablet mudou, ele procura de novo.
|
|
89
|
-
3. Se o código bater, toque em **
|
|
88
|
+
3. Se o código bater, toque em **Autorizar** no tablet. A chave fica guardada neste computador
|
|
90
89
|
(`~/.config/stagebook-mcp/config.json`, que só você lê); da próxima vez ele conecta sem perguntar.
|
|
91
90
|
|
|
92
91
|
O editor desliga sozinho no tablet quando fica sem uso: ligue de novo quando quiser usar o assistente. A chave dura 90
|
|
@@ -109,7 +108,7 @@ dias sem uso; **Ajustes → Editar no computador → Computadores autorizados**
|
|
|
109
108
|
Abra **Ajustes do Sistema → Privacidade e Segurança → Rede Local** e ligue o app que roda o assistente (Claude,
|
|
110
109
|
Terminal, iTerm, Cursor, VS Code…). Depois reabra esse app.
|
|
111
110
|
- **"No longer accepts this computer's key"**: a chave foi removida no tablet ou passou 90 dias sem uso. Conecte de novo.
|
|
112
|
-
- **"Already showing a request, or one was just denied"**: responda o pedido no tablet; depois de um
|
|
111
|
+
- **"Already showing a request, or one was just denied"**: responda o pedido no tablet; depois de um Recusar, ele espera
|
|
113
112
|
5 minutos para aceitar outro.
|
|
114
113
|
- **"Not found on the tablet, or that part is turned off"**: receber por código precisa da internet ligada, e as
|
|
115
114
|
ferramentas de banda precisam da banda ligada, nos Ajustes do tablet.
|
|
@@ -122,6 +121,8 @@ têm direito autoral: o servidor orienta o assistente a não reproduzi-las intei
|
|
|
122
121
|
|
|
123
122
|
## Para quem programa
|
|
124
123
|
|
|
124
|
+
Só para mudar o próprio servidor; para usar, basta o [Instalar](#instalar).
|
|
125
|
+
|
|
125
126
|
```sh
|
|
126
127
|
git clone https://github.com/julianoAffonso/stagebook.git
|
|
127
128
|
cd stagebook/mcp
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
5
5
|
import { StagebookClient } from "./client.js";
|
|
6
6
|
import { buildServer } from "./server.js";
|
|
7
|
+
// Run by hand in a terminal it just waits for an assistant, which looks frozen: say so (stderr, never the protocol)
|
|
8
|
+
if (process.stdin.isTTY) {
|
|
9
|
+
process.stderr.write("Stagebook MCP server: running and waiting for an AI assistant. Nothing to do here: your assistant starts it by\n" +
|
|
10
|
+
"itself (setup: https://github.com/julianoAffonso/stagebook/tree/main/mcp). Press Ctrl+C to close.\n");
|
|
11
|
+
}
|
|
7
12
|
const client = await StagebookClient.fromEnv();
|
|
8
13
|
const server = buildServer(client);
|
|
9
14
|
await server.connect(new StdioServerTransport());
|
package/dist/server.js
CHANGED
|
@@ -250,10 +250,21 @@ export function buildServer(client) {
|
|
|
250
250
|
// ---------- setlists ----------
|
|
251
251
|
server.registerTool("list_setlists", {
|
|
252
252
|
title: "List setlists",
|
|
253
|
-
description: "The setlists (id, name, number of songs).",
|
|
254
|
-
inputSchema: {},
|
|
253
|
+
description: "The setlists (id, name, number of songs), in the order the app's Setlists tab shows them. Optional filter.",
|
|
254
|
+
inputSchema: { query: z.string().optional().describe("Part of the name (accents and case ignored).") },
|
|
255
255
|
annotations: { readOnlyHint: true },
|
|
256
|
-
}, safe(async () =>
|
|
256
|
+
}, safe(async ({ query }) => {
|
|
257
|
+
const sets = (await client.get("/api/sets"));
|
|
258
|
+
return text(query ? sets.filter((s) => norm(s.name).includes(norm(query))) : sets);
|
|
259
|
+
}));
|
|
260
|
+
server.registerTool("setlist_order", {
|
|
261
|
+
title: "Setlists order",
|
|
262
|
+
description: "Reads the order of the app's Setlists tab or, with order, changes it there: newest first or A to Z.",
|
|
263
|
+
inputSchema: { order: z.enum(["newest", "abc"]).optional().describe("Leave it out to only read the current order.") },
|
|
264
|
+
}, safe(async ({ order }) => {
|
|
265
|
+
const now = order ? await client.send("PUT", "/api/sets-order", { abc: order === "abc" }) : await client.get("/api/sets-order");
|
|
266
|
+
return text({ order: now.abc ? "abc" : "newest" });
|
|
267
|
+
}));
|
|
257
268
|
server.registerTool("get_setlist", {
|
|
258
269
|
title: "Get a setlist",
|
|
259
270
|
description: "A setlist with its songs in order (a song deleted from the library shows with an empty title).",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stagebook-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "MCP server for Stagebook: lets AI assistants (Claude Code, Claude Desktop, Cursor, VS Code, Gemini CLI, Codex…) read and edit the songs and setlists on your Stagebook tablet over the local network.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Juliano Affonso",
|