systemprompt-mcp-reddit
Version:
A specialized Model Context Protocol (MCP) server that enables you to search, read, and interact with Reddit content, leveraging an AI Agent to help with each operation.
48 lines (47 loc) • 2.34 kB
TypeScript
import { RedditAuthService } from "./reddit-auth-service.js";
import { RedditMessageParams, RedditMessageResponse } from "../../types/reddit.js";
import { RedditPost, RedditPostParams, RedditPostResponse, FetchPostsOptions, RedditCommentThread, RedditPostWithComments, RedditNotification, FetchNotificationsOptions, RedditComment } from "../../types/reddit.js";
import { RedditFetchService } from "./reddit-fetch-service.js";
export declare class RedditPostService extends RedditFetchService {
constructor(baseUrl: string, authService: RedditAuthService, rateLimitDelay: number);
fetchPosts(options?: FetchPostsOptions): Promise<RedditPost[]>;
private formatSubreddit;
private getHotPosts;
private getNewPosts;
private getControversialPosts;
createPost(params: RedditPostParams): Promise<RedditPostResponse>;
fetchPostById(id: string): Promise<RedditPostWithComments>;
private processCommentTree;
fetchNotifications(options?: FetchNotificationsOptions): Promise<RedditNotification[]>;
deleteMessage(id: string): Promise<void>;
private markMessagesRead;
/**
* Fetches a single comment by its ID
* @param id - The ID of the comment to fetch
* @returns Promise<RedditComment>
*/
fetchCommentById(id: string): Promise<RedditComment>;
/**
* Fetches a comment thread (comment with all its replies) by the comment ID and post ID
* @param id - The ID of the post containing the comment
* @param id - The ID of the comment to fetch with its replies
* @returns Promise<RedditCommentThread>
*/
fetchCommentThread(parentId: string, id: string): Promise<RedditCommentThread>;
searchReddit(options: {
query: string;
subreddit?: string;
sort?: "relevance" | "hot" | "new" | "top";
time?: "hour" | "day" | "week" | "month" | "year" | "all";
limit?: number;
}): Promise<RedditPost[]>;
/**
* Sends a reply to a post or comment
* @param id - The ID of the parent post or comment to reply to
* @param text - The content of the reply
* @returns Promise<any> - The API response
*/
sendReply(id: string, text: string): Promise<any>;
sendComment(id: string, text: string): Promise<any>;
sendMessage(params: RedditMessageParams): Promise<RedditMessageResponse>;
}