reddit-mcp-server 1.4.7 → 1.5.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/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.5.0] - 2026-06-22
6
+
7
+ ### Added
8
+
9
+ - Cursor pagination (`after`) on listing tools: `get_top_posts`, `browse_subreddit`, `search_reddit`, `get_user_posts`, `get_user_comments` (tools render a "more results" hint with the next cursor)
10
+ - Rate-limit resilience: transparent HTTP 429 retry honoring `Retry-After`/`x-ratelimit-reset` with exponential-backoff fallback (`REDDIT_MAX_RETRIES`, default 3)
11
+ - `get_subreddit_rules` — a subreddit's posting rules
12
+ - `get_post_flairs` — available link flairs; `create_post` now accepts `flair_id`/`flair_text`
13
+ - `get_more_comments` — expand truncated "load more" comment stubs via `/api/morechildren`
14
+ - Authenticated-user reads: `get_me`, `get_my_overview`, `get_my_saved`
15
+
16
+ ### Changed
17
+
18
+ - Client error channel is now a typed discriminated ADT (`Either<RedditError, T>` — `HttpError`/`NotFoundError`/`ApiError`/`ValidationError`/`NotAuthenticatedError`/`UnknownError`) built on functype `Try`, replacing bare `Error`; observable error messages are unchanged
19
+ - Removed an unused duplicate set of tool modules (`src/tools/*`); tools are defined inline in the server entry
20
+
21
+ ### Fixed
22
+
23
+ - `get_me` no longer crashes in read-only mode — it now returns a clear `NotAuthenticatedError` when `REDDIT_USERNAME` is not configured
24
+ - Flaky test failures caused by a duplicate `vi.mock` hoist race
25
+
5
26
  ## [1.0.7] - 2025-06-27
6
27
 
7
28
  ### Fixed
package/README.md CHANGED
@@ -66,17 +66,18 @@ claude mcp add --transport stdio reddit -- npx reddit-mcp-server
66
66
 
67
67
  ### Read-only Tools
68
68
 
69
- | Tool | Description |
70
- | ------------------------- | --------------------------------------------------- |
71
- | `get_reddit_post` | Get a specific Reddit post with engagement analysis |
72
- | `get_top_posts` | Get top posts from a subreddit or home feed |
73
- | `get_user_info` | Get detailed information about a Reddit user |
74
- | `get_user_posts` | Get posts submitted by a specific user |
75
- | `get_user_comments` | Get comments made by a specific user |
76
- | `get_subreddit_info` | Get subreddit details and statistics |
77
- | `get_trending_subreddits` | Get currently trending subreddits |
78
- | `get_post_comments` | Get comments from a specific post with threading |
79
- | `search_reddit` | Search for posts across Reddit |
69
+ | Tool | Description |
70
+ | ------------------------- | --------------------------------------------------------------------------- |
71
+ | `get_reddit_post` | Get a specific Reddit post with engagement analysis |
72
+ | `get_top_posts` | Get top posts from a subreddit or home feed |
73
+ | `browse_subreddit` | Browse a subreddit/home feed by sort (hot, new, top, rising, controversial) |
74
+ | `get_user_info` | Get detailed information about a Reddit user |
75
+ | `get_user_posts` | Get posts submitted by a specific user |
76
+ | `get_user_comments` | Get comments made by a specific user |
77
+ | `get_subreddit_info` | Get subreddit details and statistics |
78
+ | `get_trending_subreddits` | Get currently trending subreddits |
79
+ | `get_post_comments` | Get comments from a specific post with threading |
80
+ | `search_reddit` | Search for posts across Reddit |
80
81
 
81
82
  ### Write Tools (Require User Credentials)
82
83
 
@@ -93,17 +94,20 @@ claude mcp add --transport stdio reddit -- npx reddit-mcp-server
93
94
 
94
95
  ### Environment Variables
95
96
 
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`) |
97
+ | Variable | Required | Default | Description |
98
+ | ----------------------- | -------- | -------------- | ------------------------------------------------------------- |
99
+ | `REDDIT_CLIENT_ID` | No\* | - | Reddit app client ID |
100
+ | `REDDIT_CLIENT_SECRET` | No\* | - | Reddit app 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`, `anonymous` |
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) |
107
111
 
108
112
  \*Required only if using `authenticated` mode.
109
113
 
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.4.7");
6
+ console.log("1.5.0");
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.4.7
11
+ Reddit MCP Server v1.5.0
12
12
 
13
13
  Usage: reddit-mcp-server [options]
14
14
 
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)\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":";;AAKA,QAAQ,IAAI,mBAAmB;AAG/B,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE;AAElC,IAAI,KAAK,SAAS,YAAY,IAAI,KAAK,SAAS,KAAK,EAAE;AACrD,SAAQ,IAAA,QAAgB;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"}
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)\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":";;AAKA,QAAQ,IAAI,mBAAmB;AAG/B,MAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AAEjC,IAAI,KAAK,SAAS,WAAW,KAAK,KAAK,SAAS,IAAI,GAAG;CACrD,QAAQ,IAAA,OAAe;CACvB,QAAQ,KAAK,CAAC;AAChB;AAEA,IAAI,KAAK,SAAS,QAAQ,KAAK,KAAK,SAAS,IAAI,GAAG;CAClD,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;CAqBb;CACC,QAAQ,KAAK,CAAC;AAChB;AAGA,eAAe,OAAO;CACpB,MAAM,OAAO;AACf;AAEK,KAAK,CAAC,CAAC,MAAM,QAAQ,KAAK"}