reddit-mcp-server 1.5.3 → 1.6.1
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 +69 -61
- package/dist/bin.js +2 -2
- package/dist/index.js +267 -56
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -26,8 +26,8 @@ A Model Context Protocol (MCP) server for interacting with Reddit - fetch posts,
|
|
|
26
26
|
| Search Reddit | :white_check_mark: | :white_check_mark: |
|
|
27
27
|
| User Analysis | :white_check_mark: | :white_check_mark: |
|
|
28
28
|
| Post Comments | :white_check_mark: | :white_check_mark: |
|
|
29
|
-
|
|
|
30
|
-
|
|
|
29
|
+
| OAuth Auth (60-100 rpm) | :white_check_mark: | :white_check_mark: |
|
|
30
|
+
| **RSS Fallback (zero-setup)** | :white_check_mark: | :x: |
|
|
31
31
|
|
|
32
32
|
## Quick Start
|
|
33
33
|
|
|
@@ -39,18 +39,18 @@ Download and open the extension file - Claude Desktop will install it automatica
|
|
|
39
39
|
|
|
40
40
|
### Option 2: NPX (No install required)
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
npx reddit-mcp-server
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Or add to your MCP config (Claude Desktop, Cursor, etc.):
|
|
42
|
+
Add to your MCP config (Claude Desktop, Cursor, etc.) with Reddit OAuth credentials:
|
|
47
43
|
|
|
48
44
|
```json
|
|
49
45
|
{
|
|
50
46
|
"mcpServers": {
|
|
51
47
|
"reddit": {
|
|
52
48
|
"command": "npx",
|
|
53
|
-
"args": ["reddit-mcp-server"]
|
|
49
|
+
"args": ["reddit-mcp-server"],
|
|
50
|
+
"env": {
|
|
51
|
+
"REDDIT_CLIENT_ID": "your_client_id",
|
|
52
|
+
"REDDIT_CLIENT_SECRET": "your_client_secret"
|
|
53
|
+
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -59,7 +59,8 @@ Or add to your MCP config (Claude Desktop, Cursor, etc.):
|
|
|
59
59
|
### Option 3: Claude Code
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
-
|
|
62
|
+
REDDIT_CLIENT_ID=your_client_id REDDIT_CLIENT_SECRET=your_client_secret \
|
|
63
|
+
claude mcp add --transport stdio reddit -- npx reddit-mcp-server
|
|
63
64
|
```
|
|
64
65
|
|
|
65
66
|
## Features
|
|
@@ -81,35 +82,37 @@ claude mcp add --transport stdio reddit -- npx reddit-mcp-server
|
|
|
81
82
|
|
|
82
83
|
### Write Tools (Require User Credentials)
|
|
83
84
|
|
|
84
|
-
| Tool | Description
|
|
85
|
-
| ---------------- |
|
|
86
|
-
| `create_post` | Create a new post in a subreddit
|
|
87
|
-
| `reply_to_post` | Post a reply to an existing post or comment
|
|
88
|
-
| `edit_post` | Edit your own Reddit post (self-text only)
|
|
89
|
-
| `edit_comment` | Edit your own Reddit comment
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
85
|
+
| Tool | Description |
|
|
86
|
+
| ---------------- | ---------------------------------------------- |
|
|
87
|
+
| `create_post` | Create a new post in a subreddit |
|
|
88
|
+
| `reply_to_post` | Post a reply to an existing post or comment |
|
|
89
|
+
| `edit_post` | Edit your own Reddit post (self-text only) |
|
|
90
|
+
| `edit_comment` | Edit your own Reddit comment |
|
|
91
|
+
| `save_content` | Save a post or comment to your account |
|
|
92
|
+
| `unsave_content` | Remove a post or comment from your saved items |
|
|
93
|
+
| `delete_post` | Permanently delete your own post |
|
|
94
|
+
| `delete_comment` | Permanently delete your own comment |
|
|
92
95
|
|
|
93
96
|
## Configuration
|
|
94
97
|
|
|
95
98
|
### Environment Variables
|
|
96
99
|
|
|
97
|
-
| Variable | Required | Default | Description
|
|
98
|
-
| ----------------------- | -------- | -------------- |
|
|
99
|
-
| `REDDIT_CLIENT_ID` |
|
|
100
|
-
| `REDDIT_CLIENT_SECRET` |
|
|
101
|
-
| `REDDIT_USERNAME` | No | - | Reddit username (for write operations)
|
|
102
|
-
| `REDDIT_PASSWORD` | No | - | Reddit password (for write operations)
|
|
103
|
-
| `REDDIT_USER_AGENT` | No | Auto-generated | Custom User-Agent string
|
|
104
|
-
| `REDDIT_AUTH_MODE` | No | `auto` | Authentication mode: `auto`, `authenticated
|
|
105
|
-
| `REDDIT_SAFE_MODE` | No | `standard` | Write safeguards: `off`, `standard`, `strict`
|
|
106
|
-
| `REDDIT_BOT_DISCLOSURE` | No | `off` | Bot disclosure footer: `auto`, `off`
|
|
107
|
-
| `REDDIT_BOT_FOOTER` | No | Built-in | Custom bot footer text (when disclosure is `auto`)
|
|
108
|
-
| `REDDIT_CACHE` | No | `on` | In-memory caching of read requests: `on`, `off`
|
|
109
|
-
| `REDDIT_CACHE_MAX_MB` | No | `50` | Cache size cap in MB (LRU eviction beyond this)
|
|
110
|
-
| `REDDIT_MAX_RETRIES` | No | `3` | Retries on HTTP 429 with Retry-After backoff (`0` to disable)
|
|
111
|
-
|
|
112
|
-
|
|
100
|
+
| Variable | Required | Default | Description |
|
|
101
|
+
| ----------------------- | -------- | -------------- | --------------------------------------------------------------------- |
|
|
102
|
+
| `REDDIT_CLIENT_ID` | Yes | - | Reddit app client ID (OAuth required since mid-2026) |
|
|
103
|
+
| `REDDIT_CLIENT_SECRET` | Yes | - | Reddit app client secret |
|
|
104
|
+
| `REDDIT_USERNAME` | No | - | Reddit username (for write operations) |
|
|
105
|
+
| `REDDIT_PASSWORD` | No | - | Reddit password (for write operations) |
|
|
106
|
+
| `REDDIT_USER_AGENT` | No | Auto-generated | Custom User-Agent string |
|
|
107
|
+
| `REDDIT_AUTH_MODE` | No | `auto` | Authentication mode: `auto`, `authenticated` (`anonymous` deprecated) |
|
|
108
|
+
| `REDDIT_SAFE_MODE` | No | `standard` | Write safeguards: `off`, `standard`, `strict` |
|
|
109
|
+
| `REDDIT_BOT_DISCLOSURE` | No | `off` | Bot disclosure footer: `auto`, `off` |
|
|
110
|
+
| `REDDIT_BOT_FOOTER` | No | Built-in | Custom bot footer text (when disclosure is `auto`) |
|
|
111
|
+
| `REDDIT_CACHE` | No | `on` | In-memory caching of read requests: `on`, `off` |
|
|
112
|
+
| `REDDIT_CACHE_MAX_MB` | No | `50` | Cache size cap in MB (LRU eviction beyond this) |
|
|
113
|
+
| `REDDIT_MAX_RETRIES` | No | `3` | Retries on HTTP 429 with Retry-After backoff (`0` to disable) |
|
|
114
|
+
|
|
115
|
+
Reddit closed self-service app creation in November 2025. See [Authentication](#authentication) for how to get credentials.
|
|
113
116
|
|
|
114
117
|
### Full MCP Config Example
|
|
115
118
|
|
|
@@ -193,59 +196,64 @@ export REDDIT_BOT_DISCLOSURE=auto
|
|
|
193
196
|
export REDDIT_BOT_FOOTER=$'\n\n---\n^(🤖 Custom bot footer text)'
|
|
194
197
|
```
|
|
195
198
|
|
|
196
|
-
## Authentication
|
|
199
|
+
## Authentication
|
|
200
|
+
|
|
201
|
+
### ⚠️ Reddit API Changes (2026)
|
|
202
|
+
|
|
203
|
+
**Anonymous mode no longer works.** As of mid-2026, Reddit blocks all unauthenticated API requests with HTTP 403. OAuth credentials are now required for any API access.
|
|
204
|
+
|
|
205
|
+
Additionally, Reddit closed self-service OAuth app creation in November 2025. New developers must request access through [Reddit's Developer Support](https://support.reddithelp.com/hc/en-us/requests/new?ticket_form_id=14868593862164). Existing OAuth credentials (obtained before November 2025) continue to work.
|
|
206
|
+
|
|
207
|
+
### Getting Credentials
|
|
208
|
+
|
|
209
|
+
**If you already have a Reddit app** (created at `/prefs/apps` before November 2025): use your existing client ID and secret — they still work at 60-100 req/min.
|
|
210
|
+
|
|
211
|
+
**If you need new credentials**: submit a request through Reddit's Developer Support describing your use case. Approval is required and may take time.
|
|
197
212
|
|
|
198
213
|
### Mode Comparison
|
|
199
214
|
|
|
200
|
-
| Mode
|
|
201
|
-
|
|
|
202
|
-
| `
|
|
203
|
-
| `
|
|
204
|
-
| `
|
|
215
|
+
| Mode | Rate Limit | Setup Required | Tools Available | Best For |
|
|
216
|
+
| ----------------- | -------------- | ----------------- | ---------------------------------------------- | ------------- |
|
|
217
|
+
| `auto` (default) | 60-100 req/min | OAuth credentials | All tools | Most users |
|
|
218
|
+
| `authenticated` | 60-100 req/min | OAuth credentials | All tools | Explicit mode |
|
|
219
|
+
| `auto` (no creds) | ~1 req/min | None | `browse_subreddit`, `get_top_posts` only (RSS) | Quick testing |
|
|
220
|
+
| `anonymous` | ~1 req/min | None | `browse_subreddit`, `get_top_posts` only (RSS) | Legacy alias |
|
|
205
221
|
|
|
206
|
-
###
|
|
222
|
+
### RSS Fallback Mode
|
|
207
223
|
|
|
208
|
-
|
|
209
|
-
{
|
|
210
|
-
"env": {
|
|
211
|
-
"REDDIT_AUTH_MODE": "anonymous"
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
```
|
|
224
|
+
When no OAuth credentials are provided, the server automatically falls back to Reddit's public RSS feeds. This gives you zero-setup access to browse subreddits and get top posts.
|
|
215
225
|
|
|
216
|
-
**
|
|
226
|
+
**What works:** `browse_subreddit` and `get_top_posts` — returns up to 25 posts per request.
|
|
217
227
|
|
|
218
|
-
|
|
219
|
-
Reddit is blocking unauthenticated requests from this network (HTTP 403 with a
|
|
220
|
-
block page). Set REDDIT_CLIENT_ID and REDDIT_CLIENT_SECRET to authenticate with
|
|
221
|
-
OAuth, which also raises the rate limit from ~10 to 60+ requests/min.
|
|
222
|
-
```
|
|
228
|
+
**What's missing compared to OAuth:**
|
|
223
229
|
|
|
224
|
-
|
|
230
|
+
- No engagement metrics (score, comments, upvote ratio are all 0)
|
|
231
|
+
- No pagination (single page of ~25 results)
|
|
232
|
+
- No search, user info, comments, or write operations
|
|
233
|
+
- Lower rate limit (~1 req/min vs 60-100 with OAuth)
|
|
225
234
|
|
|
226
|
-
|
|
235
|
+
RSS results include a disclaimer noting the data source. All other tools return a clear error directing you to set up OAuth credentials.
|
|
227
236
|
|
|
228
|
-
|
|
229
|
-
2. Copy the client ID and secret
|
|
230
|
-
3. Configure:
|
|
237
|
+
### Read-Only Access (OAuth)
|
|
231
238
|
|
|
232
239
|
```json
|
|
233
240
|
{
|
|
234
241
|
"env": {
|
|
235
|
-
"REDDIT_AUTH_MODE": "authenticated",
|
|
236
242
|
"REDDIT_CLIENT_ID": "your_client_id",
|
|
237
243
|
"REDDIT_CLIENT_SECRET": "your_client_secret"
|
|
238
244
|
}
|
|
239
245
|
}
|
|
240
246
|
```
|
|
241
247
|
|
|
242
|
-
### Write Operations
|
|
248
|
+
### Write Operations (OAuth + User Credentials)
|
|
243
249
|
|
|
244
|
-
To create posts, reply, edit, or delete content,
|
|
250
|
+
To create posts, reply, edit, or delete content, add your Reddit username and password:
|
|
245
251
|
|
|
246
252
|
```json
|
|
247
253
|
{
|
|
248
254
|
"env": {
|
|
255
|
+
"REDDIT_CLIENT_ID": "your_client_id",
|
|
256
|
+
"REDDIT_CLIENT_SECRET": "your_client_secret",
|
|
249
257
|
"REDDIT_USERNAME": "your_username",
|
|
250
258
|
"REDDIT_PASSWORD": "your_password",
|
|
251
259
|
"REDDIT_SAFE_MODE": "standard"
|
package/dist/bin.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
process.env.TRANSPORT_TYPE ??= "stdio";
|
|
4
4
|
const args = process.argv.slice(2);
|
|
5
5
|
if (args.includes("--version") || args.includes("-v")) {
|
|
6
|
-
console.log("1.
|
|
6
|
+
console.log("1.6.1");
|
|
7
7
|
process.exit(0);
|
|
8
8
|
}
|
|
9
9
|
if (args.includes("--help") || args.includes("-h")) {
|
|
10
10
|
console.log(`
|
|
11
|
-
Reddit MCP Server v1.
|
|
11
|
+
Reddit MCP Server v1.6.1
|
|
12
12
|
|
|
13
13
|
Usage: reddit-mcp-server [options]
|
|
14
14
|
|