AI Daily MCP Server

AI Daily MCP Server

Enables fetching daily AI news summaries aggregated from multiple sources including GitHub, Hacker News, Product Hunt, YouTube, Twitter, and Chinese AI sites.

Category
访问服务器

README

🤖 AI Daily

MIT License Python 3.10+ MCP Ubuntu

An open-source AI intelligence aggregation platform. Collect → Cluster → Summarize → Report.

每天自动采集 AI 行业动态,聚类、摘要并生成 AI 每日报告,同时提供 MCP 能力供 Hermes、Claude Desktop、Cursor 等调用。

每天 10 分钟,掌握 AI 圈重要动态。


Preview

AI Daily Report Preview


✨ 功能

功能 说明
6 个数据源 GitHub Trending、Hacker News、Product Hunt、YouTube、X (Twitter)、国产 AI
自动采集 每天定时运行,无需人工干预
增量采集 只采集新内容,不重复下载
事件聚类 同一事件在多个源中出现时自动合并
AI 摘要 支持 OpenAI / DeepSeek / Claude / Gemini / 本地模型
统一配置 YAML 配置,无需改代码
多实例容错 Nitter 多实例健康检查,自动切换

🚀 快速开始

环境要求

  • Python 3.10+
  • macOS / Linux / WSL

安装

# 1. 克隆
git clone https://github.com/chenxianseng001/ai-daily.git
cd ai-daily

# 2. 安装依赖
pip install -r requirements.txt

# 3. 运行(零配置启动)
python3 run_daily.py

首次运行说明:

  • 所有数据源默认开启
  • Product Hunt 和 GitHub Trending 无需 Token 即可运行(自动降级模式)
  • YouTube 需要安装 yt-dlp(已包含在 requirements.txt)
  • Twitter 使用内置 Nitter 实例

首次运行

python3 run_daily.py

执行流程:

  1. 并行采集 6 个数据源(约 1-2 分钟)
  2. 自动生成日报
  3. 输出到 output/YYYY-MM-DD/daily_report.md
  4. 同时打印到控制台

📖 配置说明

基本配置

编辑 config/config.yaml 即可控制:

# 启用/禁用数据源
github_trending:
  enabled: true

hacker_news:
  enabled: true

product_hunt:
  enabled: true

youtube:
  enabled: true

twitter:
  enabled: true

china_ai:
  enabled: true

展示数量

hacker_news:
  max_items: 10        # 日报中展示 Top N

product_hunt:
  show_top: 10         # 日报中展示 Top N

twitter:
  max_items: 10        # 日报中展示 Top N

环境变量(可选)

环境变量 用途
GITHUB_TOKEN GitHub API Token(提升 API 配额)
PRODUCT_HUNT_TOKEN Product Hunt API Token
AI_SUMMARY_API_KEY AI 摘要 API Key
AI_SUMMARY_PROVIDER AI 摘要 Provider(openai/deepseek/claude/gemini)

详细配置

各数据源的详细配置见:

文件 说明
config/config.yaml 全局配置
config/channels.yaml YouTube 频道白名单
config/twitter_accounts.yaml X 账号白名单 + Nitter 实例
config/china_ai_sources.yaml 国产 AI 新闻源

📊 数据源说明

数据源 采集方式 是否需要 Token
GitHub Trending 网页解析 + README 下载 可选(GITHUB_TOKEN)
Hacker News 官方 Firebase API ❌ 不需要
Product Hunt 网页解析 / GraphQL API 可选(PRODUCT_HUNT_TOKEN)
YouTube yt-dlp ❌ 不需要
X (Twitter) Nitter RSS(多实例) ❌ 不需要
国产 AI RSS(量子位/36氪/少数派) ❌ 不需要

🏗️ 项目架构

