
这是一个用TypeScript构建的模型上下文协议(MCP)服务器。它提供了一个多功能工具,可以获取和解析任何标准RSS/Atom订阅源,并且对RSSHub订阅源有特殊支持。
概览
这是一台使用 TypeScript 构建的模型上下文协议(MCP)服务器。它提供了一个多功能工具,可以获取和解析任何标准 RSS/Atom 订阅源,并且对 RSSHub 订阅源有特殊支持。通过该服务器,语言模型或其他 MCP 客户端可以轻松从各种网络源检索结构化内容。 服务器内置了公共RSSHub实例列表,并支持轮询机制自动选择可用实例,显著提升了数据检索的成功率和稳定性。 - : 从给定 URL 获取并解析任何标准 RSS/Atom 订阅源。- : 提供名为 get_feed 的工具,通过 MCP 获取任何支持 RSSHub 的订阅源,支持多实例。- : 指定要检索的订阅源数量,支持获取所有项目。- : 包含公共 RSSHub 实例列表,并自动轮询以查找可用服务。- : 支持标准 RSSHub URL 和简化的 rsshub:// 协议格式。
概述(AI 翻译)
这是一台使用 TypeScript 构建的模型上下文协议(MCP)服务器。它提供了一个多功能工具,可以获取和解析任何标准 RSS/Atom 订阅源,并且对 RSSHub 订阅源有特殊支持。通过该服务器,语言模型或其他 MCP 客户端可以轻松从各种网络源检索结构化内容。
服务器内置了公共RSSHub实例列表,并支持轮询机制自动选择可用实例,显著提升了数据检索的成功率和稳定性。
✨ 特色
- 通用订阅解析:从给定URL获取并解析任何标准RSS/Atom订阅源。
- 增强版RSSHub支持:提供名为
get_feed的工具,通过MCP获取任何RSSHub支持的订阅源,支持多实例。 - 可自定义物品数量:指定要检索的馈送物品数量,并支持获取所有物品。
- 多实例支持:包含公共RSSHub实例列表,并自动轮询以查找可用服务。
- 智能URL解析:支持标准RSSHub URL和简化的
rsshub://协议格式。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
RSS MCP Server
This is a Model Context Protocol (MCP) server built with TypeScript. It provides a versatile tool to fetch and parse any standard RSS/Atom feed, and also includes special support for RSSHub feeds. With this server, language models or other MCP clients can easily retrieve structured content from various web sources.
The server comes with a built-in list of public RSSHub instances and supports a polling mechanism to automatically select an available instance, significantly improving the success rate and stability of data retrieval.
✨ Features
- Universal Feed Parsing: Fetch and parse any standard RSS/Atom feed from a given URL.
- Enhanced RSSHub Support: Provides a tool named
get_feedto fetch any RSSHub-supported feed via MCP, with multi-instance support. - Customizable Item Count: Specify the number of feed items to retrieve, with support for fetching all items.
- Multi-instance Support: Includes a list of public RSSHub instances and automatically polls to find an available service.
- Smart URL Parsing: Supports standard RSSHub URLs and a simplified
rsshub://protocol format. - Priority Instance Configuration: Allows setting a preferred RSSHub instance via the
PRIORITY_RSSHUB_INSTANCEenvironment variable. - Robust Error Handling: If a request to one instance fails, it automatically tries the next one until it succeeds or all instances have failed.
- Content Cleaning: Uses Cheerio to clean the feed content and extract plain text descriptions.
- Standardized Output: Converts the fetched RSS feed into a structured JSON format.
📦 Installation
First, clone the project repository, then install the required dependencies.
git clone https://github.com/veithly/rss-mcp.git
cd rss-mcp
npm install
🚀 Usage
1. Build the Project
Before running, you need to compile the TypeScript code into JavaScript:
npm run build
2. Run the Server
After a successful build, start the MCP server:
npm start
The server will then communicate with the parent process (e.g., Cursor) via Stdio.
3. Configure a Priority Instance (Optional)
You can create a .env file to specify a priority RSSHub instance. This is very useful for users who have a private, stable instance.
Create a .env file in the project root directory and add the following content:
PRIORITY_RSSHUB_INSTANCE=https://my-rsshub.example.com
The server will automatically load this configuration on startup and place it at the top of the polling list.
🔧 MCP Server Configuration
安装
npx rss-mcp