Skip to main content

mcp-deezer

Unofficial Deezer MCP server for AI agents. Search music, manage playlists and favorites, and reach your personalized discovery through 21 tools.

License: MIT Python 3.12+ CI

Why this exists

Deezer closed their developer portal to new applications in 2025. This project uses an authenticated browser session through Deezer's internal GraphQL API instead of a developer API key.

Because the API is unofficial, it can change without notice. This project is not affiliated with or endorsed by Deezer.

Install

uvx mcp-deezer          # no persistent install
pipx install mcp-deezer # or a global command

Until the first PyPI release, install from GitHub:

uvx --from "mcp-deezer @ git+https://github.com/Benitoow/mcp-deezer.git" mcp-deezer

The user must do this manually, in a browser:

  1. Go to https://deezer.com and log in
  2. Press F12 → Application → Cookies → deezer.com
  3. Copy the value of the cookie named arl (~192 hex characters)

2. Register the server

Claude Desktop — claude_desktop_config.json:

{
  "mcpServers": {
    "deezer": {
      "command": "uvx",
      "args": ["mcp-deezer"],
      "env": { "DEEZER_ARL": "PASTE_ARL_HERE" }
    }
  }
}

Claude Code:

claude mcp add deezer -e DEEZER_ARL=PASTE_ARL_HERE -- uvx mcp-deezer

Cursor — .cursor/mcp.json, VS Code / Copilot — .vscode/mcp.json: same command/args/env shape as Claude Desktop (VS Code uses the top-level key servers).

Recommended for anything automated — keep the cookie out of the config file:

"env": { "DEEZER_ARL_FILE": "/home/you/.config/deezer/arl", "DEEZER_READ_ONLY": "1" }

3. Restart the client and call get_me

It should return your numeric Deezer user id. An error naming DEEZER_ARL means the cookie is missing, and an error asking you to refresh the ARL means it expired.

Configuration

Variable Default Meaning
DEEZER_ARL — ARL cookie value (required unless DEEZER_ARL_FILE is set)
DEEZER_ARL_FILE — Path to a file containing the ARL (read at startup, chmod 600 recommended)
DEEZER_READ_ONLY 0 1 hides and refuses the 5 write tools
DEEZER_TIMEOUT 30 Per-request timeout in seconds (1–300)
DEEZER_LOG_LEVEL WARNING CRITICAL, ERROR, WARNING, INFO or DEBUG (logs go to stderr)

Tools

Read

Tool Purpose
get_me Your Deezer user id
search Search tracks/albums/artists/playlists, one category at a time with kind
get_track Track details; lyrics only with include_lyrics
get_lyrics Lyrics text and credits for one track
get_artist Artist + optional top tracks, albums and bio
get_album Album + tracklist (pageable)
get_playlist Playlist + tracks (pageable)
get_charts Country or worldwide charts, one category with kind
get_similar_tracks Tracks similar to a track
get_similar_artists Artists related to an artist
get_flow Your personal Flow
get_recommendations Recommended playlists, new releases, artists, hot tracks
get_recently_played Recently played containers (album, playlist, artist, Flow)
get_user_charts Your top tracks, artists or albums
get_favorites Your liked tracks, albums, artists or playlists (kind)
get_playlists Your playlists

Write

Tool Purpose Notes
set_favorite Like/unlike a track, album, artist or playlist idempotent
edit_playlist_tracks Add or remove tracks (batched by 50) reports what Deezer applied and rejected
create_playlist Create a playlist, optionally with tracks one call instead of create + add
update_playlist Rename, change description, privacy or collaborative flag
delete_playlist Permanently delete a playlist requires confirm: true

Response shape

Every list tool answers with the same object, so clients can validate it and agents can page it:

{
  "items": [{ "id": "3135556", "title": "One More Time", "artist": "Daft Punk", "album": "Discovery", "duration": 320 }],
  "count": 1,
  "total": null,
  "next_cursor": null
}
  • Pass next_cursor back as the cursor argument to page.
  • Detail tools return a flat object (get_track, get_artist, get_playlist…).
  • Failures are isError results with an actionable message: how to refresh the ARL, wait out a rate limit, or fix the arguments.
  • Lyrics, long biographies and track links are opt-in or truncated on purpose: they dominate token cost.

Upgrading from 1.x

1.x 2.x
get_favorite_tracks / _albums / _artists / _playlists get_favorites with kind
add_track_to_favorite, remove_track_from_favorite, … (6 tools) set_favorite with kind + action
get_user_playlists get_playlists
add_tracks_to_playlist / remove_tracks_from_playlist edit_playlist_tracks with action
get_track (always included lyrics) get_track + include_lyrics, or get_lyrics
list tools returning an array every tool returns an object (MCP requirement)
delete_playlist without confirmation delete_playlist requires confirm: true

Troubleshooting

Symptom Cause and fix
DEEZER_ARL is not set Set DEEZER_ARL or DEEZER_ARL_FILE, then restart the MCP client
Deezer session was rejected (ARL expired…) Log out/in on deezer.com, copy the new arl, restart
Deezer rate limit reached Several calls at once; wait a few seconds (reads retry automatically)
Empty items on a favorites/charts call The account has no data for that category, or the country code has no chart
A write returns success: false with rejected ids Deezer refused those tracks (unavailable in your country, or not your playlist)
A write returns 403/is_not_allowed The playlist does not belong to the account
Nothing appears in the client Check the MCP log: the server writes to stderr, never to stdout

Development

git clone https://github.com/Benitoow/mcp-deezer.git && cd mcp-deezer
uv venv && uv pip install -e ".[dev]"

ruff check . && ruff format --check .   # lint + format
mypy                                    # strict typing
pytest --cov                            # 120+ tests, no Deezer account required
python scripts/smoke.py                 # real stdio handshake (+ live calls if DEEZER_ARL is set)

Layout: catalog.py (schemas, annotations, registry), tools_read.py / tools_write.py (one handler per tool), formats.py (compact projections), client.py (client lifecycle + retries), errors.py (redaction, actionable messages), server.py (MCP wiring).

Adding a tool is one decorated function: the schema, the annotations, the output schema and the handler live together, so the advertised surface cannot drift from the implementation.

Security

The ARL is never written to disk by the server and is redacted from every error message. DEEZER_READ_ONLY=1 removes the write tools entirely, which is the recommended setting for unattended agents. See SECURITY.md.

License

MIT

Project health

Metadata

Release files for mcp-deezer 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-deezer 2.0.0
File Size Uploaded Provenance Actions
mcp_deezer-2.0.0.tar.gz 37.3 kB With provenance Details for mcp_deezer-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-deezer 2.0.0
File Interpreter ABI Platform Actions
mcp_deezer-2.0.0-py3-none-any.whl Python 3 none any Details for mcp_deezer-2.0.0-py3-none-any.whl

Total release size: 62.8 kB

Release files / mcp_deezer-2.0.0.tar.gz

Download URL mcp_deezer-2.0.0.tar.gz
Size 37.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c87e2903fcb5484fb97c5f77a2c2e30a97653aa197115e47fceb704a653e3277
BLAKE2b-256 checksum
How to use checksums
428681e3992330f9350ebe7e89bbe94dae2a622f221cbd4e3d32faef396adc57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / mcp_deezer-2.0.0-py3-none-any.whl

Download URL mcp_deezer-2.0.0-py3-none-any.whl
Size 25.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37a2ab1aeed07fe226f3402fed5e6468847ee03f4f7eace88fc90b831635cc80
BLAKE2b-256 checksum
How to use checksums
b4616bffb577541c71b689d36df34ad35dea64f168a4e3595de1685a4fe20b9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for mcp-deezer 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mcp_deezer-2.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page