redditapis-mcp 0.12.0 → 0.13.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 +16 -0
- package/README.md +18 -4
- package/package.json +1 -1
- package/src/annotations.js +12 -0
- package/src/tools.js +97 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.13.0 (2026-10-20)
|
|
4
|
+
|
|
5
|
+
### Comment, post, vote and DM as your own Reddit account, after one connect
|
|
6
|
+
|
|
7
|
+
Seven new tools. `reddit_connect` stores your Reddit session once, server-side and encrypted
|
|
8
|
+
(AES-256-GCM, key held only by the API), against your API key's account, after checking it with
|
|
9
|
+
Reddit. `reddit_comment`, `reddit_submit`, `reddit_vote` and `reddit_dm` then act as that account
|
|
10
|
+
with no cookies in the call, so they never sit in an agent's tool arguments or transcript.
|
|
11
|
+
`reddit_session_status` shows what is stored (never the cookies) and `reddit_disconnect` deletes it.
|
|
12
|
+
|
|
13
|
+
Every write is marked `readOnlyHint: false` and `openWorldHint: true`, so a client can ask before it
|
|
14
|
+
runs; `reddit_disconnect` is destructive. `reddit_connect` takes cookies, so a remote host built with
|
|
15
|
+
`inlineCredentials: false` does not list it, like the other cookie-taking tools.
|
|
16
|
+
|
|
17
|
+
Needs the API's stored-session endpoints (POST/GET /api/reddit/session, POST /api/reddit/session/delete).
|
|
18
|
+
|
|
3
19
|
## 0.12.0 (2026-10-18)
|
|
4
20
|
|
|
5
21
|
### The read price in the server instructions is passed in, never written
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/redditapis-mcp)
|
|
5
5
|
[](./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.
|
|
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
|
-
|
|
107
|
+
54 tools and 3 playbook resources: 30 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
|
|
|
@@ -217,6 +217,20 @@ The bodies are documentation and name the calls they are recipes for, which is t
|
|
|
217
217
|
{ "method": "resources/read", "params": { "uri": "playbook://subreddit-audit" } }
|
|
218
218
|
```
|
|
219
219
|
|
|
220
|
+
### Your Reddit account: connect once, then comment, post, vote and DM
|
|
221
|
+
|
|
222
|
+
`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.
|
|
223
|
+
|
|
224
|
+
| Tool | Endpoint | What it does |
|
|
225
|
+
|------|----------|--------------|
|
|
226
|
+
| `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. |
|
|
227
|
+
| `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. |
|
|
228
|
+
| `reddit_disconnect` | `POST /api/reddit/session/delete` | Delete the stored session. Free. |
|
|
229
|
+
| `reddit_comment` | `POST /api/reddit/comment` | Comment on a post as you. |
|
|
230
|
+
| `reddit_submit` | `POST /api/reddit/submit` | Submit a text or link post to a subreddit as you. |
|
|
231
|
+
| `reddit_vote` | `POST /api/reddit/vote` | Upvote, downvote or clear a vote on a post or comment as you. |
|
|
232
|
+
| `reddit_dm` | `POST /api/reddit/dm` | Send a private chat message as you. |
|
|
233
|
+
|
|
220
234
|
### Feedback: tell the team what broke, after you review the draft
|
|
221
235
|
|
|
222
236
|
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 +322,7 @@ Later, `reddit_monitor_deliveries` with `{ id: "<monitor id from the add respons
|
|
|
308
322
|
|
|
309
323
|
## No session needed for reads; monitor/webhook writes need an active plan
|
|
310
324
|
|
|
311
|
-
Reads need nothing but your API key -- no account linking, login, or cookie step. Reddit write actions (
|
|
325
|
+
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
326
|
|
|
313
327
|
## Troubleshooting
|
|
314
328
|
|
|
@@ -348,7 +362,7 @@ npm start # run the stdio server (needs REDDITAPIS_KEY)
|
|
|
348
362
|
|
|
349
363
|
**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
364
|
|
|
351
|
-
**Can it post, comment or vote?**
|
|
365
|
+
**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
366
|
|
|
353
367
|
**Which clients are supported?** Claude Desktop, Claude Code, Cursor, Windsurf, and VS Code (Copilot agent mode), or any Model Context Protocol client.
|
|
354
368
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redditapis-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.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": {
|
package/src/annotations.js
CHANGED
|
@@ -81,6 +81,18 @@ export const TOOL_ANNOTATIONS = {
|
|
|
81
81
|
reddit_monitor_webhook_delete: { title: "Delete Webhook", readOnly: false, destructive: true, idempotent: true, openWorld: false },
|
|
82
82
|
reddit_feedback_send: { title: "Send Feedback Report", readOnly: false, destructive: true, idempotent: false, openWorld: false },
|
|
83
83
|
reddit_set_watch: { title: "Create Watch", readOnly: false, destructive: false, idempotent: false, openWorld: true },
|
|
84
|
+
|
|
85
|
+
// Writes AS the customer's own Reddit account through the stored session (#16). openWorld:
|
|
86
|
+
// each reaches Reddit itself. comment, submit and dm add content and are not idempotent;
|
|
87
|
+
// vote sets a state (idempotent); connect overwrites and disconnect deletes the stored
|
|
88
|
+
// credential, so both are destructive.
|
|
89
|
+
reddit_connect: { title: "Connect Reddit Account", readOnly: false, destructive: true, idempotent: true, openWorld: true },
|
|
90
|
+
reddit_session_status: { title: "Reddit Connection Status", ...READ_OWN },
|
|
91
|
+
reddit_disconnect: { title: "Disconnect Reddit Account", readOnly: false, destructive: true, idempotent: true, openWorld: false },
|
|
92
|
+
reddit_comment: { title: "Post Comment", readOnly: false, destructive: false, idempotent: false, openWorld: true },
|
|
93
|
+
reddit_submit: { title: "Submit Post", readOnly: false, destructive: false, idempotent: false, openWorld: true },
|
|
94
|
+
reddit_vote: { title: "Vote", readOnly: false, destructive: false, idempotent: true, openWorld: true },
|
|
95
|
+
reddit_dm: { title: "Send Direct Message", readOnly: false, destructive: false, idempotent: false, openWorld: true },
|
|
84
96
|
};
|
|
85
97
|
|
|
86
98
|
/**
|
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
|
|
11
|
-
//
|
|
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
|
|
@@ -825,6 +824,101 @@ export const TOOLS = [
|
|
|
825
824
|
"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
825
|
shape: {},
|
|
827
826
|
},
|
|
827
|
+
|
|
828
|
+
// ── WRITES AS THE CUSTOMER'S OWN REDDIT ACCOUNT, through a stored session (#16) ──
|
|
829
|
+
// Operator decision 2026-10-19: MCP write tools exist, and they reuse the REST login session
|
|
830
|
+
// STORED SERVER-SIDE, encrypted, against the account. reddit_connect is the one call that
|
|
831
|
+
// carries cookies; every write after it sends none, so cookies never sit in an agent's later
|
|
832
|
+
// tool arguments or transcript. Each write posts, votes or messages AS the customer on Reddit
|
|
833
|
+
// itself, so all of them are write: true and openWorld, and a client should confirm first.
|
|
834
|
+
{
|
|
835
|
+
name: "reddit_connect",
|
|
836
|
+
path: "/api/reddit/session",
|
|
837
|
+
method: "POST",
|
|
838
|
+
write: true,
|
|
839
|
+
destructive: true,
|
|
840
|
+
description:
|
|
841
|
+
"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.",
|
|
842
|
+
shape: {
|
|
843
|
+
reddit_session: z.string().min(1).describe("Reddit's session cookie."),
|
|
844
|
+
loid: z.string().min(1).describe("The loid cookie."),
|
|
845
|
+
csrf_token: z.string().optional().describe("The CSRF cookie. Needed for voting and messaging."),
|
|
846
|
+
token_v2: z.string().optional().describe("The token_v2 cookie, when the session has one."),
|
|
847
|
+
},
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
name: "reddit_session_status",
|
|
851
|
+
path: "/api/reddit/session",
|
|
852
|
+
description:
|
|
853
|
+
"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.",
|
|
854
|
+
shape: {},
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
name: "reddit_disconnect",
|
|
858
|
+
path: "/api/reddit/session/delete",
|
|
859
|
+
method: "POST",
|
|
860
|
+
write: true,
|
|
861
|
+
destructive: true,
|
|
862
|
+
description:
|
|
863
|
+
"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.",
|
|
864
|
+
shape: {},
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
name: "reddit_comment",
|
|
868
|
+
path: "/api/reddit/comment",
|
|
869
|
+
method: "POST",
|
|
870
|
+
write: true,
|
|
871
|
+
description:
|
|
872
|
+
"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.",
|
|
873
|
+
shape: {
|
|
874
|
+
post_url: z.string().min(1).describe("Any reddit.com post URL."),
|
|
875
|
+
text: z.string().min(1).describe("The comment text."),
|
|
876
|
+
},
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
name: "reddit_submit",
|
|
880
|
+
path: "/api/reddit/submit",
|
|
881
|
+
method: "POST",
|
|
882
|
+
write: true,
|
|
883
|
+
description:
|
|
884
|
+
"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.",
|
|
885
|
+
shape: {
|
|
886
|
+
subreddit: z.string().min(1).describe("Subreddit name, without r/."),
|
|
887
|
+
kind: z.enum(["self", "link"]).describe("self = text post, link = URL post."),
|
|
888
|
+
title: z.string().min(1).describe("Post title."),
|
|
889
|
+
text: z.string().optional().describe("Body text, for kind self."),
|
|
890
|
+
url: z.string().optional().describe("Target URL, for kind link."),
|
|
891
|
+
flair_id: z.string().optional().describe("Post flair template id, for subreddits that require flair."),
|
|
892
|
+
flair_text: z.string().optional().describe("Post flair text, when the flair template allows editing it."),
|
|
893
|
+
nsfw: z.boolean().optional().describe("Mark the post NSFW."),
|
|
894
|
+
spoiler: z.boolean().optional().describe("Mark the post as a spoiler."),
|
|
895
|
+
},
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
name: "reddit_vote",
|
|
899
|
+
path: "/api/reddit/vote",
|
|
900
|
+
method: "POST",
|
|
901
|
+
write: true,
|
|
902
|
+
description:
|
|
903
|
+
"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.",
|
|
904
|
+
shape: {
|
|
905
|
+
thing_id: z.string().regex(/^t[13]_[a-z0-9]+$/).describe("t3_xxx for a post, t1_xxx for a comment."),
|
|
906
|
+
direction: z.enum(["up", "down", "none"]).describe("up, down, or none to clear an existing vote."),
|
|
907
|
+
},
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
name: "reddit_dm",
|
|
911
|
+
path: "/api/reddit/dm",
|
|
912
|
+
method: "POST",
|
|
913
|
+
write: true,
|
|
914
|
+
description:
|
|
915
|
+
"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.",
|
|
916
|
+
shape: {
|
|
917
|
+
to_username: z.string().optional().describe("Recipient username. Provide this or to_user_t2."),
|
|
918
|
+
to_user_t2: z.string().regex(/^t2_[a-z0-9]+$/).optional().describe("Recipient t2_ id directly, instead of to_username."),
|
|
919
|
+
message: z.string().min(1).describe("Plain-text message body."),
|
|
920
|
+
},
|
|
921
|
+
},
|
|
828
922
|
{
|
|
829
923
|
// ONE CALL INSTEAD OF THREE. Standing up a watch today means composing a
|
|
830
924
|
// webhook registration, a monitor creation and a test delivery, each with
|