Apple Music Remote MCP
Provides read-only access to personal Apple Music playlists and library, enabling users to list, search, and browse playlists, folders, tracks, favorites, recently played, and recently added items.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Apple Music Remote MCPshow me my recently played songs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Apple Music Remote MCP — Read-Only ChatGPT Prototype
A small read-only MCP bridge that lets ChatGPT access your personal Apple Music playlists and library from ordinary conversations.
It wraps [applemusic-mcp] as a local upstream server, exposes a deliberately restricted MCP interface over Streamable HTTP, and uses a Cloudflare Tunnel to make that local MCP endpoint reachable from ChatGPT.
Prototype status: this project is intended for personal development and testing. The current Cloudflare Quick Tunnel setup is temporary and unauthenticated.
What this project does
The upstream applemusic-mcp project supports a wide range of Apple Music operations, including both reads and writes.
This prototype intentionally exposes only a small read-only subset:
playlist
listfolderstrackssearch
library
searchbrowsefavoritesrecently_playedrecently_added
Mutation actions such as creating playlists, adding tracks, deleting items, renaming playlists, rating tracks, or removing library items are not exposed.
The restriction is enforced twice:
the MCP tool schema shown to ChatGPT contains only the allowed read actions;
every actual tool call is checked again server-side before being forwarded upstream.
This means manually constructing a blocked action does not bypass the read-only boundary.
Related MCP server: Sound
Architecture
ChatGPT
|
| MCP over HTTPS
v
Cloudflare Tunnel
|
| forwards to localhost
v
remote_mcp.py
http://127.0.0.1:8787/mcp
|
| local stdio MCP
v
applemusic-mcp
|
v
Apple MusicThere are therefore three relevant components:
applemusic-mcpHandles the actual Apple Music authentication and API/library access.remote_mcp.pyActs as a read-only proxy and exposes Streamable HTTP MCP on localhost.Cloudflare Tunnel Gives the local MCP server a temporary public HTTPS address that ChatGPT can reach.
Both the local MCP server and the Cloudflare Tunnel must be running for ChatGPT access to work.
Project structure
.
├── remote_mcp.py
├── test_mcp.py
├── requirements.txt
├── .gitignore
└── README.mdremote_mcp.py
Main server.
It:
launches short-lived local connections to
applemusic-mcp serve;discovers the upstream MCP tools;
exposes only
playlistandlibrary;rewrites their action schemas to contain only approved read operations;
validates every tool call before forwarding it upstream;
serves the resulting MCP interface over Streamable HTTP;
enables MCP DNS-rebinding protection;
binds only to
127.0.0.1.
test_mcp.py
Small MCP client used to verify the proxy before connecting it to ChatGPT.
It:
connects to the Streamable HTTP MCP endpoint;
lists the exposed tools;
prints the allowed action enums;
calls:
playlist(action="list")prints the real playlists returned by Apple Music.
Requirements
The current prototype has primarily been tested on Windows.
You need:
Python 3.10 or newer
an Apple Music subscription
Google Chrome on Windows/Linux
cloudflaredaccess to ChatGPT custom MCP apps / Developer Mode
internet access while using Apple Music and the tunnel
Python dependencies are defined in requirements.txt:
applemusic-mcp==0.18.5
mcp>=1.28.1,<3
uvicorn[standard]>=0.35,<1The applemusic-mcp version is currently pinned because this proxy depends on its tool names and schemas.
Installation
1. Clone the repository
git clone <YOUR_REPOSITORY_URL>
cd <YOUR_REPOSITORY_FOLDER>2. Create a virtual environment
Windows PowerShell
py -m venv .venv
.\.venv\Scripts\Activate.ps1macOS / Linux
python3 -m venv .venv
source .venv/bin/activateUpgrade pip:
python -m pip install --upgrade pipThen install the dependencies:
pip install -r requirements.txt3. Install the browser runtime
On Windows/Linux, install the Chromium runtime used by the Apple Music authentication flow:
playwright install chromiumA normal Google Chrome installation should also be available on the system.
macOS users may use the Safari/native paths supported by applemusic-mcp instead.
Apple Music authentication
Authentication is handled by applemusic-mcp, not by this proxy.
Run:
applemusic-mcp loginOn Windows, this should open a local browser window.
Sign into your Apple Music account there.
Then verify the stored login:
applemusic-mcp statusOnce login succeeds, the credentials are stored by applemusic-mcp locally.
They are not stored in this Git repository and do not need to be entered into ChatGPT.
Normally, you only need to sign in once. Restarting this project or recreating the Cloudflare Tunnel does not by itself require another Apple Music login.
Test the MCP server locally
Before involving ChatGPT or Cloudflare, verify that the local MCP proxy works.
Terminal 1 — start the server
Activate the virtual environment:
.\.venv\Scripts\Activate.ps1Then run:
python remote_mcp.pyThe default endpoint is:
http://127.0.0.1:8787/mcpYou should see output similar to:
Apple Music Remote MCP prototype
--------------------------------
Local MCP URL: http://127.0.0.1:8787/mcp
Public host: not configured
Exposed tools: playlist, library (read-only)Leave this terminal running.
Terminal 2 — run the MCP test client
Activate the same virtual environment:
.\.venv\Scripts\Activate.ps1Then run:
python test_mcp.pyExpected tool discovery:
Discovered MCP tools:
- playlist: ['folders', 'list', 'search', 'tracks']
- library: ['browse', 'favorites', 'recently_added', 'recently_played', 'search']The script will then call:
playlist(action='list')and should print your actual Apple Music playlists.
If that succeeds, the complete local path works:
test_mcp.py
->
remote_mcp.py
->
applemusic-mcp
->
Apple MusicStop remote_mcp.py with:
Ctrl+Cbefore starting the public configuration below.
Expose the MCP server with Cloudflare
ChatGPT cannot directly connect to:
localhostFor this prototype, a Cloudflare Quick Tunnel provides a temporary public HTTPS endpoint.
Terminal 1 — start Cloudflare
Run:
cloudflared tunnel --url http://localhost:8787Cloudflare will print a URL similar to:
https://random-words.trycloudflare.comThe hostname in this example is:
random-words.trycloudflare.comKeep this terminal running.
Important
A Quick Tunnel URL is temporary.
If you stop and restart cloudflared, you will normally receive a different hostname.
Whenever that happens, you must:
use the new hostname when starting
remote_mcp.py;update the MCP Server URL in ChatGPT.
Start the server for public access
Terminal 2 — start remote_mcp.py
Activate the virtual environment:
.\.venv\Scripts\Activate.ps1Take the hostname generated by Cloudflare and run:
python remote_mcp.py `
--port 8787 `
--public-host random-words.trycloudflare.comReplace:
random-words.trycloudflare.comwith your actual current Cloudflare hostname.
Do not include:
https://and do not include:
/mcpafter --public-host.
Correct:
--public-host random-words.trycloudflare.comIncorrect:
--public-host https://random-words.trycloudflare.com/mcpThe server should now print:
Local MCP URL: http://127.0.0.1:8787/mcp
Public MCP URL: https://random-words.trycloudflare.com/mcp
Exposed tools: playlist, library (read-only)Keep this terminal running as well.
Test the public endpoint
Before configuring ChatGPT, you can optionally test the complete public route.
Open another terminal, activate the virtual environment, and run:
python test_mcp.py https://random-words.trycloudflare.com/mcpReplace the URL with your actual tunnel URL.
If this returns your playlists, the following full path is working:
MCP client
->
Cloudflare
->
remote_mcp.py
->
applemusic-mcp
->
Apple MusicConnect it to ChatGPT
Enable Developer Mode / custom MCP app creation in ChatGPT if it is not already enabled.
Create a new custom MCP app.
Suggested configuration:
Name
Apple Music LibraryDescription
Read-only access to my personal Apple Music playlists and library.Server URL
https://random-words.trycloudflare.com/mcpUse your own current Cloudflare hostname.
Authentication
For this prototype:
None / No authenticationThen select:
Scan ToolsChatGPT should discover exactly two tools:
playlist
libraryVerify the exposed actions
Inspect the discovered tool schemas.
ChatGPT should see:
playlist:
folders
list
search
tracksand:
library:
browse
favorites
recently_added
recently_played
searchIf mutation actions such as the following appear:
add
create
delete
move
remove
rename
ratedo not continue using that configuration until the proxy is checked.
The intended prototype is read-only.
Using it in ChatGPT
Once the custom app has been created, enable or select it in an ordinary ChatGPT conversation.
You can then use natural-language requests.
For example:
Show me my Apple Music playlists.Look at my Mahler playlist.What tracks are in my Bruckner playlist?What have I listened to recently?Show me my recently added music.Search my library for Beethoven.Show my favorite tracks.ChatGPT decides which MCP action to call from the available read-only interface.
For example, asking for a specific playlist will commonly result in:
playlist(action="list")
|
v
identify playlist
|
v
playlist(action="tracks", playlist="...")Available operations
Playlist operations
List playlists
playlist(action="list")Returns playlists available in the user's Apple Music account/library.
List playlist folders
playlist(action="folders")Folder support depends on the underlying platform and Apple Music environment.
Read tracks from a playlist
playlist(
action="tracks",
playlist="Gustav Mahler"
)Search inside a playlist
playlist(
action="search",
playlist="Gustav Mahler",
query="Symphony No. 7"
)Note that playlist.search searches tracks inside a selected playlist.
To find a playlist by name, list the playlists first rather than using playlist.search.
Library operations
Search the local/personal library
library(
action="search",
query="Mahler"
)Browse the library
library(action="browse")Optional parameters can be forwarded to the underlying applemusic-mcp implementation.
Recently played
library(action="recently_played")This returns Apple Music's available recently-played data.
It should not be assumed to be a real-time playback log. Apple Music's server-side history may lag behind what was played most recently in the Music app.
Recently added
library(action="recently_added")Returns recently added library content.
Favorites
library(action="favorites")Availability may depend on the platform and Apple Music backend used by applemusic-mcp.
Running the prototype later
After the initial installation and Apple Music login, a normal future session requires only the runtime components.
You will usually need three terminals.
Terminal 1 — Cloudflare
cloudflared tunnel --url http://localhost:8787Copy the newly generated hostname.
Terminal 2 — MCP server
.\.venv\Scripts\Activate.ps1
python remote_mcp.py `
--port 8787 `
--public-host YOUR-CURRENT-HOST.trycloudflare.comTerminal 3 — optional testing
.\.venv\Scripts\Activate.ps1
python test_mcp.pyor:
python test_mcp.py https://YOUR-CURRENT-HOST.trycloudflare.com/mcpThen update the ChatGPT custom app's Server URL if the Quick Tunnel hostname changed.
When is the server available?
The integration works only while both of these processes are running:
remote_mcp.py
cloudflaredIf remote_mcp.py stops:
ChatGPT
->
Cloudflare
-X-> local MCP serverIf cloudflared stops:
ChatGPT
-X-> public MCP endpointIf the computer itself is shut down or disconnected from the internet, the local Apple Music MCP endpoint is also unavailable.
This is expected for the current local prototype.
Security model
Read-only boundary
This proxy intentionally exposes only personal-data read operations.
The permitted actions are hard-coded in:
READ_ONLY_ACTIONSin remote_mcp.py.
Tool schemas are filtered before being sent to the client, and calls are independently validated at execution time.
Local binding
The HTTP MCP server binds to:
127.0.0.1rather than directly exposing a network interface.
External access is provided through Cloudflare Tunnel.
DNS-rebinding protection
MCP transport security is enabled through:
TransportSecuritySettingsOnly localhost plus the public hostname supplied with:
--public-hostare allowed.
This is also why a newly generated Cloudflare hostname must be passed to remote_mcp.py after restarting the tunnel.
No application authentication
The current Quick Tunnel configuration does not add authentication in front of the MCP endpoint.
The random Cloudflare hostname therefore acts as an address, not as a secret credential.
Anyone who obtains that URL while both the tunnel and local MCP server are running could potentially invoke the exposed read-only Apple Music tools.
The read-only restriction significantly limits what the endpoint can do, but it does not make the personal library data public-safe.
Do not treat the current setup as a production deployment.
Credentials
Your Apple Music login is managed locally by applemusic-mcp.
Do not commit authentication data, browser profiles, tokens, .env files, or virtual environments to Git.
The included .gitignore excludes:
.venv/
__pycache__/
*.pyc
.envTroubleshooting
applemusic-mcp is not recognized
Make sure the project's virtual environment is active:
.\.venv\Scripts\Activate.ps1Then verify:
applemusic-mcp statusIf the command still does not exist:
pip install -r requirements.txtApple Music login does not open correctly
On Windows/Linux, verify that the browser runtime was installed:
playwright install chromiumThen try:
applemusic-mcp loginagain.
test_mcp.py cannot connect locally
Check that:
python remote_mcp.pyis still running.
The default test endpoint is:
http://127.0.0.1:8787/mcpChatGPT cannot connect
Verify all of the following:
cloudflaredis still running;remote_mcp.pyis still running;both use port
8787;the ChatGPT Server URL ends in
/mcp;--public-hostcontains only the hostname;the hostname in ChatGPT matches the current Quick Tunnel hostname.
The tunnel was restarted and ChatGPT stopped working
Quick Tunnel hostnames are temporary.
Restart remote_mcp.py with the new hostname:
python remote_mcp.py `
--port 8787 `
--public-host NEW-HOST.trycloudflare.comThen update the custom MCP app to:
https://NEW-HOST.trycloudflare.com/mcpand rescan or reconnect the app as necessary.
Local testing works but the public endpoint fails
A common cause is a mismatch between the current Cloudflare hostname and the value supplied through:
--public-hostBecause the server enables Host/Origin validation, an old tunnel hostname will be rejected.
ChatGPT sees unexpected write actions
Stop using the endpoint and inspect:
READ_ONLY_ACTIONSin remote_mcp.py.
The intended tool schemas contain only:
playlist:
folders
list
search
tracks
library:
browse
favorites
recently_added
recently_played
searchrecently_played looks outdated
This action reflects the history returned by Apple Music / the underlying applemusic-mcp backend.
It can lag behind actual recent listening activity and should not be treated as a precise real-time activity log.
Custom upstream command
By default, the proxy starts the upstream server with:
applemusic-mcp serveThe executable can be overridden through the environment variable:
APPLE_MUSIC_MCP_COMMANDFor example, this can be useful if applemusic-mcp is installed in a non-standard environment.
Most users do not need to change this.
Current limitations
This is intentionally a small prototype.
It currently:
supports reading only;
exposes only two upstream tools;
depends on a locally running computer;
depends on a running Cloudflare Tunnel;
uses a temporary public hostname;
has no application-level authentication;
does not expose playback control;
does not expose Apple Music catalog/discovery tools;
does not expose queue management;
does not expose any playlist or library mutations.
These are design choices rather than missing protections.
The primary goal is to test a narrow flow:
ordinary ChatGPT conversation
->
custom remote MCP
->
private Apple Music datawhile keeping the accessible surface as small and reversible as possible.
Possible next steps
A more permanent version could replace the Quick Tunnel with a stable authenticated deployment, for example:
a persistent Cloudflare Tunnel with a stable hostname;
an authenticated MCP endpoint;
OAuth or another access-control layer;
a continuously running host/server;
more granular permission policies;
optional additional read-only tools.
Write access should only be added deliberately and with additional confirmation and authorization safeguards.
Upstream project
This prototype is a small remote read-only wrapper around the open-source:
applemusic-mcpproject by epheterson.
The upstream project provides the Apple Music integration itself; this repository mainly adds:
a restricted tool surface;
server-side read-only enforcement;
Streamable HTTP exposure;
Cloudflare-compatible Host/Origin configuration;
a simple MCP test client;
a ChatGPT-oriented deployment path.
This project is not affiliated with or endorsed by Apple.
Prototype goal
If you can open an ordinary ChatGPT conversation and ask:
Show me my Apple Music playlists.and ChatGPT returns the real contents of your private Apple Music library through the custom MCP app, the prototype has succeeded.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceIntegrates Apple Music with MCP clients to search the global catalog, manage personal playlists, and access library data. It enables users to perform actions like creating playlists, adding tracks, and viewing recommendations through natural language commands.1
- Alicense-qualityCmaintenanceApple Music playback control, library search, playlist management, and queue operations via MCP.1MIT
- Alicense-qualityAmaintenanceMCP server for Apple Music that lets AI assistants manage playlists, control playback, and browse the music library.81MIT
- Alicense-qualityCmaintenanceMCP server for controlling Apple Music on macOS via AppleScript, enabling playlist management, playback control, and library search through natural language.141MIT
Related MCP Connectors
MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent
Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Xinyue-Zhang01/applemusic_remote_mcp_prototype'
If you have feedback or need assistance with the MCP directory API, please join our Discord server