Integrations
Uses environment variables for configuration management, specifically for storing Reddit API credentials in a .env file.
References GitHub for repository management, including starring, forking, and contributing to the project through issues and pull requests.
Provides tools for interacting with Reddit, including reading trending posts from subreddits, analyzing discussions with comments, creating posts, adding comments or replies, and voting on posts and comments.
Reddit Content API - Setup and Usage Guide
This project provides MCP (Model Context Protocol) tools for interacting with Reddit through Claude and Cursor.
Features
- Reading trending posts from subreddits
- Analyzing Reddit discussions with comments
- Creating posts on Reddit
- Adding comments to posts or replies to existing comments
- Voting on posts and comments
Requirements
- Python 3.10+
- A Reddit account
- A registered Reddit application (to obtain client_id and client_secret)
- Virtual environment (venv or similar)
- Claude Desktop and/or Cursor (optional but recommended)
Installation from Scratch
Follow these steps carefully to avoid import and configuration issues:
⚠️ IMPORTANT: DO NOT install the package in editable mode (
pip install -e .
) as it can cause module import problems.
Environment Configuration
- Create a
.env
file in the project root with the following variables:
- To obtain a refresh token, run:
Follow the instructions to authorize the application. The token will be automatically saved to the .env
file.
Project Structure
Running the Server Directly
To run manually (useful for development and testing):
You should see logs indicating:
- Server initialization
- Reddit authentication verification
- Registration of 10 tools (5 original + 5 with prefix)
- "Running MCP server..."
Claude Desktop Configuration
- Locate the configuration file:
- On macOS:
/Users/your-username/Library/Application Support/Claude/claude_desktop_config.json
- On Windows:
%APPDATA%\Claude\claude_desktop_config.json
- On macOS:
- Add the configuration for reddit-content-api:
⚠️ EXTREMELY IMPORTANT:
PYTHONPATH
must include both thesrc
directory and the project root, in that order, separated by:
(on Unix/macOS) or;
(on Windows)
Cursor Configuration
- Locate the configuration file:
- On macOS:
/Users/your-username/.cursor/mcp.json
- On Windows:
%USERPROFILE%\.cursor\mcp.json
- On macOS:
- Add the same configuration as in Claude, adjusting paths as necessary.
Troubleshooting Common Issues
Issue: Only 2 tools appear instead of the expected 10
Symptoms: When running the server, only 2 tools appear instead of the expected 10.
Possible causes and solutions:
- Import problem: Python is importing an installed version from
site-packages
instead of the local code insrc/
.Solution:- Make sure NOT to install the package in editable mode (
pip install -e .
) - Explicitly add
src
to the beginning ofPYTHONPATH
in the configurations - If you've already installed it, use
pip uninstall reddit-content-api
to remove it
- Make sure NOT to install the package in editable mode (
- Python cache: Old
.pyc
files can cause problems.Solution:- Remove all
__pycache__
directories from the project
- Remove all
- Version conflicts: Different versions of the same library.Solution:
- Reinstall dependencies with
pip install -r requirements.txt
- Reinstall dependencies with
Issue: "Cannot create post: Reddit authentication is not configured properly"
Cause: The refresh token is invalid or has expired.
Solution: Regenerate the token by running python -m mcp_reddit.auth_helper
and make sure it's saved in .env
.
Issue: Tools don't appear in Claude/Cursor
Cause: Incorrect configuration in the configuration files.
Solution:
- Check paths and especially
PYTHONPATH
in the configuration files - Completely restart Claude/Cursor after modifying the configuration
Using the Tools in Claude/Cursor
Once configured, you can use the following tools:
mcp_reddit_content_api_fetch_reddit_hot_threads
- Get trending postsmcp_reddit_content_api_fetch_reddit_post_content
- Analyze a post and its commentsmcp_reddit_content_api_create_reddit_post
- Create a new postmcp_reddit_content_api_add_reddit_comment
- Add a commentmcp_reddit_content_api_vote_on_reddit_content
- Vote on content
Examples
Getting trending posts:
Creating a post:
Contributions
If you find issues or have improvements, please create an issue or submit a pull request.
License
Support This Project
If you find this project useful in your work or research, please consider:
- ⭐ Starring the repository to show your support
- 🔄 Following the repository for updates on new features and improvements
- 🐛 Opening issues for bugs or feature requests
- 🛠️ Contributing with pull requests if you have improvements to share
Your support helps make this project better for everyone!
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
MCP server that enables interaction with Reddit, allowing users to read trending posts, analyze discussions, create posts, add comments, and vote on content through Claude and Cursor.
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server that enables saving and sharing Claude Desktop conversations, allowing users to store chats privately or make them public through a web interface.Last updated -26TypeScriptMIT License
- AsecurityAlicenseAqualityAn MCP server that enables Claude to interact with Twitter, allowing for posting tweets and searching Twitter content.Last updated -265202TypeScriptMIT License
- AsecurityAlicenseAqualityAn MCP server that enables posting messages to Discord webhooks, allowing customization of content, username, and avatar URL.Last updated -10JavaScriptMIT License
- -securityAlicense-qualityA MCP server that provides browser automation tools, allowing users to navigate websites, take screenshots, click elements, fill forms, and execute JavaScript through Playwright.Last updated -PythonApache 2.0