loading…
Search for a command to run...
loading…
Enables users to manage and control their Plex media library through natural language commands in MCP-compatible AI clients. It supports searching content, mana
Enables users to manage and control their Plex media library through natural language commands in MCP-compatible AI clients. It supports searching content, managing playlists, tracking library statistics, and monitoring live viewing sessions.
🎬 MCP (Model Context Protocol) server for managing your Plex library through AI assistants like Claude.
Plex Assistant MCP enables you to control Plex directly from Claude Desktop or any MCP-compatible client. Search for content, manage playlists, mark items as watched, and get library statistics using natural language!
# Create project directory
mkdir plex-assistant-mcp
cd plex-assistant-mcp
# Or clone if you have a repo
git clone https://github.com/yourusername/plex-assistant-mcp.git
cd plex-assistant-mcp
# Initialize Python project
uv init
# Install dependencies
uv sync
Create a .env file at the project root:
PLEX_URL=http://your-ip:32400
PLEX_TOKEN=your-plex-auth-token
Method 1: Using PlexAPI (Automatic)
python3 -c "from plexapi.myplex import MyPlexAccount; account = MyPlexAccount(username='your-email', password='your-password'); print(account.authenticationToken)"
Method 2: Browser DevTools
plex.tvX-Plex-Token - copy that valueMethod 3: Plex Settings
Edit your Claude Desktop configuration file:
Windows:
%APPDATA%\Claude\claude_desktop_config.json
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Linux:
~/.config/Claude/claude_desktop_config.json
Add the following MCP server configuration:
{
"mcpServers": {
"plex-assistant": {
"command": "uv",
"args": [
"--directory",
"C:/Users/YourUsername/Documents/plex-assistant-mcp",
"run",
"src/plex_assistant_mcp/main.py"
],
"env": {
"PLEX_URL": "http://localhost:32400",
"PLEX_TOKEN": "your-actual-token-here"
}
}
}
}
Important:
--directory path to match your installationPLEX_URL with your actual Plex server addressPLEX_TOKEN with your actual authentication tokenClose and reopen Claude Desktop. The Plex tools will now be available!
"Search for The Matrix in my library"
"Find all movies from 2024"
"Show me TV shows with drama in the title"
"How many items do I have in my Plex library?"
"Show me my movie library statistics"
"What libraries do I have?"
"Who's watching something right now?"
"Show me current Plex sessions"
"Mark The Dark Knight as watched"
"Add Oppenheimer to my watchlist"
"Mark this show as unwatched"
"Create a playlist called Favorites"
"Show me all my playlists"
"Get my available playlists"
"Add this to my Sci-Fi collection"
"Mark Inception as part of my Best Movies collection"
| Tool | Description |
|---|---|
test_plex_connection |
Test connection to Plex server |
get_server_info |
Get Plex server details |
get_libraries |
List all media libraries |
get_library_statistics |
Get library statistics and breakdown |
search_content |
Search across all libraries |
search_in_library |
Search within a specific library |
get_currently_playing |
See active sessions and what's being watched |
get_playlists |
List all playlists |
create_playlist |
Create a new playlist |
add_to_watchlist |
Add item to watchlist |
toggle_watched |
Mark content as watched/unwatched |
mark_collection |
Add item to a collection |
export PLEX_URL="http://your-ip:32400"
export PLEX_TOKEN="your-token"
uv run src/plex_assistant_mcp/main.py
The server will start and wait for MCP commands via stdio.
python3 << 'EOF'
from src.plex_assistant_mcp.plex_client import PlexClient
import os
client = PlexClient(
os.getenv("PLEX_URL", "http://localhost:32400"),
os.getenv("PLEX_TOKEN", "")
)
print("Connection test:", client.test_connection())
print("Server info:", client.get_server_info())
EOF
plex-assistant-mcp/
├── src/
│ └── plex_assistant_mcp/
│ ├── __init__.py # Package initialization
│ ├── main.py # MCP server entry point
│ ├── plex_client.py # Plex API wrapper
│ └── tools.py # MCP tool definitions & handlers
├── pyproject.toml # Project configuration
├── requirements.txt # Python dependencies
├── .env.example # Example environment variables
└── README.md # This file
PLEX_TOKEN environment variable not setSolution: Make sure your .env file exists and contains:
PLEX_URL=http://your-ip:32400
PLEX_TOKEN=your-token
Connection refused or Unable to connectSolutions:
PLEX_URL is correct (including IP and port)http://your-ip:32400HTTP 401: UnauthorizedSolutions:
PLEX_TOKEN is correctNo results found for searchSolutions:
Solutions:
--directory path is correct# Connection
test_connection() -> bool
# Server & Libraries
get_server_info() -> Dict[str, Any]
get_libraries() -> List[Dict[str, Any]]
get_library_statistics() -> Dict[str, Any]
# Search & Discovery
search(query: str, limit: int = 20) -> List[Dict[str, Any]]
search_in_library(query: str, library_key: str, media_type: str = "") -> List[Dict[str, Any]]
find_item(title: str) -> Optional[Dict[str, Any]]
# Sessions
get_currently_playing() -> List[Dict[str, Any]]
# Playlists
get_playlists() -> List[Dict[str, Any]]
create_playlist(title: str, items: Optional[List] = None, description: str = "") -> Dict[str, Any]
# Content Management
set_watched(item_key: str) -> bool
set_unwatched(item_key: str) -> bool
add_to_collection(item_key: str, collection_name: str) -> bool
remove_from_collection(item_key: str, collection_name: str) -> bool
Contributions are welcome! Feel free to:
This project is open source and available under the MIT License.
This project is not officially affiliated with Plex or Anthropic. Use at your own risk and ensure you have proper authorization to access your Plex server.
Made with ❤️ for Plex enthusiasts who want AI-powered library management
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"plex-assistant-mcp": {
"command": "npx",
"args": []
}
}
}Transcripts, channel stats, search
AI image generation using various models.
Unified GPU inference API with 30 AI services (LLM, image gen, video, TTS, whisper, embeddings, reranking, OCR) as MCP tools. Pay-per-use via x402 USDC or API k
A powerful image generation tool using Google's Imagen 3.0 API through MCP. Generate high-quality images from text prompts with advanced photography, artistic,