freshrss-mcp-server
MCP server for interacting with FreshRSS via the Google Reader API, enabling subscription management, content reading, and item operations.
README
freshrss-mcp-server
An MCP (Model Context Protocol) server implementation to interact with your FreshRSS server, using the Google Reader API.
Features
- Full FreshRSS Integration: Access all major Google Reader API features
- Simple Authentication: Direct FreshRSS API authentication
- Subscription Management: Subscribe, unsubscribe, import/export OPML
- Content Reading: Fetch reading lists, starred items, specific feeds, and categories
- Item Operations: Mark as read/unread, star/unstar, add/remove labels
- Category Management: List, rename, and delete categories
- Persistent Storage: SQLite database for auth tokens and sync state at
~/.freshrss/ - Session Management: Login/logout with complete data clearing
- Claude Desktop Ready: Works seamlessly with Claude Desktop as a local MCP server
Installation
# Clone the repository
git clone https://github.com/nitinthewiz/freshrss-mcp-server.git
cd freshrss-mcp-server
# Install in editable mode with all dependencies
pip install -e .
# For development (includes testing and linting tools)
pip install -e ".[dev]"
Configuration
Claude Desktop
Add to your Claude Desktop config at ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"freshrss": {
"command": "python3",
"args": ["-m", "src.main"],
"cwd": "/path/to/freshrss-mcp-server",
"env": {
"PYTHONPATH": "/path/to/freshrss-mcp-server"
}
}
}
}
Environment Variables (Optional)
All configuration is optional with sensible defaults:
# Server Transport ("stdio" or "streamable-http")
MCP_TRANSPORT=stdio
MCP_HOST=127.0.0.1 # For HTTP transport
MCP_PORT=8000 # For HTTP transport
# Database (default: ~/.freshrss/freshrss.db)
DATABASE_PATH=/path/to/custom/freshrss.db
# Logging
DEBUG=false
LOG_LEVEL=INFO
# HTTP Client Settings
HTTP_TIMEOUT=30
HTTP_MAX_RETRIES=3
HTTP_RETRY_DELAY=1.0
HTTP_BACKOFF_FACTOR=2.0
# Cache Settings
CACHE_SUBSCRIPTION_TTL=300
CACHE_UNREAD_COUNT_TTL=30
Usage
Running the Server
stdio Mode (Default - for Claude Desktop)
# Using Python directly
python -m src.main
# Using FastMCP CLI
fastmcp run src/main.py:mcp
Streamable HTTP Mode (for HTTP-based MCP clients)
This mode supports the MCP specification 2025-03-26 Streamable HTTP transport, enabling HTTP-based MCP clients to connect.
# Using environment variables
MCP_TRANSPORT=streamable-http python -m src.main
# With custom host/port
MCP_TRANSPORT=streamable-http MCP_HOST=0.0.0.0 MCP_PORT=8080 python -m src.main
# Using FastMCP CLI
fastmcp run src/main.py:mcp --transport streamable-http --port 8000
The server will be available at http://127.0.0.1:8000/mcp (or your configured host:port).
Development Mode (with MCP Inspector)
# Opens web UI for testing tools interactively
fastmcp dev src/main.py:mcp
Available MCP Tools
Authentication
login_to_freshrss(server_url, username, password)- Login and store credentials- Supports flexible URL formats (base URL, with /i/, or /api/greader.php)
logout_from_freshrss()- Logout and clear all dataget_freshrss_user_info()- Get current user infocheck_freshrss_session()- Validate session
Subscriptions
list_freshrss_subscriptions()- List all feedssubscribe_to_feed(feed_url, title?, category?)- Subscribe to a feedunsubscribe_from_feed(feed_id)- Unsubscribe from a feedquick_subscribe_to_feed(feed_url)- Quick subscribe with auto-discoveryexport_freshrss_subscriptions()- Export OPMLimport_freshrss_subscriptions(opml_content)- Import OPMLedit_feed_subscription(feed_id, ...)- Edit feed properties
Content
get_reading_list(count?, since_timestamp?, continuation?)- Get unread articlesget_starred_articles(count?, ...)- Get starred itemsget_feed_articles(feed_id, count?, ...)- Get specific feed articlesget_category_articles(category_name, count?, ...)- Get category articles
Item Operations
mark_articles_as_read(item_ids)- Mark as readmark_articles_as_unread(item_ids)- Mark as unreadstar_articles(item_ids)- Star articlesunstar_articles(item_ids)- Unstar articlesadd_label_to_articles(item_ids, label)- Add labelremove_label_from_articles(item_ids, label)- Remove labelmark_all_as_read_in_stream(stream_id, timestamp?)- Mark all as read
Categories
list_categories()- List all categoriesget_unread_counts()- Get unread counts for all feedsrename_category(old_name, new_name)- Rename categorydelete_category(category_name)- Delete category
Development
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=src --cov-report=html
# Run specific test suite
pytest tests/unit/
pytest tests/integration/
Code Quality
# Format code
black src/
# Lint
ruff check src/
# Type checking
mypy src/
Architecture
The server uses a layered architecture:
- MCP Tools Layer: FastMCP tool definitions (26 tools)
- Service Layer: Manager classes for each API domain (Auth, Subscription, Stream, Item, Tag)
- HTTP Client Layer: GReader API client with retry logic and exponential backoff
- Storage Layer: SQLite for auth tokens and sync state
Security
- HTTPS-only connections to FreshRSS servers
- Auth tokens persisted in SQLite (consider SQLCipher for encryption)
- No plaintext password storage
- Input validation on all user inputs
- Parameterized SQL queries
License
MIT License - see LICENSE file for details.
Contributing
Contributions welcome! Please ensure:
- Tests pass (
pytest) - Code is formatted (
black src/) - No linting errors (
ruff check src/) - Type checking passes (
mypy src/)
Support
For issues, questions, or feature requests, please open an issue on GitHub.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。