mcp-music-studio 0.1.2 → 0.2.1

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 CHANGED
@@ -1,27 +1,59 @@
1
1
  # MCP Music Studio
2
2
 
3
- A creative music tool for AI systems — compose, arrange, and play music with multi-instrument audio, style presets, and visual sheet music.
3
+ [![smithery badge](https://smithery.ai/badge/linxule/mcp-music-studio)](https://smithery.ai/server/linxule/mcp-music-studio)
4
4
 
5
- Forked from [`@modelcontextprotocol/server-sheet-music`](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/sheet-music-server) and substantially extended.
5
+ Two-mode creative music studio for AI: **scored composition** (ABC notation with sheet music) and **live performance** (Strudel live coding with TidalCycles). Interactive UI renders inline in Claude Desktop, claude.ai, and other MCP clients.
6
6
 
7
- ## Features
7
+ ## Quick Start — No Install Required
8
8
 
9
- - **8 style presets** rock, jazz, bossa, waltz, march, reggae, folk, classical. One parameter adds drums + bass + chord accompaniment.
10
- - **30 instruments** — selectable from UI or via tool parameter, with fuzzy matching
11
- - **Three rendering modes** — ext-apps inline UI for Claude Desktop/VS Code, browser fallback for CLI environments, configurable via `--render-mode`
12
- - **`get-music-guide` tool** — on-demand reference for AI systems (instruments, drums, ABC syntax, arrangements, genre templates, MIDI directives)
13
- - **7 `music://guide/*` resources** — same content for resource-capable clients
14
- - **Note highlighting** — currently playing notes light up during playback
15
- - **Forgiving parser** — warnings don't block playback, only fatal errors do
16
- - **Streaming render** — sheet music appears as the AI types (`ontoolinputpartial`)
17
- - **Tempo slider** — warp control in the UI
18
- - **Fullscreen mode** — via ext-apps `requestDisplayMode`
9
+ Paste this URL into any MCP client that supports remote servers:
19
10
 
20
- ## Install
11
+ ```
12
+ https://mcp-music-studio.linxule.workers.dev/mcp
13
+ ```
14
+
15
+ **Claude Desktop / claude.ai:**
16
+ Settings → Connectors → Add Connector → paste the URL above → done.
17
+
18
+ **Claude Code:**
19
+ ```bash
20
+ claude mcp add --transport http music-studio https://mcp-music-studio.linxule.workers.dev/mcp
21
+ ```
22
+
23
+ That's it — ask Claude to play a song or create a beat.
24
+
25
+ ---
26
+
27
+ ## What You Get
28
+
29
+ ### Scored Composition (ABC Notation)
30
+ Write sheet music → see it rendered → hear it played with multi-instrument audio.
31
+
32
+ - **8 style presets** — rock, jazz, bossa, waltz, march, reggae, folk, classical — one parameter adds drums + bass + chord accompaniment
33
+ - **30 instruments** — piano, strings, brass, woodwinds, synths — selectable by name
34
+ - **Visual sheet music** — notes highlight as they play
35
+ - **Streaming render** — sheet music appears as the AI types
36
+ - **`get-music-guide`** — 7 reference topics (instruments, drums, ABC syntax, arrangements, genres, styles, MIDI directives)
37
+
38
+ ### Live Performance (Strudel)
39
+ Write code → hear it play → edit in a live REPL.
40
+
41
+ - **TidalCycles mini-notation** in JavaScript
42
+ - **72 drum machine banks** + **128 GM instruments** + built-in synths
43
+ - **Full effects chain** — filters, reverb, delay, FM synthesis
44
+ - **Editable REPL** — users can tweak the code and hear changes instantly
45
+ - **`get-strudel-guide`** — 7 reference topics (mini-notation, sounds, effects, patterns, genres, tips, advanced)
21
46
 
22
- Requires Node.js 18+. Supports stdio and HTTP transports.
47
+ ### Shared
48
+ - **`search-music-docs`** — semantic search over strudel.cc and ABCJS documentation
23
49
 
24
- ### CLI Install (one-liner)
50
+ ---
51
+
52
+ ## Local Install (Optional)
53
+
54
+ The remote URL above works without any local setup. If you prefer running locally (offline use, lower latency), install via npm:
55
+
56
+ ### CLI One-Liners
25
57
 
26
58
  ```bash
27
59
  # Claude Code
@@ -32,11 +64,15 @@ codex mcp add -- npx -y mcp-music-studio --stdio
32
64
 
33
65
  # Gemini CLI
34
66
  gemini mcp add -- npx -y mcp-music-studio --stdio
67
+
68
+ # OpenCode
69
+ opencode mcp add music-studio -- npx -y mcp-music-studio --stdio
35
70
  ```
36
71
 
37
- ### Claude Desktop
72
+ ### JSON Config (Claude Desktop, Cursor, Windsurf, etc.)
38
73
 
39
- Config file location:
74
+ <details>
75
+ <summary>Claude Desktop — edit config file</summary>
40
76
 
41
77
  | OS | Path |
42
78
  |----|------|
@@ -54,12 +90,12 @@ Config file location:
54
90
  }
55
91
  }
