
Webear
io.github.asume21由 GitHub 帳號 asume21 發布v1.2.4更新於 Oct 24, 2026
Give your AI coding assistant ears — capture, analyze, and describe live audio.
概覽
WebEar 讓 AI 程式助理擷取並分析網頁應用程式 Web Audio 圖輸出的即時音訊,還可選配視覺、效能、網路、安全與日誌感知。
- 可以做什麼
- 從執行中的網頁應用程式 Web Audio 輸出擷取短音訊片段,並分析響度、峰值、削波、頻譜質心、頻段能量、BPM 與時間抖動,或產生對聲音的白話描述。比對兩次擷取,標出響度、音色、時序與削波的變化,並給出結構化混音建議或律動評分。透過更完整的 Web Perception 感測器套件,擷取並分析畫布/影片畫面、效能遙測、網路耗時、安全暴露面與主控台日誌。
- 適用情境
- 適合 Web Audio、Tone.js、遊戲音訊與音樂應用程式開發者,在除錯混音、效果或提交間回歸時讓助理聽到並量測應用程式的實際輸出。也適合在 IDE 內檢查本機網頁應用程式的視覺、效能、網路與主控台表現。
- 執行需求
- 透過 npx 以 stdio 在本機執行,需要 Node.js 18 或更新版本,以及支援 MediaRecorder 的瀏覽器。需在開發伺服器與網頁應用程式中分別加入 Express 中介軟體與用戶端片段,並用 WEBEAR_BASE_URL 指向該伺服器。CODEDSWITCH_API_KEY 為選用:沒有它時本機分析需要 PATH 中有 ffmpeg;有它才解鎖完整分析、描述與比對。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Webear,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
webear
[npm version] [npm downloads] [License: MIT] [MCP Compatible]
Give your AI real senses — hear, see, and feel any web app.
An MCP server + browser SDK that gives AI coding assistants direct sensory access to a live web application. Audio, visuals, performance, network, security, and console — captured from the browser, analyzed in real time, delivered via MCP.
"The beat sounds muddy" → your AI captures 3 seconds, measures the spectral centroid at 580 Hz with 45% energy below 250 Hz, and tells you exactly why.
What It Does
How It Works
The key difference from every other audio MCP: this taps the Web Audio graph directly, bypassing room acoustics, microphone hardware, and the need to export files.
Quick Start
1. Install
2. Add the Express middleware to your dev server
3. Add the client snippet to your web app
Option A — auto-detect everything (Tone.js or raw Web Audio)
Option B — explicit AudioContext
Option C — Tone.js project
Option D — Three.js WebGL Game
Option E — plain script tag
4. Configure your IDE
Claude Code (.mcp.json in project root):
Cursor (.cursor/mcp.json):
Windsurf (mcp_config.json):
5. Get an API key — optional, and not to start
analyze_audio works with no key and no account. If ffmpeg is on your PATH,
it decodes and analyzes the capture on your machine and returns a basic report:
duration, loudness, peak level and whether the audio is clipping. Nothing is
uploaded. Try the tool before you sign up for anything.
A key unlocks the parts that need more than arithmetic:
To get one:
- Create a free account at codedswitch.com.
- Go to codedswitch.com/developer (also in the account menu as Developer API).
- Click Generate API Key — that value is your
CODEDSWITCH_API_KEY. Keys start withwbr_.
Free tier: 50 analyses/day. No credit card required.
6. Start your dev server, open your app, play audio, then ask your AI:
"Capture 3 seconds and tell me why the bass sounds muddy."
"Compare the audio before and after my last commit."
"Is there any clipping in the high-frequency range?"
Example Output
analyze_audio
diff_audio
Configuration
Environment Variables
Middleware Options
Client Options
Requirements
- Node.js >= 18
- A browser that supports
MediaRecorder(Chrome, Firefox, Edge, Safari 14+) - A
CODEDSWITCH_API_KEYfor analysis (free at codedswitch.com)
Who Is This For?
- Web Audio / Tone.js developers — debug beats, synths, effects, and mixing without leaving your IDE
- Game audio developers — verify sound effects, spatial audio, and mixing in real-time
- Music app builders — catch regressions between code changes with
diff_audio - Podcast / streaming apps — validate audio quality, levels, and encoding
- Anyone whose app makes sound — if it has a Web Audio graph, your AI can now hear it
Why Not Just Use the Microphone?
Microphone MCPs capture room sound — your fan noise, chair creaks, and room reverb are all in the recording. webear taps the Web Audio API before it hits the DAC, giving you a clean digital signal with no room artifacts.
Web Perception — Full Sensor Suite
WebEar started as audio-only. Web Perception expands it to 6 senses:
Install the full browser SDK
Or use a single sensor:
Connect via MCP (hosted relay — no local server required)
Available MCP Tools
Get an API Key
- Create a free account at codedswitch.com.
- Open codedswitch.com/developer — also linked as Developer API in the account menu.
- Click Generate API Key and copy it. Keys start with
wbr_.
Free tier: 50 analyses/day, no credit card required.
Changelog
2.0.1
- Fixed the getting-started path for API keys. The previous instruction ("Settings → WebEar") was wrong — there is no WebEar section under Settings. Keys live at codedswitch.com/developer (linked as Developer API in the account menu). Both the Quick Start and the Web Perception sections now point to the correct place.
- The SDK's "missing API key" console error now links straight to the key page.
Contributing
See CONTRIBUTING.md.
License
MIT — see LICENSE
Author
Built by @asume21 — CodedSwitch
來源:README.md,提交 fa1ce2e
工具
0版本歷史
1- v1.2.4最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分