Sign inSign up

lordraw/plex-mcp

By lordraw

•Updated 2 months ago

MCP server for Plex Media Server — 38 tools for movies, TV, music, playlists & playback control

Image
Machine learning & AI
0

1.9K

lordraw/plex-mcp repository overview

⁠plex-mcp

A Model Context Protocol (MCP)⁠ server that connects any MCP-compatible AI client (Claude, etc.) to your Plex Media Server.

Exposes 75 tools across 8 categories — search, browse, control playback, manage playlists and collections, maintain libraries, and inspect watch history, all through natural language.

⁠Features

CategoryCapabilities
MoviesSearch, details, recent, unwatched, similar, mark watched, rate, delete
TV ShowsSearch shows and episodes, seasons, next episode, mark episode/season/show watched, rate
MusicSearch artists/albums/tracks, details, popular tracks, recently added, rate
PlaylistsList, view, create, smart playlists, add/remove items, delete
CollectionsList, details, view, create, smart collections, add/remove items, update, delete
PlaybackSessions, clients, play/pause/resume/stop, seek, volume, skip, step, audio and subtitle streams, play queue
LibraryList, global search, stats, genres, refresh, scan, analyze, empty trash, On Deck, recently added
ServerServer info, user accounts, watch history

The two destructive tools — delete_movie (removes media files) and empty_trash — require an explicit confirm=true; without it they report what would happen and change nothing.

⁠Quick Start — stdio (default)

docker run --rm -i \
  -e PLEX_SERVER_URL=http://192.168.1.100:32400 \
  -e PLEX_TOKEN=your_token_here \
  lordraw77/plex-mcp:latest

The -i flag keeps stdin open for JSON-RPC 2.0 communication.

⁠Quick Start — SSE (HTTP)

docker run --rm \
  -e PLEX_SERVER_URL=http://192.168.1.100:32400 \
  -e PLEX_TOKEN=your_token_here \
  -e MCP_TRANSPORT=sse \
  -p 8000:8000 \
  lordraw77/plex-mcp:latest

Connect your MCP client to http://localhost:8000/sse.

⁠Use with Claude Desktop

stdio (ephemeral container per request):

{
  "mcpServers": {
    "plex": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "PLEX_SERVER_URL=http://192.168.1.100:32400",
        "-e", "PLEX_TOKEN=your_token_here",
        "lordraw77/plex-mcp:latest"
      ]
    }
  }
}

SSE (long-running container — start it once, then reference the URL):

{
  "mcpServers": {
    "plex": {
      "url": "http://localhost:8000/sse"
    }
  }
}

⁠Environment Variables

VariableRequiredDefaultDescription
PLEX_SERVER_URLYes—Base URL of your Plex server (e.g. http://192.168.1.100:32400)
PLEX_TOKENYes—Your Plex authentication token
MCP_TRANSPORTNostdioTransport: stdio, sse, or streamable-http
MCP_HOSTNo0.0.0.0Bind address for HTTP transports
MCP_PORTNo8000Bind port for HTTP transports

How to find your Plex token: sign in at plex.tv → open any media item → ··· menu → Get Info → View XML → look for X-Plex-Token in the URL.

⁠Docker Compose

Two compose files are included:

docker-compose.stdio.yml — one-shot stdio container (used by MCP clients that spawn the process):

PLEX_SERVER_URL=http://192.168.1.100:32400 PLEX_TOKEN=your_token \
  docker compose -f docker-compose.stdio.yml run --rm plex-mcp

docker-compose.sse.yml — persistent HTTP server with health check and auto-restart:

# create a .env file with PLEX_SERVER_URL and PLEX_TOKEN, then:
docker compose -f docker-compose.sse.yml up -d

SSE endpoint: http://localhost:8000/sse
streamable-http: MCP_TRANSPORT=streamable-http docker compose -f docker-compose.sse.yml up -d → http://localhost:8000/mcp

⁠Transport

ModeHowEndpoint
stdio-i / docker-compose.stdio.yml—
SSE-e MCP_TRANSPORT=sse / docker-compose.sse.ymlhttp://host:8000/sse
streamable-http-e MCP_TRANSPORT=streamable-httphttp://host:8000/mcp

⁠Source

github.com/lordraw77/plex-mcp⁠

Tag summary

Content type

Image

Digest

sha256:e22f43b20…

Size

84.6 MB

Last updated

2 months ago

docker pull lordraw/plex-mcp