# Testing ElevenLabs MCP Server with Claude Desktop
## ๐ Prerequisites
1. **Claude Desktop installed** (download from https://claude.ai/download)
2. **ElevenLabs API Key** (get from https://elevenlabs.io/app/settings/api-keys)
3. **Python 3.9+** with the MCP server installed
## ๐ง Setup Instructions
### Step 1: Install the MCP Server
```bash
# Navigate to the project directory
cd /Users/alex/claude/11-mcp
# Activate virtual environment
source venv/bin/activate
# Ensure the server is installed
pip install -e .
```
### Step 2: Test Server Standalone
```bash
# Test the server runs correctly
export ELEVENLABS_API_KEY="your-api-key-here"
python -m elevenlabs_mcp.server
# You should see: "Starting elevenlabs-mcp-server v1.0.0"
# Press Ctrl+C to stop
```
### Step 3: Configure Claude Desktop
#### Find your Claude Desktop configuration directory:
**macOS**: `~/Library/Application Support/Claude/`
**Windows**: `%APPDATA%/Claude/`
#### Create or update `claude_desktop_config.json`:
```json
{
"mcpServers": {
"elevenlabs": {
"command": "python",
"args": ["-m", "elevenlabs_mcp.server"],
"cwd": "/Users/alex/claude/11-mcp",
"env": {
"ELEVENLABS_API_KEY": "your-actual-api-key-here",
"PYTHONPATH": "/Users/alex/claude/11-mcp/src"
}
}
}
}
```
### Step 4: Restart Claude Desktop
1. **Quit Claude Desktop completely**
2. **Restart Claude Desktop**
3. **Look for MCP server connection status**
## ๐งช Test Cases
### Test 1: Server Connection
In Claude Desktop, you should see:
- **MCP icon** in the interface
- **Server status** showing "elevenlabs" as connected
- **Tools available** indicator
### Test 2: List Available Tools
Ask Claude: "What MCP tools are available?"
Expected response should include:
- Agent management tools (create_agent, list_agents, etc.)
- Tool management tools (create_tool, list_tools, etc.)
- Knowledge base tools (create_knowledge_base_from_text, etc.)
### Test 3: Test Agent Management
Ask Claude: "List all my ElevenLabs agents"
This should:
- Call the `list_agents` tool
- Show your existing agents or an empty list
- Display agent details if any exist
### Test 4: Test Knowledge Base
Ask Claude: "List my ElevenLabs knowledge base documents"
This should:
- Call the `list_knowledge_base_documents` tool
- Show your documents or an empty list
- Display document metadata
### Test 5: Create Test Agent
Ask Claude: "Create a simple ElevenLabs agent for customer service"
This should:
- Use the `create_agent` tool
- Create an agent with basic configuration
- Return the agent ID and confirmation
## ๐ Troubleshooting
### Common Issues and Solutions
#### 1. Server Not Connecting
**Symptoms**: No MCP icon, server shows as disconnected
**Solutions**:
- Check the configuration file path and syntax
- Verify the `cwd` path is correct
- Ensure Python can find the module
- Check the logs in Claude Desktop developer tools
#### 2. API Key Issues
**Symptoms**: Tools run but return authentication errors
**Solutions**:
- Verify your ElevenLabs API key is correct
- Check the API key has proper permissions
- Ensure the environment variable is set correctly
#### 3. Import Errors
**Symptoms**: Server fails to start, import errors in logs
**Solutions**:
- Verify the virtual environment is activated
- Check PYTHONPATH includes the src directory
- Ensure all dependencies are installed
#### 4. Tool Execution Failures
**Symptoms**: Tools are listed but fail when called
**Solutions**:
- Check internet connectivity
- Verify ElevenLabs API is accessible
- Review error messages for specific issues
## ๐ง Debug Configuration
For debugging, create a more verbose configuration:
```json
{
"mcpServers": {
"elevenlabs": {
"command": "python",
"args": ["-m", "elevenlabs_mcp.server"],
"cwd": "/Users/alex/claude/11-mcp",
"env": {
"ELEVENLABS_API_KEY": "your-actual-api-key-here",
"PYTHONPATH": "/Users/alex/claude/11-mcp/src",
"LOG_LEVEL": "DEBUG",
"MCP_SERVER_NAME": "elevenlabs-debug"
}
}
}
}
```
## ๐ Test Results Template
Document your test results:
```markdown
## Test Results
### Connection Test
- [ ] MCP server appears in Claude Desktop
- [ ] Server status shows as connected
- [ ] Tools are available in the interface
### Tool Functionality
- [ ] list_agents works
- [ ] list_tools works
- [ ] list_knowledge_base_documents works
- [ ] create_agent works
- [ ] Tool responses are properly formatted
### Error Handling
- [ ] Invalid API key shows proper error
- [ ] Network errors are handled gracefully
- [ ] Tool parameters are validated
### Performance
- [ ] Tools respond within reasonable time
- [ ] No memory leaks or crashes
- [ ] Proper resource cleanup
```
## ๐ฏ Success Criteria
The test is successful if:
1. **โ
Server Connects**: Claude Desktop shows the MCP server as connected
2. **โ
Tools Available**: All 18 tools are listed and accessible
3. **โ
Basic Operations**: Can list agents, tools, and knowledge base
4. **โ
Error Handling**: Proper error messages for invalid operations
5. **โ
Performance**: Tools respond quickly and efficiently
## ๐ Getting Help
If you encounter issues:
1. **Check Claude Desktop logs** (Help โ Show Logs)
2. **Review server logs** (set LOG_LEVEL=DEBUG)
3. **Verify API connectivity** (test with curl)
4. **Check configuration syntax** (validate JSON)
## ๐ Next Steps
After successful testing:
1. **Document any issues** found during testing
2. **Create example workflows** for common use cases
3. **Share configuration** with other users
4. **Consider automation** for setup process
---
**Ready to test?** Follow the steps above and let me know the results!