A Model Context Protocol (MCP) server for RSSHub, providing structured access to RSS feeds and content through the MCP protocol.
This project is a complete RSSHub MCP solution implemented in Rust with a multi-crate workspace structure. It provides not only metadata discovery but also actual RSS content retrieval, making it a full-featured RSS workflow tool.
- β Complete RSS Workflow: Discover feeds β Configure parameters β Retrieve actual RSS content
- β Smart Search: Filter through 250+ namespaces efficiently with keyword search
- β Type Safety: Full compile-time guarantees through Rust's type system
- β High Performance: Async/await with tokio for efficient I/O operations
- β Robust Architecture: Clean separation of concerns across 3 crates
- β Comprehensive Testing: Independent test clients for validation
rsshub-mcp/
βββ Cargo.toml # Workspace configuration
βββ rsshub-api/ # RSSHub API client library
β βββ Cargo.toml
β βββ src/
β βββ lib.rs # Core API client implementation
βββ rsshub-mcp/ # MCP server implementation
β βββ Cargo.toml
β βββ src/
β βββ main.rs # Server entry point
β βββ service.rs # MCP service implementation
β βββ config.rs # Configuration management
β βββ log.rs # Logging configuration
βββ mcp-client/ # Testing client
βββ Cargo.toml
βββ src/
βββ quick_test.rs # Quick functionality test
βββ simple_test.rs # Basic connection test
- Purpose: Standalone RSSHub API client library
- Features:
- Complete implementation of core RSSHub API methods
- RSS content retrieval functionality
- Error handling using eyre
- Async operation support
- Can be used as an independent library
- Purpose: MCP (Model Context Protocol) server
- Features:
- Built on ultrafast-mcp framework
- Depends on rsshub-api library
- Provides 10 MCP tools (including RSS content retrieval)
- HTTP transport protocol support
- Purpose: Testing and validation tools
- Features:
- Quick functionality testing (quick_test)
- Basic connection testing (simple_test)
- Used for development and debugging
The server exposes tools for RSSHub interaction via MCP:
-
get_all_namespaces- Get all available namespaces -
get_namespace- Get routes for a specific namespace -
search_namespacesπ - Search namespaces by keyword (much more practical than listing all) -
get_radar_rules- Get all radar rules for automatic feed detection -
get_radar_rule- Get a specific radar rule by name -
get_categories- List known categories (informational; static guidance) -
get_category- Get feeds for a specific category -
search_routesπ - Search routes by keyword across all namespaces or within a namespace (supports text/json output) -
get_route_detailπ - Get detailed information for a specific route within a namespace (supports text/json output) -
suggest_route_keysπ - Fuzzy-suggest closest route keys within a namespace for a partial path
get_feedπ - Fetch actual RSS content from RSSHub paths
{
"tool": "get_feed",
"arguments": {
"path": "bilibili/user/video/2267573",
"format": "json"
}
}{
"tool": "search_namespaces",
"arguments": {
"query": "bili"
}
}{
"jsonrpc": "2.0",
"method": "tools/list",
"id": "list-1"
}{
"tool": "search_routes",
"arguments": {
"query": "live",
"namespace": "bilibili",
"limit": 10,
"format": "json"
}
}{
"tool": "get_route_detail",
"arguments": {
"namespace": "bilibili",
"route_key": "/live/room/:roomID",
"format": "text"
}
}{
"tool": "get_radar_rules",
"arguments": {
"format": "json"
}
}{
"tool": "get_radar_rule",
"arguments": {
"rule_name": "github.com",
"format": "text"
}
}{
"tool": "get_category",
"arguments": {
"category": "programming",
"format": "json"
}
}{
"tool": "suggest_route_keys",
"arguments": {
"namespace": "bilibili",
"partial": "live/ro",
"limit": 5
}
}Based on analysis of reference projects (reonokiy/rsshub-mcp and RechardLLee/RSSHUB-MCP), we've implemented the most valuable missing features:
- RSS Content Retrieval - Users can now get actual RSS feed content, not just metadata
- Intelligent Search - Efficiently filter through hundreds of namespaces
- Enhanced Data Structures - Proper types for RSS content handling
- Superior Architecture - Rust's advantages over Python implementations
- Type Safety: Full compile-time guarantees through Rust's type system
- Performance: Async/await with tokio for efficient I/O
- Memory Safety: No runtime memory errors possible
- Error Handling: Comprehensive error propagation with proper types
- Modularity: Clean separation of concerns across crates
# Format and lint all code
just lint
# Build all crates
cargo build --workspace
# Run all tests
just test# Start the MCP server
cargo run -p rsshub-mcp --bin rsshub-mcp
# Test all 10 tools (including new RSS content retrieval)
cargo run -p mcp-client --bin quick_test
# Note: start the server from the crate directory so it finds config.toml
# (cd rsshub-mcp && cargo run -p rsshub-mcp --bin rsshub-mcp)
# Basic connection test
cargo run -p mcp-client --bin simple_testNote: See quick_test for an end-to-end exercise of each tool. Build and run locally to validate in your environment.
- Complete RSS Workflow: Unlike reference projects that only provide discovery, this implementation enables full RSS content retrieval
- Superior Architecture: 3-crate workspace design with better modularity than Python alternatives
- Type Safety: Rust's type system prevents runtime errors common in dynamic languages
- High Performance: Async/await with tokio provides better I/O efficiency
- Comprehensive Testing: Independent test client facilitates debugging and validation
- Code Quality: Strict linting, formatting, and dependency management
- Enhanced RSS Parsing: Parse RSS content into structured data instead of raw text
- Caching Mechanism: Add TTL caching for metadata (namespaces, radar rules)
- Content Processing: HTML cleaning, timezone normalization
- URL Format Support: Support multiple URL formats (rsshub://, standard URL, short paths)
- Retry Logic: Add simple retry mechanism for failed requests
- Better Error Messages: Provide more user-friendly error responses
- Resource Handler: Waiting for MCP framework support
- AI Assistant Features: Prompt handlers for enhanced functionality
Note: Verified locally during development. Re-run quick_test after changes.
Uses workspace-level dependency management with shared versions defined in the root Cargo.toml:
[workspace.dependencies]
ultrafast-mcp = "202506018.1.0"
reqwest = { version = "0.12", features = ["json"] }
serde = { version = "1.0", features = ["derive"] }
# ... other dependencies