plex-mcp-server
plex-mcp-server
MCP server for Plex Media Server. Lets AI assistants browse your libraries, search media, get viewing recommendations, check what's on deck, and more — all read-only against your local Plex instance.
Distributed as a Docker image via GHCR. Designed to run behind mcp-edge-gateway for OAuth-secured remote access.
Tools
Library
get_libraries— list all library sectionsget_library_contents— paginated contents of a section (filter by genre, year, content rating, studio, watched status)get_children— seasons of a show, episodes of a season, tracks of an albumget_media_info— full metadata for any itemget_media_extras— trailers, behind-the-scenes, and other extras
Discovery
search_media— full-text search across all librariesget_genres/get_actors/get_directors— browse by taxonomyget_collections/get_collection_items— named collectionsget_related— Plex's related-content hubs for an itemget_recently_added— new additions across all libraries or a specific sectionget_on_deck— in-progress items with watch percentageget_watch_history— recently watched with timestampsget_random_items— random picks from a section (optionally filtered)
Quick start
docker run --rm \
-e PLEX_URL=http://192.168.1.x:32400 \
-e PLEX_TOKEN=your-token \
-p 3003:3000 \
ghcr.io/x10send/plex-mcp-server:latestConfiguration
Variable | Required | Default | Description |
| Yes | — | Local Plex URL, e.g. |
| No | — | Plex auth token (can be injected per-request by the gateway instead) |
| No |
| Port to listen on |
| No |
|
|
PLEX_TOKEN is optional at startup — the server also accepts it per-request via the X-Plex-Token header. The header takes priority over the env var. If neither is present, the server returns 401.
Gateway integration
When running behind mcp-edge-gateway, store your token as PLEX_TOKEN in the gateway's upstream config. The gateway injects it as X-Plex-Token on each request. No token needed in the server's environment.
Development
npm ci
npm run dev # hot-reload dev server
npm run check # format → lint → typecheck → test+coverage → build
npm test # tests onlyCoverage thresholds: ≥85% lines/functions, ≥70% branches.
Security
See SECURITY.md. This server is designed for LAN/gateway use only — do not expose it directly to the internet.
License
MIT — see LICENSE.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/x10send/plex-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server