使用说明
Reddit MCP服务器
支持AI代理和开发工具的模型上下文协议(MCP)服务器 (如Continue.dev或VS Code MCP客户端)与Reddit安全交互 通过官方的Reddit API。
此服务器支持用于读取subreddit内容的经过身份验证的用户工作流 以及可选地起草具有明确用户批准的帖子/评论。
✨ 特性
| 能力 | 状态 |
|---|---|
| 通过Reddit OAuth2进行用户身份验证 | ✅ |
| 搜索subreddit帖子 | ✅ |
| 检索帖子详细信息+评论 | ✅ |
| 按关键字、天赋或时间框架筛选 | 🚧 |
| 草稿帖子/评论(仅限用户触发) | 🚧 |
| 主持人协助(获取报告、队列) | 已计划 |
🔐 该项目执行 人在循环 行动。
没有自动发布、投票或批量抓取。
🔄 架构概述
MCP客户端(VS代码/CLI/代理)──► Reddit MCP服务器──► Reddit API │ └──► 安全用户OAuth
- 使用 Node.js/TypeScript
- 通过以下方式与Reddit集成 OAuth2+范围的API权限
- MCP接口将Reddit操作作为结构化工具公开
🛠 技术栈
- Node.js –服务器运行时
- 快速 –API路由(可选)
- Reddit OAuth2 API –身份验证+数据访问
- 模型上下文协议(MCP) –工具界面
🔐 使用的Reddit API范围
| 范围 | 目的 |
|---|---|
read |
检索帖子、评论、subreddit信息 |
identity |
识别和验证用户 |
submit (可选) |
仅在人工确认的情况下创建帖子/评论 |
只有在用户同意的情况下才能添加其他范围。
🚀 入门指南
git clone https://github.com/<your-username>/reddit-mcp-server
cd reddit-mcp-server
npm install
npm start
🧩 MCP Tools (Example)
Tool Description
search_posts Search posts by subreddit + keywords
get_comments Fetch comments for a given post ID
create_post Start a draft post (manual user submit required)
Example prompt:
"Search r/kubernetes for posts about 'autoscaling' in the past week"