capture_audioLABSCO SUMMARY
It taps the audio graph, not a microphone.
The capture comes off the AudioContext output node, so there is no room, no mic and no export step between what the app produced and what gets measured. The cost of that is setup: it only works on an app you are running, with the middleware mounted and one line added to the page.
What it is
An MCP server plus a browser SDK that taps the Web Audio graph of a running web app. Your dev server mounts an Express middleware, the page calls WebEar.init(), and the agent can record a short clip and measure its loudness, tone, band balance and timing.
What you get
- capture_audio — record 500ms to 30s of what the app is putting out right now
- analyze_audio — RMS, peak dB, clipping, spectral centroid, frequency bands, BPM and timing jitter
- describe_audio — a plain-English read of the same clip
- diff_audio — compare two captures and flag what changed in loudness, tone, timing and clipping
- mix_coach — the measured report and the heard description together
- Client init covers raw Web Audio, Tone.js, a Three.js AudioListener, an explicit AudioContext, or a plain script tag
Requirements
The npm package webear over stdio, plus the Express middleware mounted in your dev server and one init call in the page. CODEDSWITCH_API_KEY is optional to start, and so is WEBEAR_BASE_URL, the address of that dev server. Without a key, analyze_audio still returns duration, loudness, peak level and clipping locally when ffmpeg is on your PATH; the spectral, band, BPM and jitter figures, describe_audio, diff_audio and mix_coach need one. Keys come from a free codedswitch.com account, whose free tier is 50 analyses a day.
Setup effort
One command — npm install webear
USE CASES
Explaining why a mix sounds muddy
Record what is playing and get the spectral centroid and band split behind the impression.
Checking a change did not introduce clipping
Compare the capture before and after against each other rather than by ear.
Getting a description instead of a table of numbers
A plain-English read of the clip, with the measured report alongside it.
Measuring scheduler drift in a web audio app
Timing jitter and onset counts from a real capture, not from reading the code.
18 tools
Listed in project docs. Your client may show a different list.
analyze_audiodescribe_audiodiff_audiogroove_scorecapture_and_analyzemix_coachcapture_videodescribe_videodiff_visualscapture_telemetryanalyze_telemetrycapture_nerveanalyze_nervecapture_shieldanalyze_shieldcapture_logsanalyze_logsBEFORE YOU INSTALL
What to know first
Tools you get
18 tools named in the project's documentation.
Requires
- npx on PATH
- Node.js >= 18
Optional
CODEDSWITCH_API_KEY in your environment
Where it runs
Of the 4 documented clients, 3 run the server on your machine and 1 connects to a hosted endpoint.
INSTALLATION
Connect your client
Server setup
npm install webearMCP Clients
Claude Code, Cursor
{
"mcpServers": {
"webear": {
"command": "npx",
"args": [
"webear"
],
"env": {
"WEBEAR_BASE_URL": "http://localhost:5000",
"CODEDSWITCH_API_KEY": "<YOUR_CODEDSWITCH_API_KEY>"
}
}
}
}Windsurf
{
"mcpServers": {
"webear": {
"command": "npx",
"args": [
"webear"
],
"disabled": false,
"env": {
"WEBEAR_BASE_URL": "http://localhost:5000",
"CODEDSWITCH_API_KEY": "<YOUR_CODEDSWITCH_API_KEY>"
}
}
}
}Any MCP client — remote
{
"mcpServers": {
"webear": {
"url": "https://www.codedswitch.com/api/webear/mcp/sse",
"headers": {
"Authorization": "Bearer <YOUR_API_KEY>"
}
}
}
}