Newsblaster
Symfony 8应用程序使用人工智能聚合YouTube视频中关于特定主题的每日新闻。它获取过去24小时的视频记录,使用Anthropic的Claude生成摘要,并将报告存储在PostgreSQL中。MCP服务器允许AI助手直接查询新闻数据。
特性
- YouTube视频发现:查找过去24小时内发布的与配置主题相关的视频
- 转录提取:检索视频转录以进行内容分析
- AI驱动的总结:使用Claude按主题生成每日新闻报道
- PostgreSQL存储:保留每日报告以供历史访问
- MCP服务器:将新闻数据暴露给Claude Desktop等人工智能助手
需求
- PHP 8.4+
- 作曲家
- PostgreSQL
- Symfony CLI(推荐)
- 无烟煤API键
安装
# Clone the repository
git clone
cd newsblaster
# Install dependencies
composer install
# Configure environment
cp .env .env.local
# Edit .env.local with your credentials:
# - ANTHROPIC_API_KEY
# - DATABASE_URL配置
环境变量
创建 .env.local 与:
ANTHROPIC_API_KEY=your-anthropic-api-key
DATABASE_URL="postgresql://user:password@localhost:5432/newsblaster?serverVersion=16"AI配置
AI平台配置在 config/packages/ai.yaml默认情况下,它使用Anthropic的Claude进行文本生成和摘要。
用法
开发服务器
symfony server:start -d控制台命令
# List available commands
php bin/console list
# Clear cache
php bin/console cache:clearMCP服务器
要将Newsblaster暴露给Claude Desktop,请执行以下操作:
php bin/console mcp:server添加到Claude桌面配置(~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
"newsblaster": {
"command": "php",
"args": ["/path/to/newsblaster/bin/console", "mcp:server"]
}
}
}建筑
src/
├── Command/ # Console commands (scheduled jobs)
├── Controller/ # HTTP controllers
├── Entity/ # Doctrine entities (Topic, Report)
├── Repository/ # Database queries
├── Service/ # Business logic (YouTube, AI, Report generation)
├── Tool/ # AI agent tools
└── Mcp/ # MCP server tools发展
看 CLAUDE.md 用于开发指南和代码模式。
运行测试
php bin/phpunit许可证
麻省理工学院
