plex-mcp 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -1
- package/package.json +13 -6
- package/.claude/settings.local.json +0 -17
- package/README.txt~ +0 -198
- package/package-lock.json~ +0 -4715
- package/package.json~ +0 -25
package/README.md
CHANGED
@@ -30,9 +30,58 @@ A Model Context Protocol (MCP) server for searching Plex media libraries using C
|
|
30
30
|
- Click "Show" next to "Plex Pass Subscription"
|
31
31
|
- Your token will be displayed
|
32
32
|
|
33
|
+
## Claude Desktop Configuration
|
34
|
+
|
35
|
+
### Option 1: Using npx (Recommended)
|
36
|
+
|
37
|
+
Add this configuration to your Claude Desktop settings:
|
38
|
+
|
39
|
+
```json
|
40
|
+
{
|
41
|
+
"mcpServers": {
|
42
|
+
"plex": {
|
43
|
+
"command": "npx",
|
44
|
+
"args": ["plex-mcp"],
|
45
|
+
"env": {
|
46
|
+
"PLEX_URL": "http://your-plex-server:32400",
|
47
|
+
"PLEX_TOKEN": "your_plex_token"
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
```
|
53
|
+
|
54
|
+
### Option 2: Local development
|
55
|
+
|
56
|
+
For local development, add this configuration:
|
57
|
+
|
58
|
+
```json
|
59
|
+
{
|
60
|
+
"mcpServers": {
|
61
|
+
"plex": {
|
62
|
+
"command": "node",
|
63
|
+
"args": ["/path/to/your/plex-mcp/index.js"],
|
64
|
+
"env": {
|
65
|
+
"PLEX_URL": "http://your-plex-server:32400",
|
66
|
+
"PLEX_TOKEN": "your_plex_token"
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
```
|
72
|
+
|
73
|
+
Replace `/path/to/your/plex-mcp/` with the actual path to this project directory.
|
74
|
+
|
75
|
+
**Configuration Steps:**
|
76
|
+
1. Open Claude Desktop settings (Cmd/Ctrl + ,)
|
77
|
+
2. Navigate to the "MCP Servers" tab
|
78
|
+
3. Add the configuration above
|
79
|
+
4. Update `PLEX_URL` and `PLEX_TOKEN` with your Plex server details
|
80
|
+
5. Restart Claude Desktop
|
81
|
+
|
33
82
|
## Usage
|
34
83
|
|
35
|
-
Run the MCP server:
|
84
|
+
Run the MCP server standalone:
|
36
85
|
```bash
|
37
86
|
node index.js
|
38
87
|
```
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "plex-mcp",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.2",
|
4
4
|
"description": "A Model Context Protocol (MCP) server that enables Claude to query and manage Plex media libraries.",
|
5
5
|
"main": "index.js",
|
6
6
|
"bin": {
|
@@ -13,21 +13,28 @@
|
|
13
13
|
"test:coverage": "jest --coverage",
|
14
14
|
"prepublishOnly": "npm test",
|
15
15
|
"version:patch": "npm version patch",
|
16
|
-
"version:minor": "npm version minor",
|
16
|
+
"version:minor": "npm version minor",
|
17
17
|
"version:major": "npm version major",
|
18
18
|
"release": "npm publish"
|
19
19
|
},
|
20
|
-
"keywords": [
|
20
|
+
"keywords": [
|
21
|
+
"mcp",
|
22
|
+
"plex",
|
23
|
+
"model-context-protocol",
|
24
|
+
"claude",
|
25
|
+
"media",
|
26
|
+
"server"
|
27
|
+
],
|
21
28
|
"author": "",
|
22
29
|
"license": "ISC",
|
23
30
|
"repository": {
|
24
31
|
"type": "git",
|
25
|
-
"url": "git+https://github.com/
|
32
|
+
"url": "git+https://github.com/vyb1ng/plex-mcp.git"
|
26
33
|
},
|
27
34
|
"bugs": {
|
28
|
-
"url": "https://github.com/
|
35
|
+
"url": "https://github.com/vyb1ng/plex-mcp/issues"
|
29
36
|
},
|
30
|
-
"homepage": "https://github.com/
|
37
|
+
"homepage": "https://github.com/vyb1ng/plex-mcp#readme",
|
31
38
|
"type": "commonjs",
|
32
39
|
"dependencies": {
|
33
40
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
@@ -1,17 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"permissions": {
|
3
|
-
"allow": [
|
4
|
-
"Bash(mkdir:*)",
|
5
|
-
"Bash(npm test)",
|
6
|
-
"Bash(npm run test:coverage:*)",
|
7
|
-
"Bash(grep:*)",
|
8
|
-
"Bash(npm test:*)",
|
9
|
-
"Bash(node:*)",
|
10
|
-
"Bash(rg:*)",
|
11
|
-
"Bash(/opt/homebrew/Cellar/ripgrep/14.1.1/bin/rg -n -A 10 -B 5 \"POST\" /Users/blutharsch/src/plex/mcp/index.js)",
|
12
|
-
"Bash(rm:*)",
|
13
|
-
"Bash(touch:*)"
|
14
|
-
],
|
15
|
-
"deny": []
|
16
|
-
}
|
17
|
-
}
|
package/README.txt~
DELETED
@@ -1,198 +0,0 @@
|
|
1
|
-
================================================================================
|
2
|
-
PLEX MCP SERVER
|
3
|
-
Model Context Protocol Server for Plex
|
4
|
-
================================================================================
|
5
|
-
|
6
|
-
DESCRIPTION
|
7
|
-
-----------
|
8
|
-
A comprehensive MCP (Model Context Protocol) server that provides AI assistants
|
9
|
-
with full access to your Plex Media Server. Search, browse, manage playlists,
|
10
|
-
analyze listening habits, and get detailed media information through a rich set
|
11
|
-
of tools.
|
12
|
-
|
13
|
-
FEATURES
|
14
|
-
--------
|
15
|
-
• Search across all Plex libraries with advanced filtering
|
16
|
-
• Browse libraries, collections, and recently added content
|
17
|
-
• Comprehensive playlist management (create, modify, delete)
|
18
|
-
• Watch history and continue watching (On Deck) access
|
19
|
-
• Music listening statistics and recommendations
|
20
|
-
• Advanced content filtering (genre, year, rating, resolution, audio format)
|
21
|
-
• Media file analysis and codec information
|
22
|
-
• Library storage and usage analytics
|
23
|
-
• Activity-based filtering (play counts, last played dates)
|
24
|
-
|
25
|
-
REQUIREMENTS
|
26
|
-
------------
|
27
|
-
• Node.js 14+
|
28
|
-
• Plex Media Server with API access
|
29
|
-
• Valid Plex authentication token
|
30
|
-
|
31
|
-
INSTALLATION
|
32
|
-
------------
|
33
|
-
1. Clone this repository
|
34
|
-
2. Install dependencies:
|
35
|
-
npm install
|
36
|
-
|
37
|
-
3. Set environment variables:
|
38
|
-
export PLEX_URL="http://your-plex-server:32400"
|
39
|
-
export PLEX_TOKEN="your-plex-token"
|
40
|
-
|
41
|
-
4. Run the server:
|
42
|
-
node index.js
|
43
|
-
|
44
|
-
GETTING YOUR PLEX TOKEN
|
45
|
-
-----------------------
|
46
|
-
1. Sign in to Plex Web App
|
47
|
-
2. Open browser developer tools (F12)
|
48
|
-
3. Go to Network tab
|
49
|
-
4. Refresh the page
|
50
|
-
5. Look for requests to plex.tv with X-Plex-Token header
|
51
|
-
6. Copy the token value
|
52
|
-
|
53
|
-
AVAILABLE TOOLS
|
54
|
-
---------------
|
55
|
-
|
56
|
-
SEARCH & BROWSE:
|
57
|
-
• search_plex - Search across all libraries with filters
|
58
|
-
• browse_libraries - List all available Plex libraries
|
59
|
-
• browse_library - Browse content within a specific library
|
60
|
-
• browse_collections - List all Plex collections
|
61
|
-
• browse_collection - View contents of a specific collection
|
62
|
-
• get_recently_added - Show recently added content
|
63
|
-
|
64
|
-
ACTIVITY & HISTORY:
|
65
|
-
• get_watch_history - View playback history with filtering
|
66
|
-
• get_on_deck - Show continue watching items
|
67
|
-
• get_watched_status - Check watched status of content
|
68
|
-
• get_listening_stats - Music analytics and recommendations
|
69
|
-
|
70
|
-
PLAYLIST MANAGEMENT:
|
71
|
-
• list_playlists - Show all playlists with filtering
|
72
|
-
• create_playlist - Create new playlists (regular or smart)
|
73
|
-
• add_to_playlist - Add items to existing playlists
|
74
|
-
• remove_from_playlist- Remove items from playlists
|
75
|
-
• delete_playlist - Delete playlists
|
76
|
-
|
77
|
-
MEDIA INFO & STATS:
|
78
|
-
• get_media_info - Detailed file and codec information
|
79
|
-
• get_library_stats - Storage and usage analytics
|
80
|
-
|
81
|
-
FILTERING OPTIONS
|
82
|
-
-----------------
|
83
|
-
|
84
|
-
BASIC FILTERS (search_plex, browse_library):
|
85
|
-
• genre - Filter by genre (Action, Comedy, Rock, etc.)
|
86
|
-
• year - Specific release year
|
87
|
-
• year_min/year_max - Year range filtering
|
88
|
-
• studio - Studio or record label
|
89
|
-
• director/writer/actor - Cast and crew filtering
|
90
|
-
• rating_min/rating_max - Rating range (0-10 scale)
|
91
|
-
• duration_min/duration_max - Duration in minutes
|
92
|
-
• added_after/added_before - Date-based filtering
|
93
|
-
|
94
|
-
ACTIVITY FILTERS:
|
95
|
-
• play_count_min/max - Filter by play count range
|
96
|
-
• never_played - Show only unplayed content
|
97
|
-
• last_played_after/before - Filter by last played date
|
98
|
-
• played_in_last_days - Recently played content
|
99
|
-
|
100
|
-
ADVANCED FILTERS:
|
101
|
-
• content_rating - Content rating (G, PG, PG-13, R, etc.)
|
102
|
-
• resolution - Video resolution (4k, 1080, 720, sd)
|
103
|
-
• audio_format - Audio codec or quality (lossless, lossy, flac, etc.)
|
104
|
-
• file_size_min/max - File size filtering in MB
|
105
|
-
|
106
|
-
USAGE EXAMPLES
|
107
|
-
--------------
|
108
|
-
|
109
|
-
Search for action movies from 2020-2023:
|
110
|
-
{
|
111
|
-
"tool": "search_plex",
|
112
|
-
"arguments": {
|
113
|
-
"query": "action",
|
114
|
-
"type": "movie",
|
115
|
-
"genre": "Action",
|
116
|
-
"year_min": 2020,
|
117
|
-
"year_max": 2023
|
118
|
-
}
|
119
|
-
}
|
120
|
-
|
121
|
-
Browse music library for highly-rated albums never played:
|
122
|
-
{
|
123
|
-
"tool": "browse_library",
|
124
|
-
"arguments": {
|
125
|
-
"library_id": "3",
|
126
|
-
"type": "album",
|
127
|
-
"rating_min": 8,
|
128
|
-
"never_played": true,
|
129
|
-
"sort": "rating"
|
130
|
-
}
|
131
|
-
}
|
132
|
-
|
133
|
-
Get listening stats for the past month:
|
134
|
-
{
|
135
|
-
"tool": "get_listening_stats",
|
136
|
-
"arguments": {
|
137
|
-
"period": "month",
|
138
|
-
"include_recommendations": true
|
139
|
-
}
|
140
|
-
}
|
141
|
-
|
142
|
-
TESTING
|
143
|
-
-------
|
144
|
-
Run the test suite:
|
145
|
-
npm test
|
146
|
-
|
147
|
-
Run specific test suites:
|
148
|
-
npm test -- --testPathPattern=parsers.test.js
|
149
|
-
npm test -- --testPathPattern=handlers.test.js
|
150
|
-
|
151
|
-
DEVELOPMENT
|
152
|
-
-----------
|
153
|
-
The server is built using:
|
154
|
-
• Node.js with axios for HTTP requests
|
155
|
-
• Jest for testing with comprehensive unit and integration tests
|
156
|
-
• MCP (Model Context Protocol) for AI assistant integration
|
157
|
-
|
158
|
-
Project structure:
|
159
|
-
index.js - Main server implementation
|
160
|
-
tests/
|
161
|
-
unit/ - Unit tests for parsers, formatters, filters
|
162
|
-
integration/ - Integration tests for handlers
|
163
|
-
fixtures/ - Test data and mocks
|
164
|
-
|
165
|
-
ENVIRONMENT VARIABLES
|
166
|
-
---------------------
|
167
|
-
Required:
|
168
|
-
• PLEX_URL - Your Plex server URL (e.g., http://localhost:32400)
|
169
|
-
• PLEX_TOKEN - Your Plex authentication token
|
170
|
-
|
171
|
-
Optional:
|
172
|
-
• NODE_ENV - Set to 'development' for debug logging
|
173
|
-
|
174
|
-
TROUBLESHOOTING
|
175
|
-
---------------
|
176
|
-
• Ensure Plex server is running and accessible
|
177
|
-
• Verify PLEX_TOKEN is valid and has proper permissions
|
178
|
-
• Check network connectivity between server and Plex
|
179
|
-
• Enable debug logging with NODE_ENV=development
|
180
|
-
|
181
|
-
For 401 Unauthorized errors, regenerate your Plex token.
|
182
|
-
For connection errors, verify PLEX_URL and network settings.
|
183
|
-
|
184
|
-
LICENSE
|
185
|
-
-------
|
186
|
-
This project is open source. See LICENSE file for details.
|
187
|
-
|
188
|
-
CONTRIBUTING
|
189
|
-
------------
|
190
|
-
1. Fork the repository
|
191
|
-
2. Create a feature branch
|
192
|
-
3. Add tests for new functionality
|
193
|
-
4. Ensure all tests pass
|
194
|
-
5. Submit a pull request
|
195
|
-
|
196
|
-
================================================================================
|
197
|
-
For support and updates, visit: https://github.com/your-username/plex-mcp
|
198
|
-
================================================================================
|