内容
# AI 新闻聚合器
AI 新闻聚合器,学术论文和 trending 仓库,来自 10 个可靠来源。
[](https://mcp-ai-news.onrender.com/health)
[](https://python.org)
[](LICENSE)
---
## 快速开始
**使用 API(无需安装):**
```bash
curl "https://mcp-ai-news.onrender.com/news?days=7&limit=5"
```
**为 Claude Code 安装 MCP:**
```bash
git clone https://github.com/LauraMattz/mcp_ai_news.git && cd mcp_ai_news
pip install -r requirements.txt
# 重新加载 Claude Code(Ctrl+Shift+P → Reload Window)
```
---
## 公共 API
**基准:** `https://mcp-ai-news.onrender.com` | **文档:** [Swagger UI](https://mcp-ai-news.onrender.com/docs)
| 端点 | 描述 |
|----------|-----------|
| [/news?days=7&limit=10](https://mcp-ai-news.onrender.com/news?days=7&limit=10) | 所有新闻 |
| [/search?q=GPT](https://mcp-ai-news.onrender.com/search?q=GPT) | 关键词搜索 |
| [/papers?days=7](https://mcp-ai-news.onrender.com/papers?days=7) | ArXiv 论文 |
| [/github?days=7](https://mcp-ai-news.onrender.com/github?days=7) | trending 仓库 |
**来源:** OpenAI, Anthropic, Google AI, DeepMind, Hugging Face, MIT Tech Review, TechCrunch, The Verge, ArXiv (cs.AI/cs.LG/cs.CL/cs.CV/stat.ML), GitHub
**功能:** 15 分钟缓存 • CORS 启用 • 免费 • ~180+ 项目聚合
---
## 安装
### MCP 服务器(Claude Code)
`.mcp.json` 已经配置在项目根目录下。 在 `git clone` 和 `pip install` 后,只需重新加载 Claude Code。
**适用于 Claude Desktop:**
将以下内容添加到 `claude_desktop_config.json`([Windows/Mac/Linux 路径](https://modelcontextprotocol.io/quickstart)):
```json
{
"mcpServers": {
"ai-news": {
"command": "python",
"args": ["/完整路径/到/server.py"]
}
}
}
```
### REST API(本地)
```bash
python api.py
# 访问:http://localhost:8000/docs
```
---
## 使用
**MCP(Claude Code/Desktop):**
```
"列出最新的 AI 新闻"
"搜索关于变换器的内容"
"显示关于计算机视觉的 ArXiv 论文"
```
**REST API:**
```bash
curl "https://mcp-ai-news.onrender.com/news?days=7&limit=20"
curl "https://mcp-ai-news.onrender.com/search?q=GPT&days=14"
curl "https://mcp-ai-news.onrender.com/papers?days=3&max_results=10"
```
**完整文档:** [Swagger UI](https://mcp-ai-news.onrender.com/docs) • [ReDoc](https://mcp-ai-news.onrender.com/redoc)
---
## 开发
**添加 RSS 源:**
```python
# 在 server.py 和 api.py 中
FONTES_RSS["新源"] = {
"名称": "名称", "网址": "https://...", "激活": True
}
```
**测试:**
```bash
python server.py # MCP 服务器
python api.py # REST API → http://localhost:8000/docs
npx @modelcontextprotocol/inspector python server.py # MCP 检查器
```
**结构:**
```
├── server.py # MCP 服务器(stdio)
├── api.py # REST API(FastAPI)
├── .mcp.json # Claude Code 配置
└── render.yaml # 部署配置
```
---
## 许可证
MIT 许可证 - 查看 [LICENSE](LICENSE)
**由 [Laura Mattos](https://github.com/LauraMattz)** • [LinkedIn](https://www.linkedin.com/in/lauramattosc/) 开发
**技术栈:** [MCP](https://modelcontextprotocol.io) • [FastAPI](https://fastapi.tiangolo.com) • [ArXiv API](https://arxiv.org/help/api)