@prmichaelsen/reddit-mcp 0.1.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.
Files changed (138) hide show
  1. package/.claude/settings.local.json +23 -0
  2. package/.env.example +13 -0
  3. package/AGENT.md +1772 -0
  4. package/README.md +54 -0
  5. package/agent/commands/acp.clarification-capture.md +386 -0
  6. package/agent/commands/acp.clarification-create.md +432 -0
  7. package/agent/commands/acp.clarifications-research.md +326 -0
  8. package/agent/commands/acp.command-create.md +432 -0
  9. package/agent/commands/acp.design-create.md +286 -0
  10. package/agent/commands/acp.design-reference.md +355 -0
  11. package/agent/commands/acp.index.md +423 -0
  12. package/agent/commands/acp.init.md +546 -0
  13. package/agent/commands/acp.package-create.md +895 -0
  14. package/agent/commands/acp.package-info.md +212 -0
  15. package/agent/commands/acp.package-install.md +539 -0
  16. package/agent/commands/acp.package-list.md +280 -0
  17. package/agent/commands/acp.package-publish.md +541 -0
  18. package/agent/commands/acp.package-remove.md +293 -0
  19. package/agent/commands/acp.package-search.md +307 -0
  20. package/agent/commands/acp.package-update.md +361 -0
  21. package/agent/commands/acp.package-validate.md +540 -0
  22. package/agent/commands/acp.pattern-create.md +386 -0
  23. package/agent/commands/acp.plan.md +577 -0
  24. package/agent/commands/acp.proceed.md +882 -0
  25. package/agent/commands/acp.project-create.md +675 -0
  26. package/agent/commands/acp.project-info.md +312 -0
  27. package/agent/commands/acp.project-list.md +226 -0
  28. package/agent/commands/acp.project-remove.md +379 -0
  29. package/agent/commands/acp.project-set.md +227 -0
  30. package/agent/commands/acp.project-update.md +307 -0
  31. package/agent/commands/acp.projects-restore.md +228 -0
  32. package/agent/commands/acp.projects-sync.md +347 -0
  33. package/agent/commands/acp.report.md +407 -0
  34. package/agent/commands/acp.resume.md +239 -0
  35. package/agent/commands/acp.sessions.md +301 -0
  36. package/agent/commands/acp.status.md +293 -0
  37. package/agent/commands/acp.sync.md +364 -0
  38. package/agent/commands/acp.task-create.md +500 -0
  39. package/agent/commands/acp.update.md +302 -0
  40. package/agent/commands/acp.validate.md +466 -0
  41. package/agent/commands/acp.version-check-for-updates.md +276 -0
  42. package/agent/commands/acp.version-check.md +191 -0
  43. package/agent/commands/acp.version-update.md +289 -0
  44. package/agent/commands/command.template.md +339 -0
  45. package/agent/commands/git.commit.md +526 -0
  46. package/agent/commands/git.init.md +514 -0
  47. package/agent/design/.gitkeep +0 -0
  48. package/agent/design/design.template.md +154 -0
  49. package/agent/design/requirements.md +332 -0
  50. package/agent/design/requirements.template.md +387 -0
  51. package/agent/index/.gitkeep +0 -0
  52. package/agent/index/local.main.template.yaml +37 -0
  53. package/agent/manifest.template.yaml +13 -0
  54. package/agent/manifest.yaml +61 -0
  55. package/agent/milestones/.gitkeep +0 -0
  56. package/agent/milestones/milestone-1-foundation-listings-mvp.md +140 -0
  57. package/agent/milestones/milestone-1-{title}.template.md +206 -0
  58. package/agent/milestones/milestone-2-content-interaction.md +56 -0
  59. package/agent/milestones/milestone-3-users-and-messaging.md +54 -0
  60. package/agent/milestones/milestone-4-subreddits-and-flair.md +56 -0
  61. package/agent/milestones/milestone-5-moderation.md +53 -0
  62. package/agent/milestones/milestone-6-advanced-features-and-polish.md +56 -0
  63. package/agent/package.template.yaml +86 -0
  64. package/agent/patterns/.gitkeep +0 -0
  65. package/agent/patterns/bootstrap.template.md +1237 -0
  66. package/agent/patterns/pattern.template.md +382 -0
  67. package/agent/progress.template.yaml +161 -0
  68. package/agent/progress.yaml +223 -0
  69. package/agent/schemas/package.schema.yaml +276 -0
  70. package/agent/scripts/acp.common.sh +1781 -0
  71. package/agent/scripts/acp.yaml-parser.sh +985 -0
  72. package/agent/tasks/.gitkeep +0 -0
  73. package/agent/tasks/milestone-1-foundation-listings-mvp/task-1-project-scaffolding.md +75 -0
  74. package/agent/tasks/milestone-1-foundation-listings-mvp/task-2-reddit-oauth.md +71 -0
  75. package/agent/tasks/milestone-1-foundation-listings-mvp/task-3-reddit-api-client.md +71 -0
  76. package/agent/tasks/milestone-1-foundation-listings-mvp/task-4-listing-tools.md +65 -0
  77. package/agent/tasks/milestone-1-foundation-listings-mvp/task-5-search-tools.md +43 -0
  78. package/agent/tasks/milestone-1-foundation-listings-mvp/task-6-testing-verification.md +49 -0
  79. package/agent/tasks/milestone-2-content-interaction/task-7-post-tools.md +56 -0
  80. package/agent/tasks/milestone-2-content-interaction/task-8-comment-tools.md +49 -0
  81. package/agent/tasks/milestone-2-content-interaction/task-9-vote-save-report-tools.md +50 -0
  82. package/agent/tasks/milestone-3-users-and-messaging/task-10-account-tools.md +44 -0
  83. package/agent/tasks/milestone-3-users-and-messaging/task-11-user-profile-tools.md +50 -0
  84. package/agent/tasks/milestone-3-users-and-messaging/task-12-private-message-tools.md +50 -0
  85. package/agent/tasks/milestone-4-subreddits-and-flair/task-13-subreddit-tools.md +47 -0
  86. package/agent/tasks/milestone-4-subreddits-and-flair/task-14-flair-tools.md +46 -0
  87. package/agent/tasks/milestone-4-subreddits-and-flair/task-15-http-transport.md +53 -0
  88. package/agent/tasks/milestone-5-moderation/task-16-mod-action-tools.md +48 -0
  89. package/agent/tasks/milestone-5-moderation/task-17-mod-listing-tools.md +47 -0
  90. package/agent/tasks/milestone-5-moderation/task-18-mod-management-tools.md +42 -0
  91. package/agent/tasks/milestone-6-advanced-features-and-polish/task-19-multireddit-tools.md +49 -0
  92. package/agent/tasks/milestone-6-advanced-features-and-polish/task-20-wiki-tools.md +47 -0
  93. package/agent/tasks/milestone-6-advanced-features-and-polish/task-21-documentation-polish.md +65 -0
  94. package/agent/tasks/task-1-{title}.template.md +244 -0
  95. package/dist/auth/oauth.d.ts +15 -0
  96. package/dist/auth/oauth.d.ts.map +1 -0
  97. package/dist/client/reddit.d.ts +28 -0
  98. package/dist/client/reddit.d.ts.map +1 -0
  99. package/dist/factory.d.ts +2 -0
  100. package/dist/factory.d.ts.map +1 -0
  101. package/dist/factory.js +30394 -0
  102. package/dist/factory.js.map +7 -0
  103. package/dist/index.d.ts +2 -0
  104. package/dist/index.d.ts.map +1 -0
  105. package/dist/index.js +31955 -0
  106. package/dist/index.js.map +7 -0
  107. package/dist/server.d.ts +5 -0
  108. package/dist/server.d.ts.map +1 -0
  109. package/dist/server.js +30401 -0
  110. package/dist/server.js.map +7 -0
  111. package/dist/tools/listings.d.ts +4 -0
  112. package/dist/tools/listings.d.ts.map +1 -0
  113. package/dist/tools/search.d.ts +4 -0
  114. package/dist/tools/search.d.ts.map +1 -0
  115. package/dist/transport/http.d.ts +7 -0
  116. package/dist/transport/http.d.ts.map +1 -0
  117. package/dist/types/index.d.ts +78 -0
  118. package/dist/types/index.d.ts.map +1 -0
  119. package/esbuild.build.js +21 -0
  120. package/jest.config.js +18 -0
  121. package/package.json +46 -0
  122. package/src/auth/oauth.ts +200 -0
  123. package/src/client/reddit.ts +245 -0
  124. package/src/factory.ts +5 -0
  125. package/src/index.ts +31 -0
  126. package/src/server.ts +36 -0
  127. package/src/tools/listings.ts +202 -0
  128. package/src/tools/search.ts +85 -0
  129. package/src/transport/http.ts +49 -0
  130. package/src/types/index.ts +83 -0
  131. package/tests/fixtures/reddit-responses.ts +132 -0
  132. package/tests/helpers/mock-client.ts +36 -0
  133. package/tests/unit/auth.test.ts +89 -0
  134. package/tests/unit/client.test.ts +218 -0
  135. package/tests/unit/listings.test.ts +113 -0
  136. package/tests/unit/search.test.ts +59 -0
  137. package/tests/unit/server.test.ts +14 -0
  138. package/tsconfig.json +21 -0
