[BUG] ElevenLabs connector (elevenlabs-player) fails with "fetch failed" despite valid API key and working network
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The elevenlabs-player MCP connector consistently fails with Failed to generate speech: fetch failed when using the generate_tts tool (and also generate_sound_effect).
I've ruled out the most common causes:
- The API key is valid and has
text_to_speechpermission (tested directly againsthttps://api.elevenlabs.io/v1/text-to-speech/...from PowerShell and from native Node.jsfetchon the same machine — both respond correctly with status 200). - No proxy configured on Windows (
ProxyEnable = 0). - No firewall rules blocking outbound traffic for Claude or Node.
- ElevenLabs service is fully operational (status.elevenlabs.io = "fully operational").
- Fully reinstalled the connector (uninstall → reinstall → re-paste API key) and the error persists.
This suggests the connector process inside Claude Desktop is not resolving/connecting correctly to api.elevenlabs.io, even though the rest of the machine can.
Environment: Claude Desktop on Windows 11, running locally (not remote).
What Should Happen?
The generate_tts (and generate_sound_effect) tool should successfully connect to the ElevenLabs API and generate/play audio, the same way a direct request with the same API key succeeds from PowerShell or native Node.js fetch on the same machine.
Error Messages/Logs
Failed to generate speech: fetch failed
Failed to generate sound effect: fetch failed
Steps to Reproduce
- Install and enable the elevenlabs-player MCP connector with a valid ElevenLabs API key (with text_to_speech permission).
- Call the generate_tts tool with any text (or generate_sound_effect with any prompt).
- Observe the error "Failed to generate speech: fetch failed" (or "fetch failed" for sound effects).
- Confirm the same API key works fine when called directly via PowerShell Invoke-WebRequest or Node.js fetch from the same machine.
- Uninstall and reinstall the connector, re-enter the API key — error persists.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.178 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Additional diagnostics performed:
- Windows proxy settings: ProxyEnable = 0 (no system proxy configured)
- No outbound firewall rules blocking Claude or Node processes
- ElevenLabs status page (status.elevenlabs.io) shows "fully operational" — not a service outage
- Direct API call from PowerShell (Invoke-WebRequest) to https://api.elevenlabs.io/v1/text-to-speech/... with the same API key: succeeds (status 200)
- Direct API call using native Node.js fetch() with the same API key: succeeds (status 200/401 depending on endpoint tested)
This strongly suggests the issue is isolated to how the elevenlabs-player connector process makes its network request from within Claude Desktop, since the same machine, same network, and same API key work fine outside of it.