Skip to main content

A simple Apple Music API client for MCP

Project description

MCP-AppleMusic

A FastMCP server implementation for controlling Apple Music (formerly iTunes) on macOS through AppleScript commands.

Requirements

  • Python 3.13+
  • macOS with Apple Music app installed
  • MCP library ≥1.2.1

Installation

First, ensure you have uv installed:

$ brew install uv

Then, with Claude Desktop, add the following to claude_desktop_config.json:

{
  "mcpServers": {
    "iTunesControlServer": {
      "command": "uvx",
      "args": ["-n", "mcp-applemusic"]
    }
  }
}

Available Commands

The following commands are available through the MCP server:

itunes_play()         # Start playback
itunes_pause()        # Pause playback
itunes_next()         # Skip to next track
itunes_previous()     # Go to previous track
itunes_search(query)  # Search library for tracks
itunes_play_song(song)  # Play specific song
itunes_create_playlist(name, songs)  # Create new playlist
itunes_library()      # Get library statistics

Usage

Start the server:

python server.py

Example interactions:

# Search for a song
results = itunes_search("Hey Jude")

# Create a new playlist
itunes_create_playlist("Beatles Favorites", ["Yesterday", "Hey Jude", "Let It Be"])

# Play a specific song
itunes_play_song("Hey Jude")

Development

  1. Clone the repository:
git clone https://github.com/yourusername/mcp-applemusic.git
cd mcp-applemusic
  1. Install development dependencies:
pip install -e ".[dev]"

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Notes

  • This tool only works on macOS systems due to its AppleScript dependency
  • Requires Apple Music (formerly iTunes) to be installed

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mseep_mcp_applemusic-0.1.4.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mseep_mcp_applemusic-0.1.4-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file mseep_mcp_applemusic-0.1.4.tar.gz.

File metadata

  • Download URL: mseep_mcp_applemusic-0.1.4.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for mseep_mcp_applemusic-0.1.4.tar.gz
Algorithm Hash digest
SHA256 4f909c80c576f4bdaaf3e3caa00cff96c69d9ef4576f4d25f66047b3613abf3b
MD5 2a51b6ca6fd3e54e2cdc2ef6c28d87be
BLAKE2b-256 cfa85ed2e7fe7a73279b49a06d34a0cf6d4859d06bfbde0daa29e6c81ff913a2

See more details on using hashes here.

File details

Details for the file mseep_mcp_applemusic-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for mseep_mcp_applemusic-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7eb17f591fb7a378e5f41de1be70431cc4bf06d06ec0975c46ecb671b2a2b1c6
MD5 47be5688b33a261797a90a13b0e4cdf1
BLAKE2b-256 d869f1642dc186b5a449bec06788332ef29500b6abbfad80d14712b834326a21

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page