Reddit MCP server

Integrates with Reddit to provide user analysis with engagement patterns, subreddit statistics with health metrics, post creation with timing recommendations, and comment replies with strategic optimization for social media management and community engagement workflows.
Back to servers
Provider
Arindam Majumder
Release date
May 03, 2025
Stats
79 stars

This MCP server implementation provides a bridge for AI assistants to access and interact with Reddit content through the Python Reddit API Wrapper (PRAW). It enables assistants to fetch user information, analyze subreddit content, and even create posts or comments with proper authentication.

Installation and Setup

Prerequisites

You'll need:

  • Git
  • Python with uv installed
  • Reddit API credentials

Installation Steps

  1. Clone the repository:
git clone https://github.com/Arindam200/reddit-mcp.git
cd reddit-mcp
  1. Configure the MCP server connection by creating a configuration file with the following JSON structure:
{
  "mcpServers": {
    "reddit": {
      "command": "{{PATH_TO_UV}}",
      "args": [
        "--directory",
        "{{PATH_TO_SRC}}",
        "run",
        "server.py"
      ],
      "env": {
        "REDDIT_CLIENT_ID": "your_client_id",
        "REDDIT_CLIENT_SECRET": "your_client_secret",
        "REDDIT_USERNAME": "your_username",
        "REDDIT_PASSWORD": "your_password"
      }
    }
  }
}

Replace the placeholder values:

  • {{PATH_TO_UV}}: Run which uv in your terminal and use the output
  • {{PATH_TO_SRC}}: Navigate to the repository directory and run pwd
  • Enter your Reddit API credentials (obtained from Reddit's app preferences page)

Configuration for Different Clients

For Claude Desktop:

  • Save the configuration as claude_desktop_config.json in:
~/Library/Application Support/Claude/claude_desktop_config.json

For Cursor:

  • Save the configuration as mcp.json in:
~/.cursor/mcp.json
  1. Restart your AI client (Claude Desktop or Cursor) to apply the changes.

Using the MCP Server

Available Tools

Read-only Tools

These tools require only client credentials:

  • get_user_info(username) - Analyze a user's profile and activity
  • get_top_posts(subreddit, time_filter, limit) - Retrieve and analyze top posts
  • get_subreddit_stats(subreddit) - Get comprehensive subreddit analysis
  • get_trending_subreddits() - See which subreddits are trending
  • get_submission_by_url(url) - Fetch a post using its URL
  • get_submission_by_id(submission_id) - Fetch a post using its ID

Authenticated Tools

These tools require full user credentials:

  • who_am_i() - Get your own Reddit profile information
  • create_post(subreddit, title, content, flair, is_self) - Create a new post
  • reply_to_post(post_id, content, subreddit) - Reply to a post
  • reply_to_comment(comment_id, content, subreddit) - Reply to a comment

Example Queries

Here are some examples of what you can ask your AI assistant:

  • "Who am I on Reddit?"
  • "Analyze u/spez's Reddit activity"
  • "Show me the top posts from r/Python this week"
  • "Get statistics about r/AskReddit"
  • "What are the trending subreddits right now?"
  • "Create a post in r/Python about a new project"
  • "Reply to this post with an insightful comment"

Authentication Levels

The server supports two authentication levels:

Read-only Access

  • Requires: client_id and client_secret
  • Allows: Fetching public data, reading posts/comments

Authenticated Access

  • Requires: All read-only credentials PLUS username and password
  • Allows: All read-only operations PLUS posting and commenting

Advanced Features

AI-Driven Analysis

The server provides intelligent analysis in several areas:

  1. User Analysis: Engagement patterns, activity trends, community influence
  2. Post Analysis: Performance metrics, timing optimization, content impact
  3. Community Analysis: Health indicators, growth patterns, activity metrics

Smart Response Formatting

The server formats responses with:

  • Organized bullet points
  • Engagement statistics
  • Strategic recommendations
  • Performance metrics

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later