reddit-mcp-server 1.3.2 → 1.4.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 CHANGED
@@ -20,6 +20,8 @@ A Model Context Protocol (MCP) server for interacting with Reddit - fetch posts,
20
20
  | **Edit Posts/Comments** | :white_check_mark: | :x: |
21
21
  | **Delete Posts/Comments** | :white_check_mark: | :x: |
22
22
  | **Spam Protection (Safe Mode)** | :white_check_mark: | :x: |
23
+ | **Bot Disclosure Footer** | :white_check_mark: | :x: |
24
+ | **Policy Compliance Built-in** | :white_check_mark: | :x: |
23
25
  | Browse Subreddits | :white_check_mark: | :white_check_mark: |
24
26
  | Search Reddit | :white_check_mark: | :white_check_mark: |
25
27
  | User Analysis | :white_check_mark: | :white_check_mark: |
@@ -91,15 +93,17 @@ claude mcp add --transport stdio reddit -- npx reddit-mcp-server
91
93
 
92
94
  ### Environment Variables
93
95
 
94
- | Variable | Required | Default | Description |
95
- | ---------------------- | -------- | -------------- | --------------------------------------------------------- |
96
- | `REDDIT_CLIENT_ID` | No\* | - | Reddit app client ID |
97
- | `REDDIT_CLIENT_SECRET` | No\* | - | Reddit app client secret |
98
- | `REDDIT_USERNAME` | No | - | Reddit username (for write operations) |
99
- | `REDDIT_PASSWORD` | No | - | Reddit password (for write operations) |
100
- | `REDDIT_USER_AGENT` | No | Auto-generated | Custom User-Agent string |
101
- | `REDDIT_AUTH_MODE` | No | `auto` | Authentication mode: `auto`, `authenticated`, `anonymous` |
102
- | `REDDIT_SAFE_MODE` | No | `off` | Write safeguards: `off`, `standard`, `strict` |
96
+ | Variable | Required | Default | Description |
97
+ | ----------------------- | -------- | -------------- | --------------------------------------------------------- |
98
+ | `REDDIT_CLIENT_ID` | No\* | - | Reddit app client ID |
99
+ | `REDDIT_CLIENT_SECRET` | No\* | - | Reddit app client secret |
100
+ | `REDDIT_USERNAME` | No | - | Reddit username (for write operations) |
101
+ | `REDDIT_PASSWORD` | No | - | Reddit password (for write operations) |
102
+ | `REDDIT_USER_AGENT` | No | Auto-generated | Custom User-Agent string |
103
+ | `REDDIT_AUTH_MODE` | No | `auto` | Authentication mode: `auto`, `authenticated`, `anonymous` |
104
+ | `REDDIT_SAFE_MODE` | No | `standard` | Write safeguards: `off`, `standard`, `strict` |
105
+ | `REDDIT_BOT_DISCLOSURE` | No | `off` | Bot disclosure footer: `auto`, `off` |
106
+ | `REDDIT_BOT_FOOTER` | No | Built-in | Custom bot footer text (when disclosure is `auto`) |
103
107
 
104
108
  \*Required only if using `authenticated` mode.
105
109
 
@@ -125,7 +129,7 @@ claude mcp add --transport stdio reddit -- npx reddit-mcp-server
125
129
 
126
130
  ## Safe Mode (Spam Protection)
127
131
 
128
- **New!** Protect your Reddit account from spam detection and bans with built-in safeguards.
132
+ Protect your Reddit account from spam detection and bans with built-in safeguards. **Enabled by default** (`standard` mode) per Reddit's Responsible Builder Policy.
129
133
 
130
134
  ### Why Use Safe Mode?
131
135
 
@@ -133,40 +137,57 @@ Reddit's spam detection can flag accounts for:
133
137
 
134
138
  - Rapid posting or commenting
135
139
  - Duplicate or similar content
140
+ - Posting the same content across multiple subreddits
136
141
  - Non-standard User-Agent strings
137
142
 
138
143
  Safe Mode helps prevent these issues automatically.
139
144
 
140
145
  ### Mode Options
141
146
 
142
- | Mode | Write Delay | Duplicate Detection | Use Case |
143
- | ---------- | ----------- | ------------------- | ------------------------------ |
144
- | `off` | None | No | Default, no safeguards |
145
- | `standard` | 2 seconds | Last 10 items | Recommended for normal use |
146
- | `strict` | 5 seconds | Last 20 items | For cautious automated posting |
147
+ | Mode | Write Delay | Duplicate Detection | Use Case |
148
+ | ---------- | ----------- | ------------------------- | ------------------------------ |
149
+ | `off` | None | No | Explicit opt-out only |
150
+ | `standard` | 2 seconds | Last 10 items + cross-sub | **Default**, recommended |
151
+ | `strict` | 5 seconds | Last 20 items + cross-sub | For cautious automated posting |
147
152
 
148
- ### Enable Safe Mode
153
+ ### Disable Safe Mode
154
+
155
+ Safe mode is enabled by default. To explicitly disable:
149
156
 
150
157
  ```bash
151
- export REDDIT_SAFE_MODE=standard
158
+ export REDDIT_SAFE_MODE=off
152
159
  npx reddit-mcp-server
153
160
  ```
154
161
 
155
- Or in your MCP config:
156
-
157
- ```json
158
- {
159
- "env": {
160
- "REDDIT_SAFE_MODE": "standard"
161
- }
162
- }
163
- ```
164
-
165
162
  ### What Safe Mode Does
166
163
 
167
164
  1. **Rate Limiting**: Enforces minimum delays between write operations
168
165
  2. **Duplicate Detection**: Blocks identical content from being posted twice
169
- 3. **Smart User-Agent**: Auto-generates Reddit-compliant User-Agent format when username is provided
166
+ 3. **Cross-Subreddit Detection**: Prevents posting the same content to multiple subreddits (per Reddit policy)
167
+ 4. **Smart User-Agent**: Auto-generates Reddit-compliant User-Agent format when username is provided
168
+
169
+ ## Bot Disclosure
170
+
171
+ Reddit's Responsible Builder Policy requires bots to disclose their automated nature. Enable automatic bot footers on all posted content:
172
+
173
+ ```bash
174
+ export REDDIT_BOT_DISCLOSURE=auto
175
+ npx reddit-mcp-server
176
+ ```
177
+
178
+ When enabled, a footer is appended to all posts, replies, and edits:
179
+
180
+ ```
181
+ ---
182
+ 🤖 I am a bot | Built with reddit-mcp-server
183
+ ```
184
+
185
+ Customize the footer with `REDDIT_BOT_FOOTER`:
186
+
187
+ ```bash
188
+ export REDDIT_BOT_DISCLOSURE=auto
189
+ export REDDIT_BOT_FOOTER=$'\n\n---\n^(🤖 Custom bot footer text)'
190
+ ```
170
191
 
171
192
  ## Authentication Modes
172
193
 
@@ -307,6 +328,17 @@ docker build -t reddit-mcp-server .
307
328
  docker run -d --name reddit-mcp -p 3000:3000 --env-file .env reddit-mcp-server
308
329
  ```
309
330
 
331
+ ## Reddit Responsible Builder Policy
332
+
333
+ This server is designed with [Reddit's Responsible Builder Policy](https://support.reddithelp.com/hc/en-us/articles/42728983564564-Responsible-Builder-Policy) in mind:
334
+
335
+ - **Safe mode on by default** — rate limiting and duplicate detection prevent spam
336
+ - **Cross-subreddit duplicate detection** — blocks identical content across subreddits
337
+ - **Bot disclosure support** — optional automated footer for transparency
338
+ - **No voting/karma manipulation** — upvote/downvote tools are intentionally excluded
339
+ - **No private messaging** — DM tools are intentionally excluded
340
+ - **Policy-aware AI instructions** — MCP server instructions remind AI assistants of data usage restrictions
341
+
310
342
  ## Credits
311
343
 
312
344
  - Fork of [reddit-mcp-server](https://github.com/alexandros-lekkas/reddit-mcp-server) by Alexandros Lekkas
package/dist/bin.js CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  //#region src/bin.ts
3
- if (!process.env.TRANSPORT_TYPE) process.env.TRANSPORT_TYPE = "stdio";
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.3.2");
6
+ console.log("1.4.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.3.2
11
+ Reddit MCP Server v1.4.1
12
12
 
13
13
  Usage: reddit-mcp-server [options]
14
14
 
@@ -17,11 +17,15 @@ Options:
17
17
  -h, --help Show help
18
18
 
19
19
  Environment Variables:
20
- REDDIT_CLIENT_ID Reddit API client ID (required)
21
- REDDIT_CLIENT_SECRET Reddit API client secret (required)
20
+ REDDIT_CLIENT_ID Reddit API client ID (optional, for OAuth)
21
+ REDDIT_CLIENT_SECRET Reddit API client secret (optional, for OAuth)
22
22
  REDDIT_USERNAME Reddit username (optional, for write operations)
23
23
  REDDIT_PASSWORD Reddit password (optional, for write operations)
24
24
  REDDIT_USER_AGENT Custom user agent (optional)
25
+ REDDIT_AUTH_MODE Authentication mode: auto, authenticated, anonymous (default: auto)
26
+ REDDIT_SAFE_MODE Spam protection: off, standard, strict (default: standard)
27
+ REDDIT_BOT_DISCLOSURE Bot disclosure footer: auto, off (default: off)
28
+ REDDIT_BOT_FOOTER Custom bot footer text (optional, used with REDDIT_BOT_DISCLOSURE=auto)
25
29
 
26
30
  For more information, visit: https://github.com/jordanburke/reddit-mcp-server
27
31
  `);
@@ -30,7 +34,7 @@ For more information, visit: https://github.com/jordanburke/reddit-mcp-server
30
34
  async function main() {
31
35
  await import("./index.js");
32
36
  }
33
- main().then();
37
+ main().catch(console.error);
34
38
 
35
39
  //#endregion
36
40
  export { };
package/dist/bin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bin.js","names":[],"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\n\ndeclare const __VERSION__: string\n\n// Force stdio mode for CLI/npx usage (unless explicitly overridden)\nif (!process.env.TRANSPORT_TYPE) {\n process.env.TRANSPORT_TYPE = \"stdio\"\n}\n\n// Handle command line arguments BEFORE any other imports\nconst args = process.argv.slice(2)\n\nif (args.includes(\"--version\") || args.includes(\"-v\")) {\n console.log(__VERSION__)\n process.exit(0)\n}\n\nif (args.includes(\"--help\") || args.includes(\"-h\")) {\n console.log(`\nReddit MCP Server v${__VERSION__}\n\nUsage: reddit-mcp-server [options]\n\nOptions:\n -v, --version Show version number\n -h, --help Show help\n\nEnvironment Variables:\n REDDIT_CLIENT_ID Reddit API client ID (required)\n REDDIT_CLIENT_SECRET Reddit API client secret (required)\n REDDIT_USERNAME Reddit username (optional, for write operations)\n REDDIT_PASSWORD Reddit password (optional, for write operations)\n REDDIT_USER_AGENT Custom user agent (optional)\n\nFor more information, visit: https://github.com/jordanburke/reddit-mcp-server\n`)\n process.exit(0)\n}\n\n// Import and start server if not showing version/help\nasync function main() {\n // Import and run the main function from the FastMCP server\n await import(\"./index.js\")\n // The index.js exports main() directly, so we just need to execute the file\n // The main() is already executed when the module is imported\n}\n\nmain().then()\n"],"mappings":";;AAKA,IAAI,CAAC,QAAQ,IAAI,eACf,SAAQ,IAAI,iBAAiB;AAI/B,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE;AAElC,IAAI,KAAK,SAAS,YAAY,IAAI,KAAK,SAAS,KAAK,EAAE;AACrD,SAAQ,YAAgB;AACxB,SAAQ,KAAK,EAAE;;AAGjB,IAAI,KAAK,SAAS,SAAS,IAAI,KAAK,SAAS,KAAK,EAAE;AAClD,SAAQ,IAAI;;;;;;;;;;;;;;;;;EAiBZ;AACA,SAAQ,KAAK,EAAE;;AAIjB,eAAe,OAAO;AAEpB,OAAM,OAAO;;AAKf,MAAM,CAAC,MAAM"}
1
+ {"version":3,"file":"bin.js","names":[],"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\n\ndeclare const __VERSION__: string\n\n// Force stdio mode for CLI/npx usage (unless explicitly overridden)\n// eslint-disable-next-line functional/immutable-data\nprocess.env.TRANSPORT_TYPE ??= \"stdio\"\n\n// Handle command line arguments BEFORE any other imports\nconst args = process.argv.slice(2)\n\nif (args.includes(\"--version\") || args.includes(\"-v\")) {\n console.log(__VERSION__)\n process.exit(0)\n}\n\nif (args.includes(\"--help\") || args.includes(\"-h\")) {\n console.log(`\nReddit MCP Server v${__VERSION__}\n\nUsage: reddit-mcp-server [options]\n\nOptions:\n -v, --version Show version number\n -h, --help Show help\n\nEnvironment Variables:\n REDDIT_CLIENT_ID Reddit API client ID (optional, for OAuth)\n REDDIT_CLIENT_SECRET Reddit API client secret (optional, for OAuth)\n REDDIT_USERNAME Reddit username (optional, for write operations)\n REDDIT_PASSWORD Reddit password (optional, for write operations)\n REDDIT_USER_AGENT Custom user agent (optional)\n REDDIT_AUTH_MODE Authentication mode: auto, authenticated, anonymous (default: auto)\n REDDIT_SAFE_MODE Spam protection: off, standard, strict (default: standard)\n REDDIT_BOT_DISCLOSURE Bot disclosure footer: auto, off (default: off)\n REDDIT_BOT_FOOTER Custom bot footer text (optional, used with REDDIT_BOT_DISCLOSURE=auto)\n\nFor more information, visit: https://github.com/jordanburke/reddit-mcp-server\n`)\n process.exit(0)\n}\n\n// Import and start server if not showing version/help\nasync function main() {\n await import(\"./index.js\")\n}\n\nvoid main().catch(console.error)\n"],"mappings":";;AAMA,QAAQ,IAAI,mBAAmB;AAG/B,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE;AAElC,IAAI,KAAK,SAAS,YAAY,IAAI,KAAK,SAAS,KAAK,EAAE;AACrD,SAAQ,YAAgB;AACxB,SAAQ,KAAK,EAAE;;AAGjB,IAAI,KAAK,SAAS,SAAS,IAAI,KAAK,SAAS,KAAK,EAAE;AAClD,SAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;EAqBZ;AACA,SAAQ,KAAK,EAAE;;AAIjB,eAAe,OAAO;AACpB,OAAM,OAAO;;AAGV,MAAM,CAAC,MAAM,QAAQ,MAAM"}