Plex MCP Server
An MCP server giving an agent Plex, Sonarr, Radarr and Trakt: library, viewing stats, recommendations and download queue.
- 57 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- A Plex token opens the library and other server users' viewing stats, and the HTTP variant has no authentication.
- Enabled write operations edit playlists and metadata and Sonarr and Radarr queue downloads.
Install
- Works in
Manual install
npx plex-mcp-serverFrom npm; set `PLEX_URL` and `PLEX_TOKEN` in the client configuration.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- A Plex token opens the library and other server users' viewing stats, and the HTTP variant has no authentication.
- Enabled write operations edit playlists and metadata and Sonarr and Radarr queue downloads.
This is third-party code. Review the repository files before installing.
What it does
The server turns a home Plex media server into a data source for an assistant. Out of the box there are 54 tools, 66 with write operations enabled. They browse libraries and search films, show metadata, playlists and watchlist, and build Tautulli-style viewing statistics: user activity, popular content and history. Recommendations draw on history, genres, directors and actors, with per-user profiles on multi-user servers. Through Sonarr and Radarr the agent searches and adds series and films and reads the download queue, while Trakt syncs watch history and enriches recommendations. Run it with `npx plex-mcp-server`; only `PLEX_TOKEN` is required and other keys are optional.
Who it is for. Home Plex owners who run a library with Sonarr, Radarr and Trakt and want to ask an assistant about it in plain phrases.
Good fit when
- You want to ask what you watched recently and what is on Continue Watching.
- You want recommendations from the viewing history of a specific server user.
- A series must be added to Sonarr or the download queue checked through an assistant.
- Watch history must sync to Trakt.
Not a fit when
- The assistant must not hold a Plex token and other users' history.
- The HTTP endpoint cannot be protected: it has no authentication of its own.
- You only need simple library search without managing downloads.
Example request
Show what I watched over the past month and recommend three films I have not seen.MCP
- Transport
- stdio, http
- Authentication
- API key
Environment variables
PLEX_TOKENrequired, secret- Access token for the Plex server.
PLEX_URLrequired- Plex server address, for example http://localhost:32400.
SONARR_API_KEYsecret- Sonarr API key.
RADARR_API_KEYsecret- Radarr API key.
TRAKT_CLIENT_SECRETsecret- Trakt OAuth application secret.
Limitations
It needs Node.js 20 or newer, a Plex server and its token; Sonarr and Radarr keys and a Trakt app are needed only for their tools, which return a clear error without them. Write operations are off by default: enable them only if you trust the assistant's judgment. The HTTP variant listens on port 3000 at `/mcp` with no authentication of its own, and anyone who can reach it gets tools that use your Plex token, so keep it bound to `127.0.0.1`. Keep the token out of the repository and rotate it periodically. Statistics and recommendations expose other people's viewing on the server.
How to disable. Remove the server entry from your client configuration and stop the `plex-mcp` container if you ran Docker. Revoke Plex, Sonarr, Radarr and Trakt tokens in their settings if you wish.
FAQ
Which variables are required?
Only `PLEX_TOKEN` (plus `PLEX_URL`, as in the sample config). The rest are optional: `SONARR_URL`, `SONARR_API_KEY`, `RADARR_URL`, `RADARR_API_KEY`, `TRAKT_CLIENT_ID` and `TRAKT_CLIENT_SECRET`.
How do I run it in Docker?
The `ghcr.io/niavasha/plex-mcp-server:latest` image serves HTTP on port 3000 with MCP at `/mcp`. Publish the port on `127.0.0.1` only.
How do I enable Trakt?
Create a Trakt OAuth app with redirect URI `urn:ietf:wg:oauth:2.0:oob`, add the ID and secret to the configuration and ask the assistant to authenticate.
How many tools are there?
54 out of the box and 66 with write operations enabled.
What do write operations do?
Create and edit playlists, update metadata and manage the watchlist. They are disabled by default.
Discussion
No questions or reviews yet.
Related
MCP serversPlex MCP Server controls Plex libraries, playlists and playback from Claude, ChatGPT and other MCP clients.
Personal recommendation rows for each Plex user, with MCP access that lets an agent configure and run them
A Spotify MCP server: the agent searches music, controls playback, queue and volume, and builds and edits playlists and the library
DaVinci Resolve MCP
DaVinci Resolve MCP Server
An MCP server that drives DaVinci Resolve Studio through the official scripting API: editing, media pool, rendering, grading and Fusion
MCP server that drives local Adobe Premiere Pro projects from Claude, Codex and other MCP clients
Transloadit MCP Server runs Transloadit Robots for video, audio, images and documents: upload, processing, templates and linting.
README in short
The TypeScript server combines four services in one MCP. The README covers install from source, npm and Docker, environment variables and getting a Plex token.