Fire in da houseTop Tip:Most people pay up to $340 per month for Perplexity, MidJourney, Runway, ChatGPT, and more - but you can get them all your AI tools for $15 with Galaxy. It's free to test!Fire in da houseCheck it out

RSSHUB-MCP

MCP.Pizza Chef: RechardLLee

RSSHUB-MCP is a Python-based MCP server that fetches and intelligently parses RSS feeds from multiple RSSHub instances. It supports automatic failover between instances, handles rsshub:// links, randomizes user agents, cleans HTML content, and converts time zones automatically. It returns structured JSON data for easy integration with LLMs and other tools, enabling reliable and flexible RSS feed consumption.

Use This MCP server To

Fetch RSS feeds from multiple RSSHub instances with failover Parse and clean RSS feed content into structured JSON Automatically convert RSS feed timestamps to local timezones Support rsshub:// link format for seamless feed retrieval Randomize user agents to avoid request blocking Integrate RSS feed data into LLM workflows for real-time updates

README

RSSHUB MCP 工具

RSSHUB MCP 是一个用于获取和解析 RSS 源的 Python 工具,它支持多种 RSSHub 实例,并提供了自动故障转移功能。

功能特点

  • 支持多种 RSSHub 实例自动切换
  • 自动处理 rsshub:// 格式的链接
  • 智能解析 RSS 源内容
  • 支持多种用户代理随机切换
  • 自动清理 HTML 内容
  • 支持 JSON 格式的输入
  • 自动时区转换

支持的 RSSHub 实例

工具内置了多个 RSSHub 实例,包括:

  • rsshub.app
  • rsshub.rssforever.com
  • rsshub.feeded.xyz
  • hub.slarker.me
  • 等多个公共实例

使用方法

基本用法

from rsshub import rsshub_get_feed

# 使用 rsshub:// 格式
result = await rsshub_get_feed("rsshub://bilibili/user/video/123456")

# 使用标准 URL 格式
result = await rsshub_get_feed("https://rsshub.app/bilibili/user/video/123456")

# 使用简写格式
result = await rsshub_get_feed("bilibili/user/video/123456")

返回数据格式

工具返回的数据包含以下字段:

{
    "title": "RSS源标题",
    "link": "RSS源链接",
    "description": "RSS源描述",
    "items": [
        {
            "title": "文章标题",
            "description": "文章描述",
            "link": "文章链接",
            "guid": "文章唯一标识",
            "pubDate": "发布时间",
            "author": "作者",
            "category": ["分类标签1", "分类标签2"]
        }
    ]
}

环境要求

  • Python 3.8+
  • 依赖包:
    • httpx
    • feedparser
    • beautifulsoup4
    • pytz

安装方法

方法一:使用 pip

  1. 克隆仓库
  2. 安装依赖:
pip install -r requirements.txt

方法二:使用 uv(推荐)

uv 是一个极快的 Python 包管理器,安装过程如下:

  1. 安装 uv(如果尚未安装):
pip install uv
  1. 创建并初始化项目(如果是新项目):
uv init rsshub
cd rsshub
  1. 创建虚拟环境:
uv venv
  1. 激活虚拟环境:
.venv\Scripts\activate  # Windows
#
source .venv/bin/activate  # Linux/macOS
  1. 安装依赖:
uv pip install -r requirements.txt

Docker

推荐使用 docker 镜像来启动 mcp server

docker compose up -d

启动后配置SSE的服务如下:

{
    "mcpServers": {
        "rsshub": {
            "url": "http://localhost:8081/sse/",
            "timeout": 60,
        },
    }
}

使用演示 (qwen_agent)

  1. 加载模型 http://localhost:8080/v1 : llama-server --alias "qwen3-32b:q4_k_m" -m Qwen3-32B-Q4_K_M.gguf -ngl 99
  2. 启动 MCP server http://localhost:8081/sse : docker compose up -d
  3. 安装 qwen_agent : uv pip install "qwen-agent[rag,code_interpreter,gui,mcp]"
from qwen_agent.agents import Assistant
from qwen_agent.utils.output_beautify import typewriter_print

llm_cfg = {
    "model": "qwen3-32b:q4_k_m", # load model with llama.cpp
    "model_server": "http://localhost:8080/v1",  # base_url, also known as api_base
    "api_key": "EMPTY",
    "generate_cfg": {
        "temperature": 0.6,
        "top_p": 0.6,
        "top_k": 20,
        "presence_penalty": 1.5,
    },
}

tools = [
    {
        "mcpServers": {
            "myserver": {
                "url": "http://localhost:8081/sse/",
                "timeout": 60,
            },
        }
    }
]

system_prompts = """你是个新闻抓取的帮助AI。在收到用户的指令后,你应该:
- 优先分析给定的内容是否 rsshub 工具可以处理的内容
- 获取内容后,将信息汇总并组织成一个连贯的总结
"""

bot = Assistant(llm=llm_cfg, system_message=system_prompts, function_list=tools)

messages = [{"role": "user", "content": "使用 rsshub 工具获取 rsshub://zaobao/realtime/world 的最新内容"}]

response_plain_text = ""
for response in bot.run(messages=messages):
    response_plain_text = typewriter_print(response, response_plain_text)

注意事项

  • 工具会自动尝试多个 RSSHub 实例,直到成功获取数据
  • 所有实例都失败时才会抛出异常
  • 支持自动清理 HTML 标签,提取纯文本内容
  • 时间会自动转换为 UTC 时区

许可证

MIT License

RSSHUB-MCP FAQ

How does RSSHUB-MCP handle multiple RSSHub instances?
It automatically switches between multiple built-in RSSHub instances to ensure reliable feed retrieval and failover.
Can RSSHUB-MCP parse non-standard rsshub:// links?
Yes, it supports automatic handling and parsing of rsshub:// formatted links.
What data format does RSSHUB-MCP return?
It returns RSS feed data in structured JSON format including titles, links, descriptions, and publication dates.
Does RSSHUB-MCP support time zone conversion?
Yes, it automatically converts publication dates to the appropriate time zone for consistency.
How does RSSHUB-MCP avoid being blocked by RSSHub servers?
It randomizes user agents on requests to reduce the chance of blocking or throttling.
Is RSSHUB-MCP compatible with multiple LLM providers?
Yes, it can be integrated with OpenAI, Anthropic Claude, and Google Gemini for enhanced AI workflows.