subscribe
Add new RSS feeds to your FreshRSS instance by providing the feed URL, with options to set a custom title and organize into categories.
Instructions
Subscribe to a new RSS feed
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the RSS/Atom feed | |
| title | No | Custom title for the feed | |
| category | No | Category/folder to add the feed to |
Implementation Reference
- src/handlers/feed-handlers.ts:43-53 (handler)Registration and MCP tool handler for the 'subscribe' tool.
server.registerTool( 'subscribe', { description: 'Subscribe to a new RSS feed', inputSchema: subscribeSchema, }, wrapTool('subscribe', async (args: z.infer<typeof subscribeSchema>) => { await client.feeds.subscribe(args.url, args.title, args.category); return textResult(`Successfully subscribed to ${args.url}`); }) ); - src/api/feed-service.ts:32-43 (handler)Core implementation of the 'subscribe' operation in the FeedService.
* Subscribe to a new feed */ async subscribe(feedUrl: string, title?: string, category?: string): Promise<void> { const body: Record<string, string> = { ac: 'subscribe', s: `feed/${feedUrl}`, }; if (title !== undefined && title !== '') body.t = title; if (category !== undefined && category !== '') body.a = `user/-/label/${category}`; await this.http.post('/reader/api/0/subscription/edit', body); } - src/tools/feed-tools.ts:6-12 (schema)Input schema definition for the 'subscribe' tool.
export const subscribeSchema = z .object({ url: z.string().url().describe('URL of the RSS/Atom feed'), title: z.string().optional().describe('Custom title for the feed'), category: z.string().optional().describe('Category/folder to add the feed to'), }) .strict();