Plex Mcp Server
Plex MCP Server
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.
What is this?
This MCP server transforms your Plex Media Server into an AI-queryable database. Ask your AI assistant questions like:
- "What movies have I watched recently?"
- "Show me my viewing statistics for the past month"
- "What's the most popular content on my server?"
- "Find action movies in my library"
- "What's on my continue watching list?"
- "Add that new show to Sonarr"
- "What's in my download queue?"
- "Sync my watch history to Trakt"
- "Recommend me some movies I haven't seen"
Features
54 tools out of the box (66 with write operations enabled):
- 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, rate media, and mark media watched or unwatched
One server, all tools. Trakt and Sonarr/Radarr credentials are optional — tools that need them return a helpful setup message if the key is missing. You don't need to configure everything upfront.
Quick Start
Prerequisites
- Node.js 20+
- Plex Media Server (any recent version)
- Plex Token (How to get your token)
- MCP-compatible client (Claude Desktop, etc.)
Installation
# Clone the repository
git clone https://github.com/niavasha/plex-mcp-server.git
cd plex-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
Or install directly from npm:
npx plex-mcp-server
Run with Docker
Each release from the next one onwards is published to GitHub Container
Registry for linux/amd64 and linux/arm64, tagged with its full version
(X.Y.Z), X.Y, X and latest.
The image starts the HTTP transport on port 3000, serving MCP at /mcp:
docker run -d --name plex-mcp \
-e PLEX_URL=http://your-plex-host:32400 \
-e PLEX_TOKEN=your_plex_token \
-p 127.0.0.1:3000:3000 \
ghcr.io/niavasha/plex-mcp-server:latest
The HTTP endpoint has no authentication of its own, and anyone who can reach
it can call tools that use your Plex token. Keep it bound to 127.0.0.1 as
above, or behind something that authenticates. Set MCP_PORT to listen on a
different port, and MCP_PATH to serve MCP somewhere other than /mcp (for
example /plex/mcp behind a reverse proxy). Outside Docker, the --port and
--path flags do the same. The health check stays at /health.
From the project's README.