Labsco
richarddas logo

Plex MCP Server

from richarddas

An MCP server for managing your Plex media library with AI assistants.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

Plex MCP Server

A Model Context Protocol (MCP) server for Plex media management, enabling AI assistants like Claude to interact with your Plex library.

Features

  • Movie Management: Search, browse, and analyze your movie collection
  • Library Statistics: Get insights into your media collection
  • Genre & Director Search: Find content by specific criteria
  • Recent Additions: Track newly added content
  • Extensible Architecture: Easy to add TV shows and other media types

Available Tools

Movie Tools

  • get_library_stats - Overall library statistics
  • list_all_movies - Browse all movies with pagination
  • search_movies - Search by title
  • search_by_genre - Find movies by genre
  • search_by_director - Find movies by director
  • search_by_year_range - Find movies by year range
  • get_all_genres - List all available genres
  • get_all_directors - List all directors
  • get_recent_movies - Recently added movies

Project Structure

plex_mcp_server/
โ”œโ”€โ”€ main.py              # FastAPI server
โ”œโ”€โ”€ config.py            # Configuration
โ”œโ”€โ”€ plex_client.py       # Plex connection
โ”œโ”€โ”€ mcp_handler.py       # MCP message handling
โ”œโ”€โ”€ tools/
โ”‚   โ”œโ”€โ”€ movie_tools.py   # Movie-related tools
โ”‚   โ””โ”€โ”€ tv_tools.py      # TV tools (future)
โ””โ”€โ”€ requirements.txt     # Dependencies

Development

To add new tools:

  1. Add methods to the appropriate tools file
  2. Update the get_tool_definitions() method
  3. Register the tool in mcp_handler.py