](https://smithery.ai/server/@saginawj/mcp-reddit-companion)
MCP Reddit伴侣
一个MCP工具,可以与您的个人Reddit体验进行自然语言交互。在Reddit上创建定制的订阅源,并使用您最喜欢的LLM客户端来分析、总结和参与对您重要的内容。
LLM命令示例
以下是一些可以与LLM客户端一起使用的示例命令:
# Basic Feed Interaction
"Show me the latest posts from my 'tech-news' feed"
"Summarize the top posts from my 'science' feed"
"What are the trending topics in my 'programming' feed?"
# Content Analysis
"What are the common themes in my 'ai' feed?"
"Which of my recent posts got the most engagement?"
"Summarize the discussions in my 'philosophy' feed"
# Personal Activity
"Show me my recent Reddit activity"
"What comments have I received on my posts?"
"Are there any unread messages in my inbox?"
# Engagement Tracking
"How are my recent posts performing?"
"Show me the most active discussions in my feeds"
"What posts got the most comments in my 'news' feed?"先决条件
- Python 3.11+
- Reddit帐户凭据(用户名、密码)
- Docker(可选,用于容器化部署)
- MCP兼容的LLM客户端(如Cursor)
安装
本地安装
- 克隆存储库:
git clone https://github.com/yourusername/mcp-reddit.git
cd mcp-reddit- 使用uv安装依赖项:
uv pip install .- 创建一个
.env使用您的Reddit API凭据文件:
REDDIT_CLIENT_ID=your_client_id
REDDIT_CLIENT_SECRET=your_client_secret
REDDIT_USERNAME=your_username
REDDIT_PASSWORD=your_passwordDocker安装
- 构建Docker镜像:
docker build -t mcp-reddit .- 运行容器(用于带有特殊字符的密码):
docker run \
-e REDDIT_CLIENT_ID='your_client_id' \
-e REDDIT_CLIENT_SECRET='your_client_secret' \
-e REDDIT_USERNAME='your_username' \
-e REDDIT_PASSWORD='your_password' \
mcp-reddit注意:如果您的密码包含特殊字符(如!、$等),请确保:
- 在密码周围使用单引号
- 用反斜杠转义任何特殊字符
- 或者使用双引号并转义特殊字符
带有特殊字符的示例:
docker run \
-e REDDIT_CLIENT_ID='your_client_id' \
-e REDDIT_CLIENT_SECRET='your_client_secret' \
-e REDDIT_USERNAME='your_username' \
-e REDDIT_PASSWORD='your\!password' \
mcp-reddit用法
本地使用
- 启动MCP服务器:
uv run mcp dev src/mcp_reddit_companion/server.py或
- 在Claude桌面中安装
uv run mcp install src/mcp_reddit_companion/server.py Docker使用
容器运行时,MCP服务器将自动启动。连接您的LLM客户端以与您的Reddit提要进行交互。
配置
光标集成
要与Cursor一起使用,请将以下内容添加到您的 ~/.cursor/mcp.json:
{
"mcpServers": {
"reddit-companion": {
"command": "uv",
"args": [
"--directory",
"C:\\code\\personal\\mcp-reddit",
"run",
"mcp",
"dev",
"src/mcp_reddit_companion/server.py"
]
}
}
}许可证
麻省理工学院
