plex-mcp 0.3.0 → 0.4.0

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/Dockerfile ADDED
@@ -0,0 +1,18 @@
1
+ # Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config
2
+ # Auto-generated Dockerfile for Plex MCP Server
3
+ FROM node:lts-alpine AS base
4
+ WORKDIR /app
5
+
6
+ # Install dependencies
7
+ COPY package.json package-lock.json ./
8
+ RUN npm ci --ignore-scripts
9
+
10
+ # Copy source
11
+ COPY . .
12
+
13
+ # Default verify SSL
14
+ ENV PLEX_VERIFY_SSL=true
15
+
16
+ # Start the MCP server
17
+ USER non-root
18
+ CMD ["node", "index.js"]
package/README.md CHANGED
@@ -1,85 +1,18 @@
1
1
  # Plex MCP Server
2
+ [![smithery badge](https://smithery.ai/badge/@vyb1ng/plex-mcp)](https://smithery.ai/server/@vyb1ng/plex-mcp)
2
3
 
3
- A Model Context Protocol (MCP) server for searching Plex media libraries using Claude.
4
+ Search and manage your Plex media libraries with Claude. Actively developed by Claude and a nerdy human who mostly uses Plex for auditory delights and wanted to see how much could be accomplished without knowing much about what they're doing. Results may vary, but probably in a good way.
4
5
 
5
- ## Features
6
+ ## Quick Start
6
7
 
7
- - Search movies, TV shows, episodes, music, and other content in your Plex libraries
8
- - Filter by content type
9
- - Configurable result limits
10
- - Rich formatted results with metadata
11
- - **Direct Plex authentication with OAuth flow**
12
- - Support for both static tokens and interactive authentication
13
-
14
- ## Setup
15
-
16
- 1. Install dependencies:
17
- ```bash
18
- npm install
19
- ```
20
-
21
- 2. Configure your Plex connection (two options):
22
-
23
- **Option A: Interactive Authentication (Recommended)**
24
- - Set your Plex server URL:
25
- ```
26
- PLEX_URL=http://your-plex-server:32400
27
- ```
28
- - Use the `authenticate_plex` tool for OAuth login (see Authentication section below)
29
-
30
- **Option B: Static Token**
31
- - Set your Plex server URL and token:
32
- ```
33
- PLEX_URL=http://your-plex-server:32400
34
- PLEX_TOKEN=your_plex_token
35
- ```
36
- - Get your Plex token by visiting [Plex Token](https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/)
37
-
38
- ## Claude Desktop Configuration
39
-
40
- ### Option 1: Production (Using npx - Recommended)
41
-
42
- Add this configuration to your Claude Desktop settings for the stable published version:
43
-
44
- ```json
45
- {
46
- "mcpServers": {
47
- "plex": {
48
- "command": "npx",
49
- "args": ["plex-mcp"],
50
- "env": {
51
- "PLEX_URL": "http://your-plex-server:32400",
52
- "PLEX_TOKEN": "your_plex_token"
53
- }
54
- }
55
- }
56
- }
57
- ```
58
-
59
- ### Option 2: Development (Local)
60
-
61
- For development with your local code changes, add this configuration:
62
-
63
- ```json
64
- {
65
- "mcpServers": {
66
- "plex-dev": {
67
- "command": "node",
68
- "args": ["/path/to/your/plex-mcp/index.js"],
69
- "env": {
70
- "PLEX_URL": "http://your-plex-server:32400",
71
- "PLEX_TOKEN": "your_plex_token"
72
- }
73
- }
74
- }
75
- }
8
+ ### Install via Smithery (Recommended)
9
+ ```bash
10
+ npx -y @smithery/cli install @vyb1ng/plex-mcp --client claude
76
11
  ```
77
12
 
78
- Replace `/path/to/your/plex-mcp/` with the actual path to this project directory.
79
-
80
- ### Running Both Versions
13
+ ### Manual Setup for Claude Desktop
81
14
 
82
- You can configure both versions simultaneously by using different server names (`plex` and `plex-dev`):
15
+ Add to your Claude Desktop MCP settings:
83
16
 
84
17
  ```json
85
18
  {
@@ -88,119 +21,72 @@ You can configure both versions simultaneously by using different server names (
88
21
  "command": "npx",
89
22
  "args": ["plex-mcp"],
90
23
  "env": {
91
- "PLEX_URL": "http://your-plex-server:32400",
92
- "PLEX_TOKEN": "your_plex_token"
93
- }
94
- },
95
- "plex-dev": {
96
- "command": "node",
97
- "args": ["/path/to/your/plex-mcp/index.js"],
98
- "env": {
99
- "PLEX_URL": "http://your-plex-server:32400",
100
- "PLEX_TOKEN": "your_plex_token"
24
+ "PLEX_URL": "http://your-plex-server:32400"
101
25
  }
102
26
  }
103
27
  }
104
28
  }
105
29
  ```
106
30
 
107
- **Configuration Steps:**
108
- 1. Open Claude Desktop settings (Cmd/Ctrl + ,)
109
- 2. Navigate to the "MCP Servers" tab
110
- 3. Add the configuration above
111
- 4. Update `PLEX_URL` and `PLEX_TOKEN` with your Plex server details
112
- 5. Restart Claude Desktop
113
-
114
- ## Usage
115
-
116
- Run the MCP server standalone:
117
- ```bash
118
- node index.js
119
- ```
120
-
121
31
  ## Authentication
122
32
 
123
- The Plex MCP server supports two authentication methods:
124
-
125
- ### 1. Interactive OAuth Authentication (Recommended)
126
-
127
- Use the built-in OAuth flow for secure, interactive authentication:
128
-
129
- 1. **Start Authentication:**
130
- ```
131
- Use the authenticate_plex tool
132
- ```
133
- This will provide you with a Plex login URL and pin ID.
134
-
135
- 2. **Complete Login:**
136
- - Open the provided URL in your browser
137
- - Sign into your Plex account
138
- - Grant access to the MCP application
139
-
140
- 3. **Check Authentication Status:**
141
- ```
142
- Use the check_auth_status tool
143
- ```
144
- This confirms authentication completion and stores your token.
33
+ **Option 1: OAuth (Recommended)**
34
+ - Use the `authenticate_plex` tool to get a login URL
35
+ - Sign in through your browser
145
36
 
146
- 4. **Clear Authentication (Optional):**
147
- ```
148
- Use the clear_auth tool
149
- ```
150
- This removes stored credentials if needed.
37
+ **Option 2: Static Token**
38
+ - Add `"PLEX_TOKEN": "your_token"` to the env section
39
+ - Get your token from [Plex Support](https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/)
151
40
 
152
- ### 2. Static Token Authentication
41
+ **Note:** Replace `your-plex-server:32400` with your actual Plex server address and port.
153
42
 
154
- For automated setups or if you prefer manual token management:
43
+ ## What You Can Do
155
44
 
156
- 1. Obtain your Plex token from [Plex Support](https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/)
157
- 2. Set the `PLEX_TOKEN` environment variable
158
- 3. All tools will automatically use this token
45
+ **Search & Browse**
46
+ - Search movies, TV shows, music, and other content
47
+ - Browse libraries and collections
48
+ - View recently added content and watch history
159
49
 
160
- **Note:** The OAuth method takes precedence - if both are available, static tokens are used as fallback.
50
+ **Music Discovery**
51
+ - Natural language music discovery ("songs from the 90s", "rock bands I haven't heard")
52
+ - Smart recommendations based on listening patterns
53
+ - Intelligent randomization for variety and surprise
54
+ - Similar artist discovery and genre exploration
161
55
 
162
- ## MCP Tools
56
+ **Playlists**
57
+ - Create and manage playlists
58
+ - Add items to existing playlists
59
+ - Browse playlist contents
163
60
 
164
- ### Authentication Tools
61
+ **Media Info**
62
+ - Get detailed media information (codecs, bitrates, file sizes)
63
+ - Check watch status and progress
64
+ - View library statistics and listening stats
165
65
 
166
- #### authenticate_plex
167
- Start the Plex OAuth authentication flow.
66
+ ## Status
168
67
 
169
- **Parameters:** None
68
+ **✅ Working:** Search, browse, playlists, media info, library stats, watch history, collections, music discovery
170
69
 
171
- **Returns:** Login URL and pin ID for browser authentication.
70
+ **❌ Disabled:** Smart playlists (filter logic broken)
172
71
 
173
- #### check_auth_status
174
- Check if OAuth authentication is complete and retrieve the token.
72
+ **🚧 Planned:** Remote server browsing
175
73
 
176
- **Parameters:**
177
- - `pin_id` (string, optional): Specific pin ID to check
74
+ ## Development
178
75
 
179
- **Returns:** Authentication status and success confirmation.
76
+ Want to contribute? Point Claude at your local version:
180
77
 
181
- #### clear_auth
182
- Clear stored authentication credentials.
183
-
184
- **Parameters:** None
185
-
186
- **Returns:** Confirmation of credential removal.
187
-
188
- ### Content Tools
189
-
190
- #### search_plex
191
-
192
- Search for content in your Plex libraries.
193
-
194
- **Parameters:**
195
- - `query` (string, required): Search query
196
- - `type` (string, optional): Content type ("movie", "show", "episode", "artist", "album", "track")
197
- - `limit` (number, optional): Maximum results (default: 10)
198
-
199
- **Example:**
200
78
  ```json
201
79
  {
202
- "query": "Star Wars",
203
- "type": "movie",
204
- "limit": 5
80
+ "mcpServers": {
81
+ "plex-dev": {
82
+ "command": "node",
83
+ "args": ["/path/to/plex-mcp/index.js"],
84
+ "env": {
85
+ "PLEX_URL": "http://your-plex-server:32400"
86
+ }
87
+ }
88
+ }
205
89
  }
206
- ```
90
+ ```
91
+
92
+ It works for us. If it doesn't work for you, well we tried. Hit us up, we don't bite. Much.