@@ -0,0 +1,332 @@
1
+ # Project Requirements
2
+
3
+ **Project Name**: reddit-mcp
4
+ **Created**: 2026-03-10
5
+ **Status**: Active
6
+
7
+ ---
8
+
9
+ ## Overview
10
+
11
+ An MCP server that wraps the Reddit API, enabling AI agents to browse, post, comment, vote, moderate, and manage Reddit content through the Model Context Protocol. Authenticated via Reddit OAuth 2.0.
12
+
13
+ ---
14
+
15
+ ## Problem Statement
16
+
17
+ AI agents have no native way to interact with Reddit. Users must manually browse subreddits, post content, manage messages, and moderate communities outside their agent workflows. An MCP server bridging the Reddit API lets agents automate these tasks directly.
18
+
19
+ ---
20
+
21
+ ## Goals and Objectives
22
+
23
+ ### Primary Goals
24
+ 1. Expose comprehensive Reddit API endpoints as MCP tools (~60+ tools)
25
+ 2. Implement Reddit OAuth 2.0 authentication with automatic token refresh
26
+ 3. Support both stdio and streamable HTTP transports
27
+
28
+ ### Secondary Goals
29
+ 1. Provide clear error messages mapping Reddit API errors
30
+ 2. Rate-limit-aware usage (respect 100 QPM per OAuth client)
31
+ 3. Export server factory for multi-tenant use via mcp-auth
32
+
33
+ ---
34
+
35
+ ## Functional Requirements
36
+
37
+ ### Priority 1 — Listings & Search (MVP)
38
+
39
+ These endpoints ship first — core read-only browsing.
40
+
41
+ | # | Category | MCP Tool Name | Description | Scope |
42
+ |---|----------|---------------|-------------|-------|
43
+ | 1 | Listings | `reddit_listings_best` | Get best posts | read |
44
+ | 2 | Listings | `reddit_listings_hot` | Get hot posts (frontpage or subreddit) | read |
45
+ | 3 | Listings | `reddit_listings_new` | Get newest posts | read |
46
+ | 4 | Listings | `reddit_listings_rising` | Get rising posts | read |
47
+ | 5 | Listings | `reddit_listings_top` | Get top posts (with time filter) | read |
48
+ | 6 | Listings | `reddit_listings_controversial` | Get controversial posts | read |
49
+ | 7 | Listings | `reddit_comments_thread` | Get post with full comment tree | read |
50
+ | 8 | Listings | `reddit_duplicates` | Get cross-posts / duplicates | read |
51
+ | 9 | Search | `reddit_search` | Search all of Reddit | read |
52
+ | 10 | Search | `reddit_search_subreddit` | Search within a subreddit | read |
53
+ | 11 | Listings | `reddit_info` | Get info about things by fullname | read |
54
+
55
+ ### Priority 2 — Content Interaction
56
+
57
+ Submit, comment, vote, save — core write operations.
58
+
59
+ | # | Category | MCP Tool Name | Description | Scope |
60
+ |---|----------|---------------|-------------|-------|
61
+ | 12 | Posts | `reddit_submit` | Create a new post (link or self) | submit |
62
+ | 13 | Posts | `reddit_edit` | Edit a self-post or comment | edit |
63
+ | 14 | Posts | `reddit_delete` | Delete a post or comment | edit |
64
+ | 15 | Posts | `reddit_hide` | Hide a post | report |
65
+ | 16 | Posts | `reddit_unhide` | Unhide a post | report |
66
+ | 17 | Posts | `reddit_mark_nsfw` | Mark post as NSFW | modposts |
67
+ | 18 | Posts | `reddit_unmark_nsfw` | Unmark post as NSFW | modposts |
68
+ | 19 | Posts | `reddit_spoiler` | Mark post as spoiler | modposts |
69
+ | 20 | Posts | `reddit_unspoiler` | Unmark post as spoiler | modposts |
70
+ | 21 | Comments | `reddit_comment` | Post a comment or reply | submit |
71
+ | 22 | Comments | `reddit_more_children` | Load more comments from "more" stubs | read |
72
+ | 23 | Voting | `reddit_vote` | Upvote, downvote, or unvote | vote |
73
+ | 24 | Save | `reddit_save` | Save a post or comment | save |
74
+ | 25 | Save | `reddit_unsave` | Unsave a post or comment | save |
75
+ | 26 | Report | `reddit_report` | Report content to moderators | report |
76
+
77
+ ### Priority 3 — Account & Users
78
+
79
+ | # | Category | MCP Tool Name | Description | Scope |
80
+ |---|----------|---------------|-------------|-------|
81
+ | 27 | Account | `reddit_me` | Get authenticated user's info | identity |
82
+ | 28 | Account | `reddit_me_karma` | Get karma breakdown by subreddit | mysubreddits |
83
+ | 29 | Account | `reddit_me_prefs` | Get user preferences | identity |
84
+ | 30 | Account | `reddit_me_prefs_update` | Update user preferences | account |
85
+ | 31 | Account | `reddit_me_trophies` | Get user's trophies | identity |
86
+ | 32 | Account | `reddit_me_friends` | Get friend list | mysubreddits |
87
+ | 33 | Account | `reddit_me_blocked` | Get blocked users | mysubreddits |
88
+ | 34 | Users | `reddit_user_about` | Get user's public profile | read |
89
+ | 35 | Users | `reddit_user_submitted` | Get user's posts | history |
90
+ | 36 | Users | `reddit_user_comments` | Get user's comments | history |
91
+ | 37 | Users | `reddit_user_overview` | Get user's posts + comments | history |
92
+ | 38 | Users | `reddit_user_saved` | Get user's saved items | history |
93
+ | 39 | Users | `reddit_user_upvoted` | Get user's upvoted items | history |
94
+ | 40 | Users | `reddit_user_downvoted` | Get user's downvoted items | history |
95
+ | 41 | Users | `reddit_user_trophies` | Get user's trophies | read |
96
+ | 42 | Users | `reddit_block_user` | Block a user | account |
97
+
98
+ ### Priority 4 — Subreddits, Flair & Messages
99
+
100
+ | # | Category | MCP Tool Name | Description | Scope |
101
+ |---|----------|---------------|-------------|-------|
102
+ | 43 | Subreddits | `reddit_subreddit_about` | Get subreddit info | read |
103
+ | 44 | Subreddits | `reddit_subreddit_rules` | Get subreddit rules | read |
104
+ | 45 | Subreddits | `reddit_subscribe` | Subscribe to a subreddit | subscribe |
105
+ | 46 | Subreddits | `reddit_unsubscribe` | Unsubscribe from a subreddit | subscribe |
106
+ | 47 | Subreddits | `reddit_subreddits_mine` | List my subscriptions | mysubreddits |
107
+ | 48 | Subreddits | `reddit_subreddits_popular` | List popular subreddits | read |
108
+ | 49 | Subreddits | `reddit_subreddits_new` | List new subreddits | read |
109
+ | 50 | Subreddits | `reddit_subreddits_search` | Search for subreddits | read |
110
+ | 51 | Flair | `reddit_link_flair` | Get available link flair for subreddit | flair |
111
+ | 52 | Flair | `reddit_user_flair` | Get available user flair for subreddit | flair |
112
+ | 53 | Flair | `reddit_select_flair` | Set flair on a post or user | flair |
113
+ | 54 | Messages | `reddit_inbox` | Get inbox messages | privatemessages |
114
+ | 55 | Messages | `reddit_unread` | Get unread messages | privatemessages |
115
+ | 56 | Messages | `reddit_sent` | Get sent messages | privatemessages |
116
+ | 57 | Messages | `reddit_compose` | Send a private message | privatemessages |
117
+ | 58 | Messages | `reddit_read_message` | Mark message as read | privatemessages |
118
+ | 59 | Messages | `reddit_unread_message` | Mark message as unread | privatemessages |
119
+ | 60 | Messages | `reddit_del_msg` | Delete a message | privatemessages |
120
+
121
+ ### Priority 5 — Moderation
122
+
123
+ | # | Category | MCP Tool Name | Description | Scope |
124
+ |---|----------|---------------|-------------|-------|
125
+ | 61 | Mod Actions | `reddit_approve` | Approve a post or comment | modposts |
126
+ | 62 | Mod Actions | `reddit_remove` | Remove a post or comment | modposts |
127
+ | 63 | Mod Actions | `reddit_distinguish` | Distinguish a comment as mod | modposts |
128
+ | 64 | Mod Actions | `reddit_ignore_reports` | Ignore reports on an item | modposts |
129
+ | 65 | Mod Actions | `reddit_unignore_reports` | Unignore reports on an item | modposts |
130
+ | 66 | Mod Actions | `reddit_lock` | Lock a thread | modposts |
131
+ | 67 | Mod Actions | `reddit_unlock` | Unlock a thread | modposts |
132
+ | 68 | Mod Listings | `reddit_modqueue` | Get moderation queue | modposts |
133
+ | 69 | Mod Listings | `reddit_reports` | Get reported items | modposts |
134
+ | 70 | Mod Listings | `reddit_spam` | Get spam items | modposts |
135
+ | 71 | Mod Listings | `reddit_edited` | Get recently edited items | modposts |
136
+ | 72 | Mod Listings | `reddit_modlog` | Get moderation log | modlog |
137
+ | 73 | Mod Mgmt | `reddit_moderators` | List subreddit moderators | read |
138
+ | 74 | Mod Mgmt | `reddit_contributors` | List subreddit contributors | modcontributors |
139
+ | 75 | Mod Mgmt | `reddit_banned` | List banned users | modcontributors |
140
+ | 76 | Mod Mgmt | `reddit_muted` | List muted users | modcontributors |
141
+
142
+ ### Priority 6 — Multireddits & Wiki
143
+
144
+ | # | Category | MCP Tool Name | Description | Scope |
145
+ |---|----------|---------------|-------------|-------|
146
+ | 77 | Multis | `reddit_multi_mine` | List my multireddits | read |
147
+ | 78 | Multis | `reddit_multi_get` | Get a multireddit | read |
148
+ | 79 | Multis | `reddit_multi_create` | Create a multireddit | subscribe |
149
+ | 80 | Multis | `reddit_multi_update` | Update a multireddit | subscribe |
150
+ | 81 | Multis | `reddit_multi_delete` | Delete a multireddit | subscribe |
151
+ | 82 | Multis | `reddit_multi_add_sub` | Add subreddit to multi | subscribe |
152
+ | 83 | Multis | `reddit_multi_remove_sub` | Remove subreddit from multi | subscribe |
153
+ | 84 | Wiki | `reddit_wiki_page` | Read a wiki page | wikiread |
154
+ | 85 | Wiki | `reddit_wiki_edit` | Edit a wiki page | wikiedit |
155
+ | 86 | Wiki | `reddit_wiki_pages` | List wiki pages | wikiread |
156
+ | 87 | Wiki | `reddit_wiki_revisions` | Get wiki revision history | wikiread |
157
+ | 88 | Wiki | `reddit_wiki_page_revisions` | Get page revision history | wikiread |
158
+
159
+ ---
160
+
161
+ ## Non-Functional Requirements
162
+
163
+ ### Performance
164
+ - MCP tool calls should add < 100ms overhead on top of Reddit API latency
165
+ - Support concurrent tool calls
166
+
167
+ ### Security
168
+ - OAuth 2.0 tokens never logged or exposed in tool outputs
169
+ - Refresh tokens stored with restrictive file permissions (0o600)
170
+ - Request minimum scopes needed per operation
171
+
172
+ ### Reliability
173
+ - Graceful handling of rate limit exhaustion (429 responses)
174
+ - Retry with exponential backoff on transient 5xx errors (max 3 retries)
175
+ - Respect X-Ratelimit-Remaining / X-Ratelimit-Reset headers
176
+
177
+ ---
178
+
179
+ ## Technical Requirements
180
+
181
+ ### Technology Stack
182
+ - **Language**: TypeScript 5.x
183
+ - **Runtime**: Node.js 20+
184
+ - **Protocol**: MCP (via @modelcontextprotocol/sdk)
185
+ - **API Client**: Raw fetch with Reddit OAuth headers
186
+ - **Auth**: Reddit OAuth 2.0 (code grant + refresh tokens)
187
+ - **Validation**: zod
188
+ - **Build**: esbuild
189
+ - **Test**: Jest
190
+
191
+ ### Dependencies
192
+ - `@modelcontextprotocol/sdk` — MCP server implementation
193
+ - `zod` — Input validation for tool parameters
194
+
195
+ ### Reddit OAuth Scopes Used
196
+ - `identity` — /api/v1/me
197
+ - `read` — Browse listings, search, subreddit info
198
+ - `submit` — Create posts and comments
199
+ - `edit` — Edit and delete own content
200
+ - `vote` — Upvote/downvote
201
+ - `save` — Save/unsave
202
+ - `subscribe` — Subscribe/unsubscribe, multireddits
203
+ - `mysubreddits` — List my subs, karma
204
+ - `history` — User post/comment history
205
+ - `privatemessages` — Read/send private messages
206
+ - `flair` — Read/set flair
207
+ - `report` — Report/hide content
208
+ - `modposts` — Mod actions on posts/comments
209
+ - `modlog` — Read mod log
210
+ - `modcontributors` — Manage contributors/banned/muted
211
+ - `wikiread` — Read wiki pages
212
+ - `wikiedit` — Edit wiki pages
213
+ - `account` — Update prefs, block users
214
+
215
+ ---
216
+
217
+ ## User Stories
218
+
219
+ ### As an AI Agent
220
+ 1. I want to browse subreddit listings so I can summarize what's trending
221
+ 2. I want to search Reddit so I can find relevant discussions for users
222
+ 3. I want to post and comment so I can participate in discussions on behalf of users
223
+ 4. I want to read and send private messages so I can manage user communications
224
+ 5. I want to moderate subreddits so I can help manage communities
225
+
226
+ ### As a Developer
227
+ 1. I want to connect this MCP server to Claude so my agent can interact with Reddit
228
+ 2. I want clear error messages so I can debug API issues quickly
229
+ 3. I want both stdio and HTTP transport so I can deploy flexibly
230
+
231
+ ---
232
+
233
+ ## Constraints
234
+
235
+ ### Technical Constraints
236
+ - Reddit API rate limit: 100 QPM per OAuth client ID (averaged over 10-min window)
237
+ - Reddit requires unique descriptive User-Agent header
238
+ - OAuth requires user interaction for initial consent (authorization code flow)
239
+ - No official Reddit Node.js SDK — raw HTTP client needed
240
+
241
+ ### Resource Constraints
242
+ - Single developer
243
+ - Must work within free-tier API access for development
244
+
245
+ ---
246
+
247
+ ## Success Criteria
248
+
249
+ ### MVP Success Criteria
250
+ - [ ] OAuth 2.0 flow working (authorize, token refresh)
251
+ - [ ] Listing tools return posts from subreddits (hot, new, top, etc.)
252
+ - [ ] Search tool returns results
253
+ - [ ] Comment thread tool returns full comment trees
254
+ - [ ] Server works via stdio transport
255
+ - [ ] All Priority 1 endpoints implemented and tested
256
+
257
+ ### Full Release Success Criteria
258
+ - [ ] All 88 endpoints implemented
259
+ - [ ] Both stdio and streamable HTTP transports working
260
+ - [ ] Comprehensive error handling with rate limit awareness
261
+ - [ ] Documentation and usage examples
262
+ - [ ] Factory export for mcp-auth integration
263
+
264
+ ---
265
+
266
+ ## Out of Scope
267
+
268
+ 1. **Reddit Ads API** — separate API, separate project
269
+ 2. **Reddit Streaming (websocket)** — not in standard API
270
+ 3. **OAuth server/auth proxy** — handled by separate mcp-auth/reddit-mcp-server project
271
+ 4. **Web UI** — this is an MCP server only
272
+ 5. **Subreddit creation/settings** — complex mod-only operations, future enhancement
273
+ 6. **Reddit Chat** — uses different protocol, not standard API
274
+
275
+ ---
276
+
277
+ ## Assumptions
278
+
279
+ 1. Users have a registered Reddit OAuth application (script or web type)
280
+ 2. Users have OAuth client ID and secret configured
281
+ 3. MCP SDK remains stable
282
+ 4. Reddit API endpoints remain stable
283
+
284
+ ---
285
+
286
+ ## Risks
287
+
288
+ | Risk | Impact | Probability | Mitigation Strategy |
289
+ |------|--------|-------------|---------------------|
290
+ | Reddit API rate limiting | Medium | High | Respect rate limit headers, exponential backoff |
291
+ | Reddit API access restrictions tightening | High | Medium | Follow Reddit developer guidelines, register app properly |
292
+ | No official Node.js SDK | Medium | N/A | Build thin HTTP client wrapper with fetch |
293
+ | OAuth flow complexity | Medium | Medium | Follow youtube-mcp OAuth patterns |
294
+
295
+ ---
296
+
297
+ ## Timeline
298
+
299
+ ### Phase 1: Foundation + Listings MVP
300
+ - Project setup, OAuth flow, MCP server scaffold
301
+ - Priority 1 endpoints (Listings + Search)
302
+ - stdio transport
303
+
304
+ ### Phase 2: Content Interaction
305
+ - Priority 2 endpoints (Posts, Comments, Voting, Save)
306
+
307
+ ### Phase 3: Account, Users & Messages
308
+ - Priority 3 (Account, Users)
309
+ - Priority 4 (Subreddits, Flair, Messages)
310
+
311
+ ### Phase 4: Moderation
312
+ - Priority 5 (Mod actions, mod listings, mod management)
313
+
314
+ ### Phase 5: Advanced Features & Polish
315
+ - Priority 6 (Multireddits, Wiki)
316
+ - HTTP transport, documentation, factory export
317
+
318
+ ---
319
+
320
+ ## References
321
+
322
+ - [Reddit API Documentation](https://www.reddit.com/dev/api/): Official API reference
323
+ - [Reddit OAuth2 Wiki](https://github.com/reddit-archive/reddit/wiki/OAuth2): OAuth flow documentation
324
+ - [Reddit API Scopes](https://www.reddit.com/api/v1/scopes): Complete scope list
325
+ - [Reddit Data API Wiki](https://support.reddithelp.com/hc/en-us/articles/16160319875092-Reddit-Data-API-Wiki): Rate limits and policies
326
+ - [MCP Specification](https://modelcontextprotocol.io): Model Context Protocol docs
327
+ - [youtube-mcp](../../../youtube-mcp): Reference implementation for MCP server pattern
328
+
329
+ ---
330
+
331
+ **Status**: Active
332
+ **Last Updated**: 2026-03-10