Plex-MCP
Provides comprehensive management and automation capabilities for Plex Media Server, including library management, metadata editing, collection management, playlist control, session management, and more.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Plex-MCPshow me recently added movies"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Plex MCP Server
A Model Context Protocol server that gives Claude full management access to a Plex Media Server — browsing libraries, fixing metadata, syncing between servers, managing collections, and more.
Works with Claude Desktop (Windows/macOS) and Claude Code via an SSH connection to the Ubuntu host running this server.
Prerequisites
Python 3.11+ on the host machine
Plex Media Server accessible on your LAN
A Plex authentication token (see Finding your token)
Claude Desktop or Claude Code
Installation
git clone https://github.com/ericwarthan/Plex-MCP
cd Plex-MCP
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtConfiguration
Copy the example config and fill in your details:
cp config/config.example.json ~/.config/plex-mcp/config.jsonEdit ~/.config/plex-mcp/config.json:
{
"plex_name": "My Plex Server",
"plex_host": "192.168.1.x",
"plex_port": 32400,
"token": "YOUR_PLEX_TOKEN_HERE",
"plex_url": "http://192.168.1.x:32400"
}The config file is stored in your home directory (not the repo) so credentials are never accidentally committed.
Connecting to Claude Desktop (Windows)
Claude Desktop connects to the MCP server over SSH. Add this to your
%APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"plex": {
"command": "C:\\Program Files\\Git\\usr\\bin\\ssh.exe",
"args": [
"username@YOUR_SERVER_IP",
"cd /home/username/Plex-MCP && source venv/bin/activate && python3 server.py --stdio"
]
}
}
}Important — use Git's ssh.exe, not Windows OpenSSH.
Claude Desktop launches ssh.exe as a subprocess and reads its stdout as the MCP stream. Windows' built-in OpenSSH (C:\Windows\System32\OpenSSH\ssh.exe) sometimes uses a different key format or agent that fails silently. The SSH binary bundled with Git for Windows (C:\Program Files\Git\usr\bin\ssh.exe) is more reliable for this use case.
Your SSH public key must be in ~/.ssh/authorized_keys on the server host.
Connecting to Claude Code
Claude Code can use the MCP server directly (no SSH wrapper needed if running on the same machine) or via SSH. In your project's .claude/settings.json:
{
"mcpServers": {
"plex": {
"command": "python3",
"args": ["/home/username/Plex-MCP/server.py", "--stdio"]
}
}
}Or via SSH from a remote machine (same pattern as Claude Desktop above).
Tool Reference
The server exposes 125+ tools across 15 categories. Destructive operations (delete, bulk-mark) require confirmed=true.
Libraries
Tool | Description |
| List all libraries with type, item count, and last scan time |
| Trigger a full or partial path scan |
| Refresh metadata from agents for all items |
| Cancel an in-progress scan |
| List all genres present in a library |
| List all release years present |
| List all studios present |
| List all directors present |
| Permanently remove deleted items from trash |
| Create a new library section |
| Permanently delete a library (confirmed=true) |
| Rename, change agent/language, or add/remove folder locations |
| Read advanced settings (thumbnail gen, intro detection, etc.) |
| Update advanced library settings |
Movies
Tool | Description |
| List movies with filtering by genre, year, resolution, watched status |
| Movies added most recently |
| Recently played movies |
| In-progress / resume-watching movies |
| Full details including cast, GUIDs, media info |
| Search by title |
| Find correct metadata match candidates |
| Apply a metadata match by GUID |
| Edit title, sort title, year, summary, studio, rating, etc. |
| Delete a movie (confirmed=true) |
| Find all movies without poster artwork |
| Queue a pre-transcoded optimized version for a device target |
| Merge two separate items into one multi-version item |
| Split a multi-version item back into separate items |
| List all items with more than one media file attached |
| List items with no external metadata agent match |
TV Shows
Tool | Description |
| List shows with metadata summary |
| Full details including season/episode counts, cast |
| List seasons with episode counts and watch status |
| List episodes for a season |
| Recently added episodes |
| Next episodes to watch |
| Find correct metadata match candidates for a show |
| Apply a metadata match by GUID |
| Edit metadata on a show, season, or episode |
| Delete a show, season, or episode (confirmed=true) |
Artwork
Tool | Description |
| List all poster options (online + local) with selection state |
| Same as above but also shows provider info for browsing |
| Set poster by downloading from a URL |
| Select a poster from available options by index |
| Upload a poster from a local file path on the server |
| Lock poster so metadata refreshes cannot override it |
| List available background/art images |
| Set background art from a URL |
| Select a background by index |
| List available banner images (TV shows) |
| Set a banner from a URL |
| List available theme music (TV shows) |
Collections
Tool | Description |
| List all collections in a library |
| Get collection details and item list |
| Create a new collection |
| Delete a collection (confirmed=true) |
| Add items to an existing collection (confirmed=true for 10+) |
| Remove items from a collection (confirmed=true for 10+) |
| Set a collection poster from a URL |
| Set sort order: release, alpha, or custom |
Playlists
Tool | Description |
| List all playlists |
| Get playlist details and items |
| Create a playlist from titles or rating keys |
| Delete a playlist (confirmed=true) |
| Add items to a playlist |
| Remove items from a playlist |
Sessions & Playback
Tool | Description |
| List active playback sessions |
| List active transcoding sessions |
| Stop a playback session |
| Stop a transcode job |
| Recent play history |
| List available Plex clients |
| Resume playback on a client |
| Pause playback |
| Stop playback |
| Seek to a position |
| Start playing a specific item on a client |
| Skip to next item |
| Skip to previous item |
| Set volume on a client |
Watch State
Tool | Description |
| Mark an item as watched (confirmed=true for 10+ episodes) |
| Mark an item as unwatched (confirmed=true for 10+) |
| Set a star rating (0–10) |
| Get watch status, view count, and ratings |
| Mark entire library or collection as watched (confirmed=true) |
| Mark entire library or collection as unwatched (confirmed=true) |
Users & Sharing
Tool | Description |
| List all managed users and home users |
| Get details for a specific user |
| Get a user's watch history |
| Playback statistics for a user |
| Share a library with a Plex user |
| Remove a user's access to a library |
Discovery
Tool | Description |
| Get the home screen hubs (On Deck, Recently Added, etc.) |
| On Deck items across all libraries |
| Recently added content across all libraries |
| Items with a resume position |
| Full-text search across all libraries |
Music
Tool | Description |
| List artists in a music library |
| List albums for an artist |
| List tracks for an album |
| Full artist details |
| Full album details including tracks |
| Search within a music library |
| Edit artist or album metadata |
| Find correct metadata match for an artist or album |
| Apply a metadata match by GUID |
Server Admin
Tool | Description |
| Server name, version, machine ID |
| Feature flags and enabled capabilities |
| Read all server preferences |
| Update a server preference |
| Check for available Plex updates |
| Apply a pending update |
| Recent server activity |
| Generate a short-lived access token |
| Bandwidth and media statistics |
Maintenance
Tool | Description |
| Empty trash on all libraries (confirmed=true) |
| Run database VACUUM and ANALYZE |
| Remove orphaned metadata bundle files |
| Clear the codec cache (confirmed=true) |
| Download diagnostics log archive to disk |
| Find items whose files no longer exist on disk |
| Storage and metadata statistics for a library |
| Recent log lines filtered by level and component |
| Combined unmatched / merged / orphaned check |
Sync
Tool | Description |
| Copy sort titles, posters, watch state, and collections from a source Plex server to the connected one. Matches items by GUID across both legacy and modern agent formats. Supports |
Known Quirks
Git ssh.exe vs Windows OpenSSH
Claude Desktop on Windows must use the SSH binary from Git for Windows, not the built-in Windows OpenSSH. Point command to C:\Program Files\Git\usr\bin\ssh.exe. The built-in version at C:\Windows\System32\OpenSSH\ssh.exe often fails silently when Claude Desktop reads the MCP stream from its stdout.
confirmed=true on destructive tools
Any tool that deletes items, empties trash, or bulk-modifies many records requires the confirmed parameter set to true. This prevents accidental bulk operations when Claude is exploring or describing what it would do. Always ask Claude to preview first, then confirm.
Poster lock behavior
When you upload a custom poster or select a specific one via the artwork tools, the server locks the thumb field so scheduled metadata refreshes cannot overwrite it. To allow Plex to choose the poster again, use movie_update_metadata or the Plex web UI to unlock the field.
plex_sync dry run
Always run plex_sync with dry_run=true first. The summary shows every item that would be changed and every GUID that didn't match. Unmatched items usually indicate the source has legacy agent GUIDs that need the mapping table extended — open an issue with the unmatched GUID strings.
License
AGPL-3.0 — free to use and modify, but if you deploy this as a service you must release your modifications under the same license.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/ericwarthan/Plex-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server