Apple Music

Apple Music

kennethreitz

Controls Apple Music on macOS through AppleScript commands, enabling playback control and library management from within Claude conversations.

Integrates with Apple Music on macOS using Python and AppleScript to enable music playback control, library searching, playlist creation, and metadata retrieval.

74518 views20Local (stdio)

What it does

  • Control music playback (play, pause, skip tracks)
  • Search Apple Music library by track name
  • Create playlists and add songs to them
  • Get current song information and library statistics
  • Play specific songs by name
  • Browse entire music library

Best for

macOS users wanting voice-controlled music playbackAutomating playlist creation and music organizationManaging Apple Music without switching apps
macOS only - uses native AppleScriptNo Apple Music API key requiredDirect integration with local music library

About Apple Music

Apple Music is a community-built MCP server published by kennethreitz that provides AI assistants with tools and capabilities via the Model Context Protocol. Control Apple Music on macOS using Python and the Apple Music API: manage playback, search the library, and create playl It is categorized under other, developer tools. This server exposes 10 tools that AI clients can invoke during conversations and coding sessions.

How to install

You can install Apple Music in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

Apple Music is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

Tools (10)

itunes_play

Start playback in Music (iTunes).

itunes_pause

Pause playback in Music (iTunes).

itunes_next

Skip to the next track.

itunes_previous

Return to the previous track.

itunes_search

Search the Music library for tracks whose names contain the given query. Returns a list of tracks formatted as "Track Name - Artist".

MseeP.ai Security Assessment Badge

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": ["-p", "3.13", "-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

Alternatives

Related Skills

Browse all skills
code-to-music

Tools, patterns, and utilities for creating music with code. Output as a .mp3 file with realistic instrument sounds. Write custom compositions to bring creativity to life through music. This skill should be used whenever the user asks for music to be created. Never use this skill for replicating songs, beats, riffs, or other sensitive works. The skill is not suitable for vocal/lyrical music, audio mixing/mastering (reverb, EQ, compression), real-time MIDI playback, or professional studio recording quality.

12
openai-knowledge

Use when working with the OpenAI API (Responses API) or OpenAI platform features (tools, streaming, Realtime API, auth, models, rate limits, MCP) and you need authoritative, up-to-date documentation (schemas, examples, limits, edge cases). Prefer the OpenAI Developer Documentation MCP server tools when available; otherwise guide the user to enable `openaiDeveloperDocs`.

4
ai-music-prompts

AI music prompt templates and best practices for generating music with AI tools like Suno, Udio, Mureka, and others. Use when user needs to create music prompts, song ideas, or wants guidance on writing effective prompts for AI music generation. Includes bilingual prompt templates for various genres, mood descriptors, instrumentation guidance, and lyric writing tips. Also provides techniques for crafting specific musical outcomes and examples of well-structured prompts in Chinese and English.

0
ui-design-system

UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.

18
skill-sync

Syncs Claude Skills with other AI coding tools like Cursor, Copilot, and Codeium by creating cross-references and shared knowledge bases. Invoke when user wants to leverage skills across multiple tools or create unified AI context.

10
ai-sdk

Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".

6