56
92
  ```
93
+ </details>
57
94
 
58
- ### VS Code
59
-
60
- Add to `.vscode/mcp.json` (project) or user settings:
95
+ <details>
96
+ <summary>VS Code / Trae / PearAI</summary>
61
97
 
62
- > **Note**: VS Code uses `"servers"` not `"mcpServers"`. Also works in Trae, Void, and PearAI.
98
+ Add to `.vscode/mcp.json` note: uses `"servers"` not `"mcpServers"`:
63
99
 
64
100
  ```json
65
101
  {
@@ -71,10 +107,12 @@ Add to `.vscode/mcp.json` (project) or user settings:
71
107
  }
72
108
  }
73
109
  ```
110
+ </details>
74
111
 
75
- ### Cursor
112
+ <details>
113
+ <summary>Cursor</summary>
76
114
 
77
- Add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project):
115
+ Add to `~/.cursor/mcp.json`:
78
116
 
79
117
  ```json
80
118
  {
@@ -86,8 +124,10 @@ Add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project):
86
124
  }
87
125
  }
88
126
  ```
127
+ </details>
89
128
 
90
- ### Windsurf
129
+ <details>
130
+ <summary>Windsurf</summary>
91
131
 
92
132
  Add to `~/.codeium/windsurf/mcp_config.json`:
93
133
 
@@ -101,8 +141,10 @@ Add to `~/.codeium/windsurf/mcp_config.json`:
101
141
  }
102
142
  }
103
143
  ```
144
+ </details>
104
145
 
105
- ### Windows
146
+ <details>
147
+ <summary>Windows</summary>
106
148
 
107
149
  On Windows, `npx` is a `.cmd` file and requires a shell wrapper:
108
150
 
@@ -116,87 +158,42 @@ On Windows, `npx` is a `.cmd` file and requires a shell wrapper:
116
158
  }
117
159
  }
118
160
  ```
161
+ </details>
119
162
 
120
- ### ChatGPT
121
-
122
- ChatGPT only supports remote HTTPS MCP servers. Run the HTTP transport and expose via tunnel:
123
-
124
- ```bash
125
- npx mcp-music-studio
126
- # Server starts on http://localhost:3001/mcp
127
- # Use ngrok, Cloudflare Tunnel, etc. to expose publicly
128
- ```
129
-
130
- ### HTTP Transport
131
-
132
- ```bash
133
- npx mcp-music-studio
134
- # Server starts on http://localhost:3001/mcp
135
- ```
136
-
137
- ## Tools
138
-
139
- ### `play-sheet-music`
140
-
141
- Creates and plays music with visual sheet music and multi-instrument audio.
142
-
143
- | Parameter | Type | Description |
144
- |-----------|------|-------------|
145
- | `abcNotation` | string | ABC notation with optional chord symbols |
146
- | `instrument` | string? | Default instrument (e.g., "Violin", "Flute") |
147
- | `style` | enum? | Accompaniment style: rock, jazz, bossa, waltz, march, reggae, folk, classical |
148
- | `tempo` | number? | BPM (40-240) |
149
- | `swing` | number? | Swing feel (0-100) |
150
- | `transpose` | number? | Semitones (-12 to 12) |
151
-
152
- **Example — jazz arrangement:**
153
- ```json
154
- {
155
- "abcNotation": "X:1\nT:Blue Note\nM:4/4\nL:1/8\nK:Bb\n\"Bbmaj7\"d2 f2 d2 Bc | \"Eb7\"_e2 g2 e2 cB | \"Dm7\"d2 f2 a2 fd | \"G7\"g2 f2 e2 dc |",
156
- "style": "jazz",
157
- "instrument": "Alto Sax",
158
- "tempo": 140
159
- }
160
- ```
161
-
162
- ### `get-music-guide`
163
-
164
- Returns reference material for composition. Topics:
163
+ <details>
164
+ <summary>Render modes (for non-ext-apps clients)</summary>
165
165
 
166
- | Topic | Contents |
167
- |-------|----------|
168
- | `instruments` | All 128 GM instruments by family, program numbers, combo suggestions |
169
- | `drums` | Percussion notes, pattern syntax, 8 ready-to-use patterns |
170
- | `abc-syntax` | Notes, rests, chords, repeats, dynamics, multi-voice, lyrics |
171
- | `arrangements` | Multi-voice patterns, volume balancing, accompaniment setup |
172
- | `genres` | Complete ABC examples: jazz, blues, folk, minuet, rock, bossa, lullaby |
173
- | `styles` | What each style preset does and when to use it |
174
- | `midi-directives` | Full `%%MIDI` reference for ABCJS |
166
+ The server auto-detects ext-apps support. For clients that don't support it (Cherry Studio, CLI environments), use `--render-mode`:
175
167
 
176
- ## Render Modes
177
-
178
- The server auto-detects whether the client supports ext-apps UI. For clients that don't, use `--render-mode` to control how music is delivered:
179
-
180
- | Mode | Flag | Behavior |
181
- |------|------|----------|
182
- | `auto` | (default) | Inline ext-apps UI for Claude Desktop, VS Code |
183
- | `browser` | `--render-mode browser` | Saves HTML player and opens in system browser |
184
- | `html` | `--render-mode html` | Returns HTML as embedded resource in response |
185
-
186
- Use `--output-dir` to control where HTML player files are saved (default: `~/Desktop/mcp-music-studio`).
187
-
188
- **Example — Cherry Studio, CLI environments, or other non-ext-apps clients:**
168
+ | Mode | Behavior |
169
+ |------|----------|
170
+ | `auto` (default) | Inline UI for Claude Desktop, VS Code |
171
+ | `browser` | Saves HTML and opens in system browser |
172
+ | `html` | Returns HTML as embedded resource |
189
173
 
190
174
  ```json
