Token导航 LogoToken导航TokenDH.com
MCP Reddit Digest logo
搜索检索stdio官方级别未说明来源级核验

MCP Reddit Digest

MCP Server

A FastAPI-based MCP server tool that fetches and summarizes top Reddit posts using Azure OpenAI. It generates a daily PDF digest and uploads it to Slack, with support for topic-based subreddits and scheduled jobs.

工具数

0

提示词数

0

GitHub Stars

1

资源数

0
PythonSlack搜索

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

omendra02

提供方

omendra02

最后核验

2026/5/18 02:50

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -r requirements.txt

详细介绍

MCP Reddit摘要服务器

基于FastAPI的MCP(模型上下文协议)服务器,可自动获取、汇总Reddit内容并将其直接传递给Slack。该系统使用Azure OpenAI创建选定子版块中热门帖子的简明摘要,将其格式化为有组织的PDF报告,并与您的团队共享。

✨ 特性

  • 🔍 智能Reddit监控:按主题(人工智能、网络安全、编程)获取热门帖子或指定自定义子版块
  • 🧠 AI驱动的摘要:使用Azure OpenAI压缩冗长的Reddit讨论
  • 📝 干净的Markdown格式:使用subreddit组织的帖子生成结构良好的摘要
  • 📄 专业PDF报告:使用自定义CSS将markdown转换为带样式的PDF
  • 🔔 Slack集成:自动将摘要传递到团队的Slack频道
  • ⏱️ 预定交货:按每日或自定义时间表配置自动摘要
  • 🧩 模块化架构:通过新功能或集成轻松扩展

MCPHub认证: Reddit摘要-omendra02 MCP服务器

先决条件

  • Python 3.8+
  • Reddit API证书
  • Azure OpenAI API访问
  • Slack工作空间与机器人集成

环境设置

创建一个 .env 项目根目录中的文件,包含以下变量:

# Reddit API
REDDIT_CLIENT_ID=your_client_id
REDDIT_CLIENT_SECRET=your_client_secret
REDDIT_USERNAME=your_username
REDDIT_PASSWORD=your_password
USER_AGENT=your_user_agent

# Azure OpenAI
AZURE_OPENAI_KEY=your_openai_key
AZURE_OPENAI_API_VERSION=your_api_version
AZURE_OPENAI_ENDPOINT=your_endpoint
AZURE_OPENAI_DEPLOYMENT=your_deployment_name

# Slack
SLACK_BOT_TOKEN=your_slack_bot_token
SLACK_CHANNEL_ID=your_channel_id

安装

# Clone the repository
git clone https://github.com/yourusername/mcp-reddit-digest.git
cd mcp-reddit-digest

# Install dependencies
pip install -r requirements.txt

# Start the server
uvicorn mcp_server.main:app --reload

🔧 用法

API终点

  • GET / -健康检查端点
  • POST /mcp/hello -用于验证连接的测试端点
  • POST /mcp/reddit -按主题(人工智能、网络安全、技术更新等)生成摘要
  • POST /mcp/reddit/subreddit -从自定义子版块生成摘要

请求示例

按主题生成摘要:

curl -X POST "http://localhost:8000/mcp/reddit" \
  -H "Content-Type: application/json" \
  -d '{"input": "ai"}'

为特定的子版块生成摘要:

curl -X POST "http://localhost:8000/mcp/reddit/subreddit" \
  -H "Content-Type: application/json" \
  -d '{"input": "MachineLearning, artificial, IndiaTech"}'

⚙️ 配置

预定摘要

系统配置为运行计划摘要。编辑 scheduler.py 调整时间:

# For production (runs daily at 9 AM)
scheduler.add_job(scheduled_reddit_digest, 'cron', hour=9, minute=0)

# For testing (runs every minute)
scheduler.add_job(scheduled_reddit_digest, 'interval', minutes=1)

主题映射

默认主题到subreddit的映射在中定义 reddit_fetcher.py.根据需要添加或修改映射:

TOPIC_SUBREDDITS = {
    "tech update": ["technology", "technews", "IndiaTech", "developersIndia"],
    "ai": ["MachineLearning", "ArtificialIntelligence", "Singularity", "artificial"],
    # Add new mappings here
}

🔄 项目结构

mcp_server/
├── core/
│   ├── slack_notifiers.py    # Slack integration
│   ├── summarizer.py         # Azure OpenAI integration
│   └── utils.py              # Helper functions
├── tools/
│   ├── hello_tool.py         # Simple test tool
│   └── reddit_digest/        # Reddit digest functionality
│       ├── markdown_generator.py
│       ├── pdf_generator.py
│       ├── reddit_fetcher.py
│       ├── style.css         # PDF styling
│       └── tool.py           # Main digest logic
├── main.py                   # FastAPI application
├── mcp.json                  # Tool definitions
└── scheduler.py              # Automated tasks

目录标签

目录标签

PythonSlack搜索research-and-dataReddit摘要本地部署AI总结Slack集成PDF报告自动化

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP