内容
# Reddit MCP 服务器 ⚙️
一款提供获取和创建Reddit内容的工具的模型上下文协议(MCP)。
[](https://smithery.ai/server/@alexandros-lekkas/reddit-mcp-server)
https://github.com/user-attachments/assets/caa37704-7c92-4bf8-b7e8-56d02ccb4983
## 🧑💻 关于
https://www.linkedin.com/feed/update/urn:li:activity:7328864060534419457/

## 🔧 可用工具(功能)
**只读工具(客户端凭证):**
- `get_user_info(username)` - 获取具有参与度洞察的详细用户信息
- `get_top_posts(subreddit, time_filter, limit)` - 获取并分析顶帖
- `get_subreddit_stats(subreddit)` - 获取综合的子版块分析
- `get_trending_subreddits()` - 获取 trending 子版块列表
**读写工具(用户凭证):**
- `create_post(subreddit, title, content, flair, is_self)` - 创建优化的帖子
- `reply_to_post(post_id, content, subreddit)` - 添加具有参与度洞察的回复
- `reply_to_comment(comment_id, content, subreddit)` - 添加战略性回复
## 🔌 安装
### 通过 Smithery 安装
通过 [Smithery](https://smithery.ai/server/@alexandros-lekkas/reddit-mcp-server) 自动安装 Reddit 内容集成服务器:
```bash
npx -y @smithery/cli install @alexandros-lekkas/reddit-mcp-server --client claude
```
### 手动安装
1. `git clone https://github.com/alexandros-lekkas/reddit-mcp-server`
2. 在此处创建一个 Reddit 应用:[https://www.reddit.com/prefs/apps](https://www.reddit.com/prefs/apps)

确保选择“脚本”!
3. 复制客户端 ID 和客户端密钥
4. 根据 `.env.example` 创建一个 `.env` 文件
使用您的 `REDDIT_CLIENT_ID` 和 `REDDIT_CLIENT_SECRET` 进行此操作
如果您想发布帖子,则需要包含您的 `REDDIT_USERNAME` 和 `REDDIT_PASSWORD`(不要担心,我不会窃取它们 😜)
5. 运行 `npm run dev` 并打开检查服务器(http://127.0.0.1:6274/)

6. 如果连接成功,请将以下内容添加到您的 MCP 配置中(适用于 Cursor 或 Claude,具体取决于您使用的代理)
```json
"mcpServers": {
"reddit": {
"command": "node",
"args": [
"C:\\path\\to\\reddit-mcp-server\\build\\index.js" // 替换为本地 build/index.js 的路径
],
"env": {
"REDDIT_CLIENT_ID": "😜",
"REDDIT_CLIENT_SECRET": "😜",
"REDDIT_USERNAME": "😜",
"REDDIT_PASSWORD": "😜"
},
"autoApprove": [
"get_reddit_post",
"get_top_posts",
"get_user_info",
"get_subreddit_info",
"get_trending_subreddits",
"create_post",
"reply_to_post"
] // 您不需要添加此内容,但这样您就不必一直点击批准
}
}
```
(确保用实际密钥替换环境变量,而不是 😜 表情符号)
## 📚 致谢
- 感谢 Arindam200 的 [Python Reddit MCP 服务器](https://github.com/Arindam200/reddit-mcp) 提供的灵感和这些工具的实现。目前,该仓库只是 Python 实现的 Node.js 端口。
- 感谢 Eugene Sh 的 [MCP 服务器构建教程](https://medium.com/@eugenesh4work/how-to-build-an-mcp-server-fast-a-step-by-step-tutorial-e09faa5f7e3b),本实现参考了该教程。
连接信息
猜你喜欢
X视频文案提取
X / Twitter 视频文案提取 MCP Server — 专注解析 X 平台公开视频链接(x.com / twitter.com status...
cc-switch
跨平台的Claude Code、Codex和Gemini CLI一体化助手。
awesome-mcp-servers
一组 MCP 服务器。
Git
一个用于Git自动化和交互的模型上下文协议服务器。
oh-my-opencode
背景代理 · 精心挑选的代理,如 oracle、librarians、frontend engineer · 预构建工具,如 LSP/AST ·...
TrendRadar
TrendRadar:30秒内为您提供真实新闻的热点助手。