191
175
  {
192
176
  "mcpServers": {
193
177
  "music-studio": {
194
178
  "command": "npx",
195
- "args": ["-y", "mcp-music-studio", "--stdio", "--render-mode", "browser", "--output-dir", "/path/to/output"]
179
+ "args": ["-y", "mcp-music-studio", "--stdio", "--render-mode", "browser"]
196
180
  }
197
181
  }
198
182
  }
199
183
  ```
184
+ </details>
185
+
186
+ ---
187
+
188
+ ## Tools
189
+
190
+ | Tool | Description |
191
+ |------|-------------|
192
+ | `play-sheet-music` | ABC notation → visual sheet music + multi-instrument audio |
193
+ | `play-live-pattern` | Strudel code → live-coded patterns with synthesis + effects |
194
+ | `get-music-guide` | ABC reference (7 topics: instruments, drums, syntax, genres...) |
195
+ | `get-strudel-guide` | Strudel reference (7 topics: sounds, effects, patterns, genres...) |
196
+ | `search-music-docs` | Semantic search over strudel.cc and ABCJS docs |
200
197
 
201
198
  ## Development
202
199
 
@@ -204,32 +201,12 @@ Use `--output-dir` to control where HTML player files are saved (default: `~/Des
204
201
  bun install
205
202
  bun run dev # watch + serve (hot reload)
206
203
  bun run build # production build
207
- bun run serve # HTTP server on port 3001
208
- ```
209
-
210
- ## Architecture
211
-
212
- ```
213
- mcp-music-studio/
214
- ├── server.ts # MCP server: tools, resources, guides, forgiving parser
215
- ├── main.ts # Entry point: HTTP + stdio transports
216
- ├── mcp-app.html # HTML shell (Vite inlines everything for ext-apps UI)
217
- ├── src/
218
- │ ├── mcp-app.ts # Ext-apps client: rendering, audio, streaming
219
- │ ├── mcp-app.css # Styles: dark mode, note highlighting, toolbar
220
- │ ├── music-logic.ts # Shared: instruments, presets, ABC processing
221
- │ ├── server-logic.ts # Server: parse validation, result construction
222
- │ ├── browser-fallback.ts # Browser player: HTML generation, auto-open
223
- │ └── global.css # Base reset
224
- ├── tests/ # Vitest tests
225
- ├── vite.config.ts # Single-file HTML bundling
226
- ├── tsconfig.json # Client TypeScript config
227
- └── tsconfig.server.json # Server TypeScript config
204
+ bun run test # run tests
228
205
  ```
229
206
 
230
207
  ## Attribution
231
208
 
232
- This project is a fork of the [Sheet Music Server](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/sheet-music-server) example from the [MCP ext-apps](https://github.com/modelcontextprotocol/ext-apps) repository by Anthropic, licensed under MIT.
209
+ Forked from the [Sheet Music Server](https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/sheet-music-server) example from [MCP ext-apps](https://github.com/modelcontextprotocol/ext-apps) by Anthropic, licensed under MIT.
233
210
 
234
211
  ## License
235
212
 
@@ -0,0 +1,2 @@
1
+ wrangler.json
2
+ .dev.vars
package/dist/index.js CHANGED
@@ -19630,7 +19630,7 @@ var require_is_promise = __commonJS((exports, module) => {
19630
19630
  }
19631
19631
  });
19632
19632
 
19633
- // node_modules/path-to-regexp/dist/index.js
19633
+ // node_modules/router/node_modules/path-to-regexp/dist/index.js
19634
19634
  var require_dist = __commonJS((exports) => {
19635
19635
  Object.defineProperty(exports, "__esModule", { value: true });
19636
19636
  exports.PathError = exports.TokenData = undefined;