@counterpoint-studio/audio-file-mcp-app 1.0.0 → 1.1.0
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 +179 -5
- package/dist/mcp-app.html +10 -9
- package/dist/server/app.js +20 -2
- package/dist/server/app.js.map +1 -1
- package/dist/server/resolve-annotations.js +33 -0
- package/dist/server/resolve-annotations.js.map +1 -0
- package/dist/shared/annotation-data.js +23 -0
- package/dist/shared/annotation-data.js.map +1 -0
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -1,17 +1,191 @@
|
|
|
1
1
|
# Audio File MCP App
|
|
2
2
|
|
|
3
|
-
An MCP
|
|
3
|
+
An [MCP App](https://blog.modelcontextprotocol.io/posts/2026-01-26-mcp-apps/)
|
|
4
|
+
for playing and inspecting local audio files in an MCP host.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
Renders an in-conversation UI with playback, metadata, loudness, a
|
|
9
|
+
spectrogram, and an optional annotation-lane timeline.
|
|
10
|
+
|
|
11
|
+
File metadata, loudness statistics, the current playhead position, any
|
|
12
|
+
selected region, and the annotation lanes active at the playhead are also
|
|
13
|
+
exposed back to the model, so follow-up tasks can refer to what the user is
|
|
14
|
+
actually hearing and looking at.
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- **Global loudness metrics** computed to EBU R128: Integrated Loudness
|
|
19
|
+
(LUFS), Loudness Range (LRA), True Peak (dBTP), Sample Peak, and RMS.
|
|
20
|
+
- **Instantaneous loudness metrics** while playing or hovering: Momentary
|
|
21
|
+
(400 ms) and Short-Term (3 s) LUFS, plus sample-peak and RMS at the
|
|
22
|
+
cursor position.
|
|
23
|
+
- **Waveform colouring** by spectral centroid — each waveform slice is
|
|
24
|
+
shaded along a tonal ramp using a low/mid/high band-energy ratio, so
|
|
25
|
+
bright/dark regions read at a glance as bright/dark sound.
|
|
26
|
+
- **Reassigned spectrogram** with log-frequency bins (20 Hz floor) and an
|
|
27
|
+
Inferno colour scale; time-frequency reassignment sharpens transients
|
|
28
|
+
and tonal partials beyond what a plain STFT shows.
|
|
29
|
+
- **Looping region selection.** Drag on the timeline to mark a region;
|
|
30
|
+
playback loops over it, and the region's start/end are passed back to
|
|
31
|
+
the model alongside the file's loudness and playhead state.
|
|
32
|
+
- **Annotation-lane timeline.** Supply timeline annotations and the widget
|
|
33
|
+
draws a stack of thin labelled lanes between the waveform and spectrogram,
|
|
34
|
+
aligned to the audio's own timeline. Each lane carries time spans, an
|
|
35
|
+
optional colour, and an optional envelope that fades span opacity along the
|
|
36
|
+
lane. Hovering a span reveals its label, and the lanes active at the
|
|
37
|
+
playhead — plus those starting, ending, or active within a selected region
|
|
38
|
+
— are reported back to the model.
|
|
39
|
+
|
|
40
|
+
## Install
|
|
41
|
+
|
|
42
|
+
The server runs locally over stdio. Every install path below configures the
|
|
43
|
+
same command: `npx -y @counterpoint-studio/audio-file-mcp-app`.
|
|
44
|
+
|
|
45
|
+
### Claude Desktop
|
|
46
|
+
|
|
47
|
+
Easiest: grab the latest `.mcpb` from the
|
|
48
|
+
[Releases page](https://github.com/counterpoint-studio/audio-file-mcp-app/releases/latest)
|
|
49
|
+
and double-click it. Claude Desktop has Node bundled, so no extra runtime
|
|
50
|
+
is needed.
|
|
51
|
+
|
|
52
|
+
Or add the server by hand to `claude_desktop_config.json`:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"mcpServers": {
|
|
57
|
+
"audio-file": {
|
|
58
|
+
"command": "npx",
|
|
59
|
+
"args": ["-y", "@counterpoint-studio/audio-file-mcp-app"]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Codex Desktop
|
|
66
|
+
|
|
67
|
+
1. Go to Settings -> MCP Servers
|
|
68
|
+
2. Add Server
|
|
69
|
+
3. Name: `audiofile-mcp-app`
|
|
70
|
+
4. Command to launch: `npx`
|
|
71
|
+
5. Arguments `-y` and `@counterpoint-studio/audio-file-mcp-app`
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### VS Code (Copilot, Agent mode)
|
|
75
|
+
|
|
76
|
+
[](https://insiders.vscode.dev/redirect/mcp/install?name=audio-file&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40counterpoint-studio%2Faudio-file-mcp-app%22%5D%7D)
|
|
77
|
+
|
|
78
|
+
Or add to `.vscode/mcp.json` (workspace) or your user `mcp.json`:
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"servers": {
|
|
83
|
+
"audio-file": {
|
|
84
|
+
"type": "stdio",
|
|
85
|
+
"command": "npx",
|
|
86
|
+
"args": ["-y", "@counterpoint-studio/audio-file-mcp-app"]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Goose
|
|
93
|
+
|
|
94
|
+
Paste this deep link into your browser (Goose Desktop must be installed; the
|
|
95
|
+
custom URI scheme can't be a real link in a GitHub README):
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
goose://extension?id=audio-file&name=Audio%20File%20MCP%20App&cmd=npx&arg=-y&arg=%40counterpoint-studio%2Faudio-file-mcp-app
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Or run `goose configure` → **Add Extension** → **Command-line Extension** and
|
|
102
|
+
enter `npx -y @counterpoint-studio/audio-file-mcp-app`.
|
|
103
|
+
|
|
104
|
+
### MCP Inspector
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npx @modelcontextprotocol/inspector npx -y @counterpoint-studio/audio-file-mcp-app
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Usage
|
|
111
|
+
|
|
112
|
+
Ask the host to show you a local audio file by its absolute path. For
|
|
113
|
+
example:
|
|
114
|
+
|
|
115
|
+
> "Show me `/Users/me/Music/track.wav`"
|
|
116
|
+
|
|
117
|
+
The host calls the `display_audio_file` tool, which renders the in-app UI
|
|
118
|
+
with waveform, spectrogram, loudness metrics, and playback transport.
|
|
119
|
+
|
|
120
|
+
### Annotation lanes
|
|
121
|
+
|
|
122
|
+
`display_audio_file` accepts an optional `annotations` object describing lanes
|
|
123
|
+
to draw on the timeline (or an `annotationsPath` pointing at a JSON file with
|
|
124
|
+
the same `{ "lanes": [...] }` shape — handy for large payloads):
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"annotations": {
|
|
129
|
+
"lanes": [
|
|
130
|
+
{
|
|
131
|
+
"label": "Delay tails",
|
|
132
|
+
"color": "#e6007e",
|
|
133
|
+
"spans": [{ "start": 8, "end": 24 }],
|
|
134
|
+
"envelope": [
|
|
135
|
+
{ "time": 8, "value": 0 },
|
|
136
|
+
{ "time": 24, "value": 1 }
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Times are in seconds on the audio's own timeline. `label`, `color`, and
|
|
145
|
+
`envelope` are optional; a lane with an envelope fades its span opacity along
|
|
146
|
+
the envelope curve, and uncoloured lanes use a light-accent fill. Overlapping
|
|
147
|
+
spans in a lane are truncated at the next span's start so rows never overlap.
|
|
148
|
+
The model can author annotations to point out sections, mark events, or
|
|
149
|
+
visualise an analysis it just ran.
|
|
6
150
|
|
|
7
151
|
## Client compatibility
|
|
8
152
|
|
|
9
|
-
|
|
153
|
+
Tested and known to work in:
|
|
10
154
|
|
|
11
|
-
- **Claude Desktop**
|
|
155
|
+
- **Claude Desktop** — Chat, Cowork, and Code
|
|
156
|
+
- **Codex Desktop**
|
|
12
157
|
- **Visual Studio Code**
|
|
13
158
|
- **Goose**
|
|
14
159
|
- **MCP Inspector**
|
|
15
160
|
|
|
16
|
-
|
|
161
|
+
## Development
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
pnpm install
|
|
165
|
+
pnpm run build:dsp # emsdk required; see WASM-BUILD.md
|
|
166
|
+
pnpm run serve # runs the server with tsx, no compile step
|
|
167
|
+
pnpm test
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
`pnpm run build:dist` produces the publishable layout under `dist/`
|
|
171
|
+
(`dist/mcp-app.html` + `dist/server/`).
|
|
172
|
+
|
|
173
|
+
## Releasing
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
pnpm version <bump> # bumps package.json + tags
|
|
177
|
+
pnpm publish --access public # publishes to npm
|
|
178
|
+
pnpm run build:mcpb # produces dist/audio-file-mcp-app-<version>.mcpb
|
|
179
|
+
gh release create v<version> dist/*.mcpb # attaches the bundle to a GitHub release
|
|
180
|
+
mcp-publisher login github && mcp-publisher publish # updates the MCP Registry listing
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
`mcp-publisher` is a Go binary; install it via
|
|
184
|
+
`brew install mcp-publisher` or per the
|
|
185
|
+
[registry quickstart](https://modelcontextprotocol.io/registry/quickstart).
|
|
186
|
+
It reads `server.json` from the repo root — keep its `version` in sync with
|
|
187
|
+
`package.json` before publishing.
|
|
188
|
+
|
|
189
|
+
## License
|
|
17
190
|
|
|
191
|
+
ISC © Counterpoint Studio OÜ
|