Plex MCP Server

Unified MCP server for Plex, Sonarr, Radarr, and Trakt — 45 AI tools for managing your media library with personalized recommendations (54 with write

Local serverstdioPython

What is the Plex MCP server?

Plex MCP server exists for a simple reason — assistants are far more useful when they can act on Plex directly instead of describing what you should do. Unified MCP server for Plex, Sonarr, Radarr, and Trakt — 45 AI tools for managing your media library with personalized recommendations (54 with write operations.

What you get

A Model Context Protocol (MCP) server that provides AI assistants with comprehensive access to your Plex Media Server, Sonarr, Radarr, and Trakt.tv — all from a single unified server.

This MCP server transforms your Plex Media Server into an AI-queryable database. Ask your AI assistant questions like:

  • Plex Library Management — — Browse libraries, search media, get detailed metadata, list playlists and watchlist
  • Tautulli-Style Analytics — — Viewing statistics, user activity, popular content, watch history
  • Personalized Recommendations — — AI-powered movie suggestions based on your watch history, genres, directors, and actors. Supports per-user profiles for multi-user Plex servers
  • Sonarr/Radarr Integration — — Browse, search, add series/movies, view queues, trigger downloads
  • Trakt.tv Sync — — OAuth authentication, watch history sync, enhanced statistics, scrobbling. When configured, Trakt data enriches recommendations by catching movies watched outside Plex
  • Write Operations — (opt-in) — Create/edit playlists, update metadata, manage watchlist

What the assistant can call

Once Plex is connected, these are the calls the assistant has available:

  • Function — Description
  • get_libraries — List all Plex libraries
  • get_library_items — List items in a library with pagination
  • export_library — Export a full library to JSON (under ./exports)
  • search_media — Search media globally or within one library
  • get_recently_added — Recently added content
  • get_on_deck — Continue watching list
  • get_media_details — Detailed media info
  • get_editable_fields — Show editable fields and available tags for an item
  • get_playlists — List all Plex playlists
  • get_playlist_items — List items in a playlist
  • get_watchlist — Get current Plex watchlist

Setting it up

plex-mcp-server on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Configuration and credentials

You will need 8 environment variables: PLEX_URL, PLEX_TOKEN, SONARR_URL, SONARR_API_KEY, RADARR_URL, RADARR_API_KEY, TRAKT_CLIENT_ID, TRAKT_CLIENT_SECRET. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Node.js 20+ - Plex Media Server (any recent version) - Plex Token (How to get your token) - MCP-compatible client (Claude Desktop, etc.)

Choosing this one

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Plex's toolset — Function, get_libraries, get_library_items and 11 more — is a fair guide to whether it matches your workflow. It is maintained by niavasha; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Plex.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the plex mcp server does with a few real requests.

Available tools

ToolWhat it does
FunctionDescription
get_librariesList all Plex libraries
get_library_itemsList items in a library with pagination
export_libraryExport a full library to JSON (under ./exports)
search_mediaSearch media globally or within one library
get_recently_addedRecently added content
get_on_deckContinue watching list
get_media_detailsDetailed media info
get_editable_fieldsShow editable fields and available tags for an item
get_playlistsList all Plex playlists
get_playlist_itemsList items in a playlist
get_watchlistGet current Plex watchlist
get_recently_watchedRecently watched content
get_watch_historyDetailed watch sessions

How to install the Plex MCP server

{
  "mcpServers": {
    "plex": {
      "command": "node",
      "args": ["/path/to/plex-mcp-server/build/plex-mcp-server.js"],
      "env": {
        "PLEX_URL": "http://localhost:32400",
        "PLEX_TOKEN": "your_plex_token_here",

        "SONARR_URL": "http://localhost:8989",
        "SONARR_API_KEY": "optional_sonarr_api_key",

        "RADARR_URL": "http://localhost:7878",
        "RADARR_API_KEY": "optional_radarr_api_key",

        "TRAKT_CLIENT_ID": "optional_trakt_client_id",
        "TRAKT_CLIENT_SECRET": "optional_trakt_client_secret"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js 20+ - Plex Media Server (any recent version) - Plex Token (How to get your token) - MCP-compatible client (Claude Desktop, etc.)
VariableDescriptionRequired
PLEX_URLEndpoint or connection string the server talks to.Yes
PLEX_TOKENCredential the server authenticates with.Yes
SONARR_URLEndpoint or connection string the server talks to.Yes
SONARR_API_KEYCredential the server authenticates with.Yes
RADARR_URLEndpoint or connection string the server talks to.Yes
RADARR_API_KEYCredential the server authenticates with.Yes
TRAKT_CLIENT_IDConfiguration value read at startup.Optional
TRAKT_CLIENT_SECRETCredential the server authenticates with.Yes

Example prompts to try

  • Use Plex to Function.
  • Use Plex to get libraries.
  • Use Plex to get library items.

Frequently asked questions

It connects Plex to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (Function, get_libraries, get_library_items, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Plex directly.