Plex MCP Server creates a unified API layer on top of the Plex Media Server API, offering:
shell
pip install -r requirements.txt
.env
file based on the .env.example
:shell
cp .env.example .env
.env
file:env
PLEX_URL=http://your-plex-server:32400
PLEX_TOKEN=your-plex-token
The server can be run in two transport modes: stdio (Standard Input/Output) or SSE (Server-Sent Events). Each mode is suitable for different integration scenarios.
The stdio transport is ideal for direct integration with applications like Claude Desktop or Cursor. It accepts commands via standard input and outputs results to standard output in JSON format.
Basic command line usage:
python3 -m plex_mcp
or
python3 plex_mcp_server.py --transport stdio
Add this configuration to your application's settings:
{
"plex": {
"command": "python",
"args": [
"C://Users//User//Documents//plex-mcp-server//plex_mcp_server.py",
"--transport=stdio"
],
"env": {
"PLEX_URL":"http://localhost:32400",
"PLEX_TOKEN":"av3khi56h634v3",
"PLEX_USERNAME:"Administrator"
}
}
}
The Server-Sent Events (SSE) transport provides a web-based interface for integration with web applications and services.
Start the server:
python3 plex_mcp_server.py --transport sse --host 0.0.0.0 --port 3001
Default options:
/sse
/messages/
When the server is running in SSE mode, configure your client to connect using:
{
"plex": {
"url": "http://localhost:3001/sse"
}
}
With SSE, you can connect to the server via web applications or tools that support SSE connections.
Note: The Client Module functionality is currently limited and not fully implemented. Some features may not work as expected or may be incomplete.
All commands return standardized JSON responses for maximum compatibility with various tools, automation platforms, and AI systems. This consistent structure makes it easy to process responses programmatically.
For successful operations, the response typically includes:
{
"success_field": true,
"relevant_data": "value",
"additional_info": {}
}
For errors, the response format is:
{
"error": "Error message describing what went wrong"
}
For multiple matches (when searching by title), results are returned as an array of objects with identifying information:
[
{
"title": "Item Title",
"id": 12345,
"type": "movie",
"year": 2023
},
{
"title": "Another Item",
"id": 67890,
"type": "show",
"year": 2022
}
]
For development and debugging, you can use the included watcher.py
script which monitors for changes and automatically restarts the server.
[Include your license information here]
MCP Server for Plex to allow LLMs to converse with Plex.
No releases published
No packages published