Skip to main content
Glama

MCP RSS News Agent

by teo4348
MIT License

MCP RSS 新闻代理

基于 FastMCP 的 RSS 新闻聚合和处理代理,可以发现、获取和汇总来自各种 RSS 提要的内容。

特征

  • 发现任何网站的 RSS 源
  • 从 RSS 源获取条目
  • 从 feed 条目中提取并格式化内容
  • 从任何 URL 提取并处理 Web 内容
  • 按关键字搜索新闻文章
  • 生成新闻文章摘要
  • 按类别和国家获取热门新闻

安装

  1. 克隆存储库
  2. 安装所需的依赖项:
pip install -r requirements.txt
  1. 如果需要环境变量,请创建一个.env文件(可选)

用法

启动 MCP 服务器

python server.py

这将启动 MCP 服务器,提供各种 RSS 相关工具。

可用工具

  1. get_rss_feed_entries :从 RSS feed URL 获取条目
  2. discover_rss_feeds :查找网站上可用的 RSS 提要
  3. download_feed_content :下载并处理 feed 条目的内容
  4. fetch_webpage :使用高级技术从任何网页 URL 中提取主要内容(新)
  5. search_news_by_keyword :使用关键字在多个 feed 中搜索新闻文章
  6. create_news_summary :创建新闻文章摘要
  7. get_top_news_from_category :获取特定类别和国家的热门新闻

示例

在网站上发现 RSS 源

response = mcp.invoke("discover_rss_feeds", {"website_url": "https://www.theguardian.com"}) print(f"Found {response['feeds_count']} feeds") for feed in response['feeds']: print(f"- {feed['title']}: {feed['url']}")

通过关键字获取新闻文章

response = mcp.invoke("search_news_by_keyword", { "keyword": "climate change", "max_results": 5 }) for article in response['results']: print(f"- {article['title']} ({article['source']})") print(f" Link: {article['link']}") print()

从任何网页提取内容

response = mcp.invoke("fetch_webpage", { "url": "https://example.com/article", "output_format": "markdown", "include_images": True }) print(f"Title: {response['title']}") print(f"Extraction method: {response['extracted_by']}") print(f"Content preview: {response['content'][:200]}...")

获取某个类别的热门新闻

response = mcp.invoke("get_top_news_from_category", { "category": "technology", "country": "us", "max_results": 3 }) for article in response['results']: print(f"- {article['title']} ({article['source']})")

客户端示例

该项目包括一个命令行客户端( client_example.py ),可以轻松访问所有 MCP 服务器工具:

# Get feed entries python client_example.py feed https://www.theguardian.com/international/rss # Search news by keyword python client_example.py search "artificial intelligence" # Extract content from a webpage with advanced extraction python client_example.py webpage https://example.com/article --format markdown --images --save # Get news by category python client_example.py category technology --country us

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

基于 FastMCP 的服务器,提供用于发现 RSS 提要、获取和处理新闻内容、按关键字搜索文章以及跨多个新闻源和类别生成摘要的工具。

  1. 特征
    1. 安装
      1. 用法
        1. 启动 MCP 服务器
        2. 可用工具
      2. 示例
        1. 在网站上发现 RSS 源
        2. 通过关键字获取新闻文章
        3. 从任何网页提取内容
        4. 获取某个类别的热门新闻
      3. 客户端示例
        1. 贡献
          1. 执照

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              This MCP server performs multi-topic searches in business, news, finance, and politics using the Tavily API, providing high-quality sources and intelligent summaries.
              Last updated -
              1
              1
              Python
              MIT License
              • Apple
              • Linux
            • -
              security
              A
              license
              -
              quality
              An MCP server implementation that integrates the RSS3 API, allowing users to query data from decentralized chains, social media platforms, and the RSS3 network through natural language.
              Last updated -
              1
              JavaScript
              MIT License
            • -
              security
              F
              license
              -
              quality
              An MCP server that fetches RSS feeds and shares them with LLMs, allowing AI assistants to access and present the latest news and articles from configured feeds.
              Last updated -
              1
              TypeScript
            • -
              security
              F
              license
              -
              quality
              A FastMCP-based service that provides stock data including historical prices, fundamental information, and financial news.
              Last updated -
              1
              Python
              • Linux
              • Apple

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/teo4348/mcp-rss-news-agent'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server