采集层(Collector)                   报告层(Reporter)
┌──────────────┐                  ┌──────────────────┐
│ GitHub       │ → JSON + raw →   │ Section: GitHub  │
│ Hacker News  │ → JSON + raw →   │ Section: HN      │
│ Product Hunt │ → JSON + raw →   │ Section: PH      │
│ YouTube      │ → JSON + raw →   │ Section: YT      │
│ X (Twitter)  │ → JSON + raw →   │ Section: X       │
│ 国产 AI      │ → JSON + raw →   │ Section: China   │
└──────────────┘                  └──────────────────┘
                                            ↓
                                    Event Clustering
                                            ↓
                                      AI Summary
                                            ↓
                                    Markdown 日报

核心设计原则

  • Data Contract:所有数据源使用统一 JSON Schema
  • 分离原则:Collector 只采集不分析,Reporter 只读取不联网
  • 模块化:新增数据源只需新建一个 Collector 文件 + 一个 Section 文件

📁 目录结构

ai-daily/
├── run_daily.py           # 统一运行入口(推荐)
├── run_collector.py       # 仅采集
├── run_reporter.py        # 仅生成报告
│
├── core/                  # 基础设施
│   ├── config.py          # 配置加载
│   ├── http_client.py     # HTTP 客户端(限流/重试/超时)
│   ├── logger.py          # 统一日志
│   └── utils.py           # 工具函数
│
├── collectors/            # 采集器(每个数据源一个)
│   ├── base_collector.py  # 基类 + State 管理
│   ├── github_trending.py
│   ├── hacker_news.py
│   ├── product_hunt.py
│   ├── youtube.py
│   ├── twitter.py
│   └── china_ai.py
│
├── reporter/              # 报告生成
│   ├── base_section.py    # Section 基类
│   ├── report_builder.py  # 报告构建器
│   ├── event_cluster.py   # 事件聚类
│   └── sections/          # 各数据源 Section
│
├── config/                # 配置文件
├── tests/                 # 单元测试
└── storage/ / output/     # 缓存/输出(自动生成)

🔧 如何新增一个数据源

只需 4 步:

1. 创建 Collector

collectors/my_source.py:

from collectors.base_collector import BaseCollector, CollectorResult

class MySourceCollector(BaseCollector):
    @property
    def source_name(self) -> str:
        return "my_source"

    def collect(self, state: dict) -> CollectorResult:
        # 1. 采集数据
        # 2. build_item() 构造 item
        # 3. write_raw() 保存原始内容
        # 4. write_json() 写入缓存
        ...

2. 添加到配置

config/config.yaml:

my_source:
  enabled: true
  max_items: 10

3. 注册到 run_collector.py

create_collectors() 中添加一行。

4. 创建 Section

reporter/sections/my_source_section.py:

from reporter.base_section import BaseSection

class MySourceSection(BaseSection):
    @property
    def name(self) -> str: return "My Source"
    @property
    def source_name(self) -> str: return "my_source"
    def render(self, items, config=None) -> str: ...

然后在 reporter/report_builder.pySECTIONS 中注册。


🧪 测试

# 运行所有测试
python3 -m pytest tests/ -v

# 运行特定测试
python3 -m pytest tests/test_summary.py -v

❓ 常见问题

Q: 需要 API Key 吗? A: 不需要。6 个数据源中 5 个无需任何 API Key 即可运行。配置 Token 可以获得更完整的数据。

Q: 运行需要多久? A: 首次运行约 1-2 分钟,后续增量运行约 30-60 秒。主要耗时在 YouTube 视频获取和 Hacker News 文章下载。

Q: 日报在哪里看? A: 运行后自动输出到 output/YYYY-MM-DD/daily_report.md

Q: 可以每天自动运行吗? A: 可以。使用 cron job 或 systemd timer(见 deploy/systemd/)。

Q: Product Hunt 怎么没有投票数? A: 网页降级模式无法获取实时投票数。配置 PRODUCT_HUNT_TOKEN 后可通过 API 获取。

Q: YouTube 字幕获取失败怎么办? A: 字幕获取失败不影响采集。Collector 会自动跳过,日志中会记录失败原因。

Q: 如何接入 Claude Desktop / Cursor? A: 详见 MCP_CONFIG.md


📄 License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选