Reddit MCP Server

Reddit MCP Server

Enables interaction with Reddit through the Reddit API, allowing users to search posts, retrieve saved content, fetch comments, reply to comments, and access detailed post information with comment trees.

Category
Visit Server

README

Reddit MCP Server

This project implements a Model Context Protocol (MCP) server that provides tools for interacting with the Reddit API.

Features

  • Get Saved Posts: Retrieve a list of saved Reddit posts for the authenticated user.
  • Search Reddit: Search for posts across all of Reddit or within a specific subreddit.
  • Get Comments: Fetch comments from a specific Reddit submission.
  • Reply to Comment: Post a reply to an existing Reddit comment.
  • Fetch Reddit Post Content: Fetch detailed content of a specific Reddit post, including a comment tree, using the redditwarp library.

Setup

Prerequisites

  • Python 3.12 or higher.

Installation

  1. Clone the repository (if applicable, otherwise ensure you have the project files):

    git clone https://github.com/netixc/reddit-mcp-server.git
    cd reddit-mcp-server
    
  2. Create a Python virtual environment:

    uv sync
    

This will install praw, fastmcp, python-dotenv, and redditwarp.

Reddit API Configuration

You need to set up Reddit API credentials for your application. These can be obtained by creating an application on Reddit's developer page (https://www.reddit.com/prefs/apps).

Running the MCP Server

The server uses both PRAW (for get_saved_posts, search_reddit, get_comments, reply_to_comment) and redditwarp (for fetch_reddit_post_content) to interact with the Reddit API.

PRAW API Configuration

{
  "mcpServers": {
    "reddit-mcp-server": {
      "command": "mcp",
      "args": [
        "run",
        "/path/to/reddit-mcp-server/server.py"
      ],
      "env": {
        "REDDIT_CLIENT_ID": "YOUR_REDDIT_CLIENT_ID",
        "REDDIT_CLIENT_SECRET": "YOUR_REDDIT_CLIENT_SECRET",
        "REDDIT_USERNAME": "YOUR_REDDIT_USERNAME",
        "REDDIT_PASSWORD": "YOUR_REDDIT_PASSWORD"
      }
    }
  }
}

Note: Replace YOUR_REDDIT_CLIENT_ID, YOUR_REDDIT_CLIENT_SECRET, YOUR_REDDIT_USERNAME, and YOUR_REDDIT_PASSWORD with your actual Reddit API credentials for PRAW authentication. redditwarp does not require explicit credential setup in the server.py or .env file as used in this project.

Available Tools

Once the server is running and configured in your MCP client, you can call its tools.

get_saved_posts(limit: int = 25, subreddit: Optional[str] = None)

Fetches a list of saved Reddit posts for the authenticated user.

  • limit (int, optional): The maximum number of saved posts to retrieve. Defaults to 25.
  • subreddit (str, optional): If provided, only posts from this specific subreddit will be returned.

search_reddit(query: str, subreddit: Optional[str] = None, sort: str = "relevance", limit: int = 10)

Searches Reddit for posts matching a given query.

  • query (str): The search query.
  • subreddit (str, optional): If provided, the search will be limited to this specific subreddit.
  • sort (str, optional): The sorting method for the search results (e.g., "relevance", "hot", "new", "top", "comments"). Defaults to "relevance".
  • limit (int, optional): The maximum number of search results to retrieve. Defaults to 10.

get_comments(submission_id: str, limit: int = 25)

Fetches comments from a specific Reddit submission.

  • submission_id (str): The ID of the Reddit submission (post) to fetch comments from.
  • limit (int, optional): The maximum number of comments to retrieve. Defaults to 25.

reply_to_comment(comment_id: str, text: str)

Replies to a specific Reddit comment.

  • comment_id (str): The ID of the comment to reply to.
  • text (str): The text content of the reply.

fetch_reddit_post_content(post_id: str, comment_limit: int = 20, comment_depth: int = 3)

Fetch detailed content of a specific post, including a recursive comment tree. This tool utilizes the redditwarp library.

  • post_id (str): The ID of the Reddit post to fetch content from.
  • comment_limit (int, optional): The number of top-level comments to fetch. Defaults to 20.
  • comment_depth (int, optional): The maximum depth of the comment tree to traverse. Defaults to 3.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured