get_library_statsLABSCO SUMMARY
Your movie library, answerable as a question.
Genre, director and year-range searches, plus the full genre and director lists, let you ask what is in the collection rather than scrolling it — what have I got by this director, anything from the seventies. It covers movies today; the repository describes the architecture as extensible to TV, but that is not what ships.
What it is
A Python server against a Plex Media Server's API, focused on movies: browse and search the collection, filter by genre, director or year range, and read library statistics.
What you get
- Overall library statistics
- Every movie browsable with pagination
- Search by title, by genre, by director, or by a year range
- The full genre and director lists in the library
- Recently added movies
Requirements
Python 3.8 or higher, and network access to a Plex Media Server. Two values in .env: the address of that server on your network, and your Plex authentication token. ./setup.sh builds the virtualenv, then the server runs with python main.py.
Setup effort
Build from source — git clone https://github.com/richarddas/plex_mcp_server.git
USE CASES
Picking something to watch
Search by genre or year range and get a short list instead of scrolling the whole library.
Finding out whether you already own it
Search by title before buying or downloading it again.
Following a director
Pull everything by them, and read the full director list to see who else is well represented.
Seeing what is new
Read the recently added movies rather than sorting the library by date.
Taking stock of the collection
Read the library statistics and the genre list to see where it is thin.
Browsing a large library in pieces
List all movies with pagination rather than pulling thousands of titles at once.
9 tools
Listed in project docs. Your client may show a different list.
list_all_moviessearch_moviessearch_by_genresearch_by_directorsearch_by_year_rangeget_all_genresget_all_directorsget_recent_moviesBEFORE YOU INSTALL
What to know first
Tools you get
9 tools named in the project's documentation.
Requires
- npx on PATH
- Python 3.8 or later
- A Plex Media Server with an accessible API
- PLEX_TOKEN in your environment
INSTALLATION
Connect your client
Server setup
# Clone the repository
git clone https://github.com/richarddas/plex_mcp_server.git
cd plex_mcp_server
# Run the setup script (creates venv and installs dependencies)
./setup.sh
# Edit your Plex details
nano .env
# Activate virtual environment and start the server
source venv/bin/activate
python main.pyMCP Clients
Claude Desktop
{
"mcpServers": {
"plex": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://<YOUR_SERVER>:8000/sse",
"--allow-http"
]
}
}
}<YOUR_SERVER> is the host running python main.py (localhost if it is this machine). The server listens on PORT from .env, 8000 by default.
Put PLEX_URL (your Plex server, e.g. http://localhost:32400) and PLEX_TOKEN in the .env file the setup step opens; the client block itself carries no token.