home / mcp / plex mcp server

Plex MCP Server

Plex MCP server

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "djbriane-plex-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "FULL_PATH_TO_PROJECT",
        "run",
        "src/plex_mcp/plex_mcp.py"
      ],
      "env": {
        "PLEX_TOKEN": "YOUR_PLEX_TOKEN",
        "PLEX_SERVER_URL": "YOUR_PLEX_SERVER_URL"
      }
    }
  }
}

You can run a Python-based MCP server that talks to your Plex Media Server via the Plex API to search for movies, identify missing titles, and create playlists. This enables you to discover gaps in your collection and organize movies directly in Plex from your MCP client.

How to use

You interact with the Plex MCP Server through your MCP client by sending commands to search your Plex library, fetch movie details and genres, manage playlists, and retrieve recently added items. Practical workflows include finding movies by a director, identifying missing titles, and creating new playlists from search results.

Common tasks you can perform include searching for movies by title, director, or genre, getting detailed information about a specific movie, listing and inspecting playlists, and adding movies to playlists. The server exposes endpoints to retrieve recent additions and to remove playlists when needed.

How to install

Prerequisites you need before installation are Python 3.8 or higher, the uvx package manager, and a Plex Media Server with API access.

Install the Plex MCP Server locally by following these steps. 1) Clone the project repository. 2) Set up and activate a Python virtual environment using uvx. 3) Install any required dependencies and synchronize the project files.

git clone <repository-url>
cd plex-mcp

uv venv
source .venv/bin/activate
uv sync

Running the Plex MCP Server with Claude

Configure Claude to run the Plex MCP Server by providing the runtime command and the Plex connection details in your Claude app configuration.

{
  "mcpServers": {
    "plex": {
      "command": "uv",
      "args": [
        "--directory",
        "FULL_PATH_TO_PROJECT",
        "run",
        "src/plex_mcp/plex_mcp.py"
      ],
      "env": {
        "PLEX_TOKEN": "YOUR_PLEX_TOKEN",
        "PLEX_SERVER_URL": "YOUR_PLEX_SERVER_URL"
      }
    }
  }
}

Finding your Plex token

To obtain your Plex token, sign in to Plex Web App, open Developer Tools, switch to the Console tab, and run the following to retrieve the token from local storage.

window.localStorage.getItem('myPlexAccessToken')

Available tools

search_movies

Search for movies in your Plex library by filters such as title, director, or genre, with support for limiting results.

get_movie_details

Retrieve detailed information about a specific movie by its ratingKey.

get_movie_genres

Fetch the genres associated with a specific movie.

list_playlists

List all playlists available on the Plex server.

get_playlist_items

Get the items contained in a specific playlist.

create_playlist

Create a new playlist populated with specified movies.

delete_playlist

Delete a specified playlist from the Plex server.

add_to_playlist

Add a movie to an existing playlist.

recent_movies

Retrieve recently added movies from the Plex library.

Plex MCP Server - djbriane/plex-mcp