# Amazon Music MCP Server
Control Amazon Music playback through Claude Desktop using the Model Context Protocol.
## Features
- ▶️ Play/Pause current track
- ⏭️ Skip to next track
- 🔍 Search and play songs, artists, or albums
- 🎵 Works with any Amazon Music subscription
## Prerequisites
- Python 3.10 or higher
- Google Chrome browser
- Amazon Music account
- Claude Desktop app
## Installation
### 1. Install via pip (coming soon)
```bash
pip install amazon-music-mcp
```
### 2. Manual Installation
```bash
# Clone the repository
git clone https://github.com/mk-8/amazon-music-mcp.git
cd amazon-music-mcp
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -e .
```
## Setup
### 1. Configure Claude Desktop
Add this to your Claude Desktop config file:
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"amazon-music": {
"command": "python",
"args": ["-m", "amazon_music_mcp"]
}
}
}
```
Or if using manual installation:
```json
{
"mcpServers": {
"amazon-music": {
"command": "/path/to/your/.venv/bin/python",
"args": ["/path/to/amazon-music-mcp/server.py"]
}
}
}
```
### 2. Start Chrome with Remote Debugging
**macOS/Linux**:
```bash
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--remote-debugging-port=9222 \
https://music.amazon.com &
```
**Windows**:
```cmd
"C:\Program Files\Google\Chrome\Application\chrome.exe" ^
--remote-debugging-port=9222 ^
https://music.amazon.com
```
### 3. Restart Claude Desktop
Completely quit and restart Claude Desktop for changes to take effect.
## Usage
Once configured, you can ask Claude to control your music:
- "Play the current track"
- "Pause the music"
- "Skip to the next track"
- "Search for and play Bohemian Rhapsody"
- "Play songs by Taylor Swift"
## Available Commands
| Command | Description |
|---------|-------------|
| `play` | Resume playback |
| `pause` | Pause current track |
| `next_track` | Skip to next song |
| `search_and_play` | Search and play by artist, song, or album |
## Troubleshooting
### Chrome Connection Issues
Make sure Chrome is running with remote debugging:
```bash
# Check if port 9222 is in use
lsof -i :9222 # macOS/Linux
netstat -ano | findstr :9222 # Windows
```
### Server Not Appearing in Claude
1. Verify the config file path is correct
2. Check that Python path points to correct interpreter
3. Restart Claude Desktop completely
4. Check Claude Desktop logs for errors
### Playwright/Browser Errors
- Ensure you're logged into Amazon Music
- Keep the Chrome window open
- Don't close the Amazon Music tab
## Development
### Running Tests
```bash
python3 test_server.py
```
### Project Structure
```
amazon-music-mcp/
├── amazon_music_mcp/
│ ├── __init__.py
│ ├── __main__.py
│ ├── server.py
│ └── music.py
├── pyproject.toml
├── requirements.txt
├── README.md
├── LICENSE
├── .gitignore
```
## How It Works
1. MCP server connects to Chrome via Chrome DevTools Protocol (CDP)
2. Playwright automates the Amazon Music web interface
3. Claude Desktop communicates with the server via MCP protocol
4. Commands are translated to browser automation actions
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
MIT License - see LICENSE file for details
## Support
- Report issues: [GitHub Issues](https://github.com/mk-8/amazon-music-mcp/issues)
- Documentation: [Full Docs](https://github.com/mk-8/amazon-music-mcp/wiki)
## Roadmap
- [ ] PyPI package publication
- [ ] Volume control
- [ ] Playlist management
- [ ] Current song information
- [ ] Queue management
- [ ] Support for Spotify, YouTube Music
- [ ] Windows/Linux testing
## Author
Meet Kavathiya - [@meetkavathiya](https://github.com/mk-8/amazon-music-mcp)
## Acknowledgments
- Built with [Model Context Protocol](https://modelcontextprotocol.io/)
- Browser automation by [Playwright](https://playwright.dev/)