Skip to main content

Reddit API tools and examples

Project description

Add to Cursor Add to VS Code Add to Claude Add to ChatGPT Add to Codex Add to Gemini

Reddit MCP

License: MIT

A plug-and-play MCP server to browse, search, and read Reddit.

Demo

Here's a short video showing how to use this in Claude Desktop:

https://github.com/user-attachments/assets/a2e9f2dd-a9ac-453f-acd9-1791380ebdad

Features

  • Detailed parameter validation with pydantic
  • Uses the reliable PRAW library under the hood
  • Built-in rate limiting protection thanks to PRAW

Caveats

  • Only supports read features for now. If you want to use write features, upvote the issue or send a PR! 🙌
  • Tools use tokens. To use this with Claude, you may need to be a Pro user to use many tool calls. Free tier users should be fine with lighter tool usage. Your token usage is your responsibility.

Installation

Prerequisite: Reddit API credentials

Create a developer app in your Reddit account if you don't already have one. This will give you a client_id and client_secret to use in the following steps. If you already have these, you can skip this step.

Claude Desktop

To install into Claude Desktop:

  • Follow the instructions here until the section "Open up the configuration file in any text editor."
  • Add the following to the file depending on your preferred installation method:

Using uvx (recommended)

"mcpServers": {
  "reddit": {
    "command": "uvx",
    "args": ["reddit-mcp"],
    "env": {
      "REDDIT_CLIENT_ID": "<client_id>",
      "REDDIT_CLIENT_SECRET": "<client_secret>"
    }
  }
}

Using PIP

First install the package:

pip install reddit-mcp

Then add the following to the configuration file:

"mcpServers": {
  "reddit": {
    "command": "python",
    "args": ["-m", "reddit_mcp"],
    "env": {
      "REDDIT_CLIENT_ID": "<client_id>",
      "REDDIT_CLIENT_SECRET": "<client_secret>"
    }
  }
}

Others

You can use this server with any MCP client, including agent frameworks (LangChain, LlamaIndex, AutoGen, etc). For an example AutoGen integration, check out the example.

Tools

The tools the server will expose are:

Name Description
get_comment Access a comment
get_comments_by_submission Access comments of a submission
get_submission Access a submission
get_subreddit Access a subreddit by name
search_posts Search posts in a subreddit
search_subreddits Search subreddits by name or description

Contributing

Contributions are welcome! See CONTRIBUTING.md for more information.

Acknowledgments

  • PRAW for an amazingly reliable library 💙

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reddit_mcp_fastmcp-0.1.3.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reddit_mcp_fastmcp-0.1.3-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file reddit_mcp_fastmcp-0.1.3.tar.gz.

File metadata

  • Download URL: reddit_mcp_fastmcp-0.1.3.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for reddit_mcp_fastmcp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 16f943b014eeab2dd1e3476583909aa23e64a8135ab7b4711402af2a691a68e9
MD5 fa0a7def958bf9ef58409ba2f7ccec20
BLAKE2b-256 8a873932f6aa388a75001adb2b25b86fb4c65421cdefa620fa5d7e3823d5dd72

See more details on using hashes here.

File details

Details for the file reddit_mcp_fastmcp-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for reddit_mcp_fastmcp-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 96337249660f365887e4f7f6da60650fcc2bc2c238f76763c90cbaf4833f3b92
MD5 3b1393dd4fcd194413b7f0be6426e442
BLAKE2b-256 5b5db81a33e858bb8e3bf52c450bb1cb7466bf4e9628fc5f38a76f7e2ba3e4f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page