Plex MCP Server
An MCP server for managing your Plex media library with AI assistants.
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
Requirements
- Python 3.8 or higher
- Plex Media Server with accessible API
- Network access to your Plex server
Setup
Quick Setup (Recommended)
# 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.py
Manual Setup
-
Create and activate virtual environment:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install --upgrade pip pip install -r requirements.txt -
Configure environment variables:
cp .env.example .env nano .envUpdate the values in
.env:PLEX_URL: Your Plex server URL (e.g.,http://192.168.1.100:32400)PLEX_TOKEN: Your Plex authentication token (How to find it)HOSTandPORT: Server binding (defaults are fine for most setups)LOG_LEVEL: Logging verbosity (INFO recommended)
-
Run the server:
python main.py
Daily Usage
After initial setup, to run the server:
cd plex-mcp-server
source venv/bin/activate # Activate virtual environment
python main.py # Start server
# When done: deactivate # Exit virtual environment
Claude Desktop Configuration
Add to your Claude Desktop config.json:
{
"globalShortcut": "",
"mcpServers": {
"plex": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://your-server:8000/sse",
"--allow-http"
]
}
}
}
Available Tools
Movie Tools
get_library_stats- Overall library statisticslist_all_movies- Browse all movies with paginationsearch_movies- Search by titlesearch_by_genre- Find movies by genresearch_by_director- Find movies by directorsearch_by_year_range- Find movies by year rangeget_all_genres- List all available genresget_all_directors- List all directorsget_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:
- Add methods to the appropriate tools file
- Update the
get_tool_definitions()method - Register the tool in
mcp_handler.py
License
MIT License
Related Servers
Weather
Provides real-time weather information for any location.
MCP Kali Server
A comprehensive Model Context Protocol (MCP) server for penetration testing and cybersecurity operations, providing seamless integration between Kali Linux tools and MCP-compatible clients.
FinancialData.Net MCP Server
Stock Market & Financial Data MCP Server – FinancialData.Net
xmcp.dev
The TypeScript framework for building & shipping MCP servers
KSeF
MCP server for Poland's national e-invoicing system KSeF (Krajowy System e-Faktur). Provides 12 tools for complete KSeF API integration including session management, invoice querying/submission, export generation, and system monitoring. Built with Rust for reliability and performance. Perfect for Polish businesses automating e-invoicing processes and developers building KSeF compliance tools.
Airplane.Live MCP Server
MCP server that connects to the Airplanes.live API to provide real-time flight and aircraft data for analysis or visualization.
Time MCP Server
Enables time awareness for large language models.
Image Reader
A server for extracting and understanding content from images.
Lcontext
An MCP server that exposes user behavior as queryable data for AI coding agents.
Stumpy
Persistent AI agents that run 24/7 in your Slack, Telegram, SMS, or email