redditapis-mcp 0.12.0 → 0.14.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
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.0 (2026-10-20)
4
+
5
+ - New read tool `reddit_post_duplicates`: every other post that shares a post's link, across subreddits (`GET /api/reddit/post/{id}/duplicates`), up to 100 in one read.
6
+
7
+ ## 0.13.0 (2026-10-20)
8
+
9
+ ### Comment, post, vote and DM as your own Reddit account, after one connect
10
+
11
+ Seven new tools. `reddit_connect` stores your Reddit session once, server-side and encrypted
12
+ (AES-256-GCM, key held only by the API), against your API key's account, after checking it with
13
+ Reddit. `reddit_comment`, `reddit_submit`, `reddit_vote` and `reddit_dm` then act as that account
14
+ with no cookies in the call, so they never sit in an agent's tool arguments or transcript.
15
+ `reddit_session_status` shows what is stored (never the cookies) and `reddit_disconnect` deletes it.
16
+
17
+ Every write is marked `readOnlyHint: false` and `openWorldHint: true`, so a client can ask before it
18
+ runs; `reddit_disconnect` is destructive. `reddit_connect` takes cookies, so a remote host built with
19
+ `inlineCredentials: false` does not list it, like the other cookie-taking tools.
20
+
21
+ Needs the API's stored-session endpoints (POST/GET /api/reddit/session, POST /api/reddit/session/delete).
22
+
3
23
  ## 0.12.0 (2026-10-18)
4
24
 
5
25
  ### The read price in the server instructions is passed in, never written
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![npm downloads](https://img.shields.io/npm/dm/redditapis-mcp)](https://www.npmjs.com/package/redditapis-mcp)
5
5
  [![license](https://img.shields.io/npm/l/redditapis-mcp)](./LICENSE)
6
6
 
7
- redditapis-mcp is the official MCP server for RedditAPIs, built for developers and AI agents that need live Reddit data in Claude, Cursor, Windsurf, VS Code or any MCP client, with no Reddit developer app. Your agent can search posts and comments, read subreddit feeds and rules, expand comment trees, look up users and communities, and set up monitors that send new matching posts to your webhook. Reads cost $0.0015 per call (or a monthly read plan from $19 for 30,000 reads), every account gets 1,000 free reads a month, and new accounts get $0.50 of free credit with no card. The server only reads Reddit; posting, commenting and voting stay on the RedditAPIs REST API. Every tool maps to one endpoint at api.redditapis.com.
7
+ redditapis-mcp is the official MCP server for RedditAPIs, built for developers and AI agents that need live Reddit data in Claude, Cursor, Windsurf, VS Code or any MCP client, with no Reddit developer app. Your agent can search posts and comments, read subreddit feeds and rules, expand comment trees, look up users and communities, and set up monitors that send new matching posts to your webhook. Reads cost $0.0015 per call (or a monthly read plan from $19 for 30,000 reads), every account gets 1,000 free reads a month, and new accounts get $0.50 of free credit with no card. Connect your Reddit account once to comment, post, vote and DM as you. Every tool maps to one endpoint at api.redditapis.com.
8
8
 
9
9
  Install: `npx -y redditapis-mcp@latest` with `REDDITAPIS_KEY` from https://www.redditapis.com
10
10
 
@@ -104,7 +104,7 @@ Authentication is a Bearer token: the server sends `Authorization: Bearer <REDDI
104
104
 
105
105
  ## Tools
106
106
 
107
- 47 tools and 3 playbook resources: 30 Reddit reads, 10 monitor/webhook management tools, `reddit_set_watch` (one call that stands up a whole watch), `reddit_explain` (where the rows you are holding came from), 3 feedback tools, and 2 account tools (`reddit_account_me`, which is also where the credit balance lives, and `reddit_account_payments`, the top-up history). Reddit writes (posting, commenting, voting, DMs) remain a separate authenticated surface and are intentionally out of scope here -- monitor/webhook tools configure your OWN redditapis.com account (an alerting subscription), never Reddit itself, and the feedback tools send a report to the redditapis.com team, never to Reddit. Every read works with just your API key; the 6 monitor/webhook writes additionally need an active monitoring plan (see Monitoring below). The feedback tools are free and need only your key.
107
+ 55 tools and 3 playbook resources: 31 Reddit reads, 7 Reddit account tools (connect, status, disconnect, comment, submit, vote, DM), 10 monitor/webhook management tools, `reddit_set_watch` (one call that stands up a whole watch), `reddit_explain` (where the rows you are holding came from), 3 feedback tools, and 2 account tools (`reddit_account_me`, which is also where the credit balance lives, and `reddit_account_payments`, the top-up history). Reddit writes (commenting, posting, voting, DMs) act as YOUR Reddit account and only after you connect it with `reddit_connect`; each is marked as a write so your client asks before it runs. Monitor/webhook tools configure your OWN redditapis.com account (an alerting subscription), never Reddit itself, and the feedback tools send a report to the redditapis.com team, never to Reddit. Every read works with just your API key; the 6 monitor/webhook writes additionally need an active monitoring plan (see Monitoring below). The feedback tools are free and need only your key.
108
108
 
109
109
  A few conventions across the catalog:
110
110
 
@@ -146,6 +146,7 @@ A few conventions across the catalog:
146
146
  | `reddit_post_visibility` | `GET /api/reddit/post/{id}/visibility` | Is a post still publicly visible, or did it quietly stop being so? Fetches the post and one page of its author's listing and compares. Returns `live`, `not_visible` or `undecidable` with a reason, and never claims to know WHY. Two upstream calls, $0.004. |
147
147
  | `reddit_post` | `GET /api/reddit/post/{id}` | A single post by its base-36 `id` (no `t3_` prefix): title, author, score, text, permalink, subreddit, url. |
148
148
  | `reddit_post_comments` | `GET /api/reddit/comments` | A post plus its full threaded comment tree, fetched by `permalink`. |
149
+ | `reddit_post_duplicates` | `GET /api/reddit/post/{id}/duplicates` | Every other post that shares this post's link, across subreddits (Reddit's "other discussions"). |
149
150
  | `reddit_by_id` | `GET /api/reddit/by_id/{fullnames}` | Bulk-hydrate up to 100 posts in one call from a comma-separated list of `t3_` fullnames. |
150
151
 
151
152
  ### Users
@@ -217,6 +218,20 @@ The bodies are documentation and name the calls they are recipes for, which is t
217
218
  { "method": "resources/read", "params": { "uri": "playbook://subreddit-audit" } }
218
219
  ```
219
220
 
221
+ ### Your Reddit account: connect once, then comment, post, vote and DM
222
+
223
+ `reddit_connect` stores your Reddit session on our side, encrypted (AES-256-GCM, the key held only by the API), against this API key's account, after checking it with Reddit. Every write after that sends no cookies, so they never sit in your agent's tool calls or transcript. Each write acts publicly as you, so it is marked as a write and your client asks before it runs. Connecting, status and disconnecting are free.
224
+
225
+ | Tool | Endpoint | What it does |
226
+ |------|----------|--------------|
227
+ | `reddit_connect` | `POST /api/reddit/session` | Store your Reddit session once (reddit_session and loid cookies; add csrf_token for votes and DMs). A logged-out session is refused. Free. |
228
+ | `reddit_session_status` | `GET /api/reddit/session` | Whether a session is connected, its username, and when it was last used. Never returns the cookies. Free. |
229
+ | `reddit_disconnect` | `POST /api/reddit/session/delete` | Delete the stored session. Free. |
230
+ | `reddit_comment` | `POST /api/reddit/comment` | Comment on a post as you. |
231
+ | `reddit_submit` | `POST /api/reddit/submit` | Submit a text or link post to a subreddit as you. |
232
+ | `reddit_vote` | `POST /api/reddit/vote` | Upvote, downvote or clear a vote on a post or comment as you. |
233
+ | `reddit_dm` | `POST /api/reddit/dm` | Send a private chat message as you. |
234
+
220
235
  ### Feedback: tell the team what broke, after you review the draft
221
236
 
222
237
  Modelled on Claude Code's own feedback tool. When a call fails in a way that is not your key, credits or a rate limit, when you ask for something no tool covers, or when a result is plainly wrong, the model can **draft** a report into a local queue (`~/.redditapis/feedback-queue.json`, at most 10 drafts, override the directory with `REDDITAPIS_FEEDBACK_DIR`). Nothing is sent until you ask to review the queue and name the drafts to send. Each report carries the last failing call's endpoint, status and request id, your client name and this package's version, so the team can act on it without a follow-up. Use `reddit_feedback_get` with the returned server id to see whether it was triaged, shipped or declined. Both tools are free.
@@ -308,7 +323,7 @@ Later, `reddit_monitor_deliveries` with `{ id: "<monitor id from the add respons
308
323
 
309
324
  ## No session needed for reads; monitor/webhook writes need an active plan
310
325
 
311
- Reads need nothing but your API key -- no account linking, login, or cookie step. Reddit write actions (posting, commenting, voting, sending DMs) are handled by a separate authenticated surface outside this package and remain deliberately not exposed here, so an agent using this server can never post, vote, or DM as you on Reddit. Monitor/webhook management tools are a different kind of write: they configure your OWN redditapis.com account (an alerting subscription) and require an active monitoring plan for anything that creates or changes state (`reddit_monitor_add`/`update`/`remove`, `reddit_monitor_webhook_create`/`test`/`delete`); reading your own list, health, or delivery history never does.
326
+ Reads need nothing but your API key -- no account linking, login, or cookie step. Reddit write actions (commenting, posting, voting, sending DMs) need one extra step: `reddit_connect` stores your Reddit session on our side, encrypted, so later calls carry no cookies. Until you connect, no tool can post, vote or DM as you, and `reddit_disconnect` deletes the stored session at any time. Monitor/webhook management tools are a different kind of write: they configure your OWN redditapis.com account (an alerting subscription) and require an active monitoring plan for anything that creates or changes state (`reddit_monitor_add`/`update`/`remove`, `reddit_monitor_webhook_create`/`test`/`delete`); reading your own list, health, or delivery history never does.
312
327
 
313
328
  ## Troubleshooting
314
329
 
@@ -348,7 +363,7 @@ npm start # run the stdio server (needs REDDITAPIS_KEY)
348
363
 
349
364
  **What does it cost?** $0.0015 per read pay as you go, or a monthly read plan from $19 for 30,000 reads; every account gets 1,000 free reads a month, plus $0.50 of free credit at signup and no card. Monitors need a monitoring plan, which has no free tier.
350
365
 
351
- **Can it post, comment or vote?** Not through this server. It reads Reddit only; writes are on the RedditAPIs REST API. All 30 Reddit-facing tools read Reddit; posting, commenting, voting, and DMs are a separate authenticated surface and are not exposed here. Of the other 17, the 10 monitor/webhook tools manage your OWN redditapis.com monitors and webhooks (a write, but never a write to Reddit itself), `reddit_set_watch` sets up a whole watch in one call, `reddit_explain` says where the rows you hold came from, the 3 feedback tools send or read a report to the redditapis.com team, and `reddit_account_me` and `reddit_account_payments` read your own balance, plan and top-up history.
366
+ **Can it post, comment or vote?** Yes, after you connect your Reddit account once with `reddit_connect` (your session is stored encrypted on our side and never travels in later calls). `reddit_comment`, `reddit_submit`, `reddit_vote` and `reddit_dm` then act as that account, and each is marked as a write so your client asks before it runs. `reddit_disconnect` deletes the stored session. Of the other tools, the 10 monitor/webhook tools manage your OWN redditapis.com monitors and webhooks (a write, but never a write to Reddit itself), `reddit_set_watch` sets up a whole watch in one call, `reddit_explain` says where the rows you hold came from, the 3 feedback tools send or read a report to the redditapis.com team, and `reddit_account_me` and `reddit_account_payments` read your own balance, plan and top-up history.
352
367
 
353
368
  **Which clients are supported?** Claude Desktop, Claude Code, Cursor, Windsurf, and VS Code (Copilot agent mode), or any Model Context Protocol client.
354
369
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redditapis-mcp",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "mcpName": "io.github.redditapis/redditapis-mcp",
5
5
  "description": "Official MCP server for redditapis.com. Search Reddit posts, comments, communities, users and media; read subreddits, comment trees, top posts and profiles; create and manage monitors and webhooks. Native tools for Claude, Cursor and any MCP client.",
6
6
  "repository": {
@@ -36,6 +36,7 @@ export const TOOL_ANNOTATIONS = {
36
36
  reddit_search: { title: "Search Posts", ...READ_REDDIT },
37
37
  reddit_post_visibility: { title: "Post Visibility", ...READ_REDDIT },
38
38
  reddit_post_comments: { title: "Get Post Comments", ...READ_REDDIT },
39
+ reddit_post_duplicates: { title: "Get Post Duplicates", ...READ_REDDIT },
39
40
  reddit_search_communities: { title: "Search Communities", ...READ_REDDIT },
40
41
  reddit_search_comments: { title: "Search Posts by Comment", ...READ_REDDIT },
41
42
  reddit_deep_comment_search: { title: "Deep Comment Search", ...READ_REDDIT },
@@ -81,6 +82,18 @@ export const TOOL_ANNOTATIONS = {
81
82
  reddit_monitor_webhook_delete: { title: "Delete Webhook", readOnly: false, destructive: true, idempotent: true, openWorld: false },
82
83
  reddit_feedback_send: { title: "Send Feedback Report", readOnly: false, destructive: true, idempotent: false, openWorld: false },
83
84
  reddit_set_watch: { title: "Create Watch", readOnly: false, destructive: false, idempotent: false, openWorld: true },
85
+
86
+ // Writes AS the customer's own Reddit account through the stored session (#16). openWorld:
87
+ // each reaches Reddit itself. comment, submit and dm add content and are not idempotent;
88
+ // vote sets a state (idempotent); connect overwrites and disconnect deletes the stored
89
+ // credential, so both are destructive.
90
+ reddit_connect: { title: "Connect Reddit Account", readOnly: false, destructive: true, idempotent: true, openWorld: true },
91
+ reddit_session_status: { title: "Reddit Connection Status", ...READ_OWN },
92
+ reddit_disconnect: { title: "Disconnect Reddit Account", readOnly: false, destructive: true, idempotent: true, openWorld: false },
93
+ reddit_comment: { title: "Post Comment", readOnly: false, destructive: false, idempotent: false, openWorld: true },
94
+ reddit_submit: { title: "Submit Post", readOnly: false, destructive: false, idempotent: false, openWorld: true },
95
+ reddit_vote: { title: "Vote", readOnly: false, destructive: false, idempotent: true, openWorld: true },
96
+ reddit_dm: { title: "Send Direct Message", readOnly: false, destructive: false, idempotent: false, openWorld: true },
84
97
  };
85
98
 
86
99
  /**
package/src/tools.js CHANGED
@@ -7,9 +7,8 @@
7
7
  // {name}/{id} in a tool's `path` (e.g. /api/reddit/sub/{name}/top), which are
8
8
  // interpolated into the URL and removed from the query string.
9
9
  //
10
- // WRITES: reddit writes (comment/vote/DM -- posting AS the customer to Reddit
11
- // itself) are a separate authenticated surface and remain intentionally out of
12
- // scope here, that boundary is unchanged. Monitor/webhook management (2026-08-11,
10
+ // WRITES AS THE CUSTOMER (comment/submit/vote/DM) act through the session stored
11
+ // by reddit_connect (#16, operator decision 2026-10-19). Monitor/webhook management (2026-08-11,
13
12
  // task #43) is a DIFFERENT kind of write: it configures the customer's OWN
14
13
  // redditapis.com account (an alerting subscription), the same risk class as
15
14
  // reading their own usage -- it never posts, votes, or DMs anywhere. Those tools
@@ -320,6 +319,18 @@ export const TOOLS = [
320
319
  ),
321
320
  },
322
321
  },
322
+ {
323
+ name: "reddit_post_duplicates",
324
+ path: "/api/reddit/post/{id}/duplicates",
325
+ description:
326
+ "Every other Reddit post that shares this post's link: the list Reddit shows on a post's \"other discussions\" tab, across all subreddits, so every conversation about one article, video or product page can be read, not only the first thread found. Returns the original `post`, `duplicates` (up to 100 in one read, not paged, `after` is null) and `available` (how many Reddit returned). A made-up or removed post id is a 404 NOT_FOUND. A text post usually has none.",
327
+ shape: {
328
+ id: z.string().min(1).describe("Reddit post id, e.g. '1sgjld3'. A t3_ prefix is optional."),
329
+ sort: z.enum(["num_comments", "new"]).optional().describe("num_comments (default, most discussed first) or new."),
330
+ crossposts_only: z.boolean().optional().describe("true returns only crossposts and leaves out independent submissions of the same URL."),
331
+ limit: z.number().int().min(1).max(100).optional().describe("How many duplicates to return, 1-100 (default 100)."),
332
+ },
333
+ },
323
334
  {
324
335
  name: "reddit_search_communities",
325
336
  path: "/api/reddit/search/communities",
@@ -825,6 +836,101 @@ export const TOOLS = [
825
836
  "Returns the payment history of the account behind this API key: each top-up's amount, the credits it added, its status and when it happened, newest first. Free: not metered, and costs no credit.",
826
837
  shape: {},
827
838
  },
839
+
840
+ // ── WRITES AS THE CUSTOMER'S OWN REDDIT ACCOUNT, through a stored session (#16) ──
841
+ // Operator decision 2026-10-19: MCP write tools exist, and they reuse the REST login session
842
+ // STORED SERVER-SIDE, encrypted, against the account. reddit_connect is the one call that
843
+ // carries cookies; every write after it sends none, so cookies never sit in an agent's later
844
+ // tool arguments or transcript. Each write posts, votes or messages AS the customer on Reddit
845
+ // itself, so all of them are write: true and openWorld, and a client should confirm first.
846
+ {
847
+ name: "reddit_connect",
848
+ path: "/api/reddit/session",
849
+ method: "POST",
850
+ write: true,
851
+ destructive: true,
852
+ description:
853
+ "Stores the customer's own Reddit session once, so the comment, submit, vote and DM tools in this server act as that account without cookies in later calls. The session is kept server-side, encrypted (AES-256-GCM, key held only by the API), against this API key's account, after a check with Reddit: a logged-out session is refused with SESSION_LOGGED_OUT. Takes Reddit's session and loid cookies (from the REST login endpoint or the customer's own browser), plus the CSRF cookie for voting and messaging. Connecting again replaces the stored session. Free.",
854
+ shape: {
855
+ reddit_session: z.string().min(1).describe("Reddit's session cookie."),
856
+ loid: z.string().min(1).describe("The loid cookie."),
857
+ csrf_token: z.string().optional().describe("The CSRF cookie. Needed for voting and messaging."),
858
+ token_v2: z.string().optional().describe("The token_v2 cookie, when the session has one."),
859
+ },
860
+ },
861
+ {
862
+ name: "reddit_session_status",
863
+ path: "/api/reddit/session",
864
+ description:
865
+ "Whether a Reddit session is connected for this account: `connected`, the Reddit username, `status` (active, or dead after Reddit rejected it), and when it was first stored, last updated and last used. The cookies are not returned. Free.",
866
+ shape: {},
867
+ },
868
+ {
869
+ name: "reddit_disconnect",
870
+ path: "/api/reddit/session/delete",
871
+ method: "POST",
872
+ write: true,
873
+ destructive: true,
874
+ description:
875
+ "Deletes the stored Reddit session for this account. After this, the write tools answer with a request for cookies until a session is connected again. Idempotent: `deleted` is false when nothing was stored. Free.",
876
+ shape: {},
877
+ },
878
+ {
879
+ name: "reddit_comment",
880
+ path: "/api/reddit/comment",
881
+ method: "POST",
882
+ write: true,
883
+ description:
884
+ "Posts a comment on a Reddit post as the connected account. A public action on Reddit under the customer's name, marked as a write so a client can ask before it runs. The text is posted as Reddit markdown. Billed at the write rate. With no connected session it answers 400 asking for cookies.",
885
+ shape: {
886
+ post_url: z.string().min(1).describe("Any reddit.com post URL."),
887
+ text: z.string().min(1).describe("The comment text."),
888
+ },
889
+ },
890
+ {
891
+ name: "reddit_submit",
892
+ path: "/api/reddit/submit",
893
+ method: "POST",
894
+ write: true,
895
+ description:
896
+ "Submits a new post to a subreddit as the connected account: a text post (kind self) or a link post (kind link). A public action on Reddit under the customer's name, marked as a write so a client can ask before it runs; a subreddit's rules decide whether the post stays up. Billed at the write rate.",
897
+ shape: {
898
+ subreddit: z.string().min(1).describe("Subreddit name, without r/."),
899
+ kind: z.enum(["self", "link"]).describe("self = text post, link = URL post."),
900
+ title: z.string().min(1).describe("Post title."),
901
+ text: z.string().optional().describe("Body text, for kind self."),
902
+ url: z.string().optional().describe("Target URL, for kind link."),
903
+ flair_id: z.string().optional().describe("Post flair template id, for subreddits that require flair."),
904
+ flair_text: z.string().optional().describe("Post flair text, when the flair template allows editing it."),
905
+ nsfw: z.boolean().optional().describe("Mark the post NSFW."),
906
+ spoiler: z.boolean().optional().describe("Mark the post as a spoiler."),
907
+ },
908
+ },
909
+ {
910
+ name: "reddit_vote",
911
+ path: "/api/reddit/vote",
912
+ method: "POST",
913
+ write: true,
914
+ description:
915
+ "Upvotes, downvotes or clears the vote on a post (t3_) or comment (t1_) as the connected account. Voting needs the CSRF cookie in the stored session. Billed at the vote rate.",
916
+ shape: {
917
+ thing_id: z.string().regex(/^t[13]_[a-z0-9]+$/).describe("t3_xxx for a post, t1_xxx for a comment."),
918
+ direction: z.enum(["up", "down", "none"]).describe("up, down, or none to clear an existing vote."),
919
+ },
920
+ },
921
+ {
922
+ name: "reddit_dm",
923
+ path: "/api/reddit/dm",
924
+ method: "POST",
925
+ write: true,
926
+ description:
927
+ "Sends a private Reddit chat message as the connected account. A direct message to a real person under the customer's name, marked as a write so a client can ask before it runs. Messaging needs the CSRF cookie in the stored session. Billed at the DM rate.",
928
+ shape: {
929
+ to_username: z.string().optional().describe("Recipient username. Provide this or to_user_t2."),
930
+ to_user_t2: z.string().regex(/^t2_[a-z0-9]+$/).optional().describe("Recipient t2_ id directly, instead of to_username."),
931
+ message: z.string().min(1).describe("Plain-text message body."),
932
+ },
933
+ },
828
934
  {
829
935
  // ONE CALL INSTEAD OF THREE. Standing up a watch today means composing a
830
936
  // webhook registration, a monitor creation and a test delivery, each with