A robust Model Context Protocol (MCP) server for fetching and analyzing Reddit content. Built by Glue.tools to provide seamless Reddit integration for AI assistants.
β¨ Comprehensive Reddit Access
- Fetch hot, new, top, controversial, and rising posts
- Get detailed post content with full comment trees
- Support for all post types (text, link, gallery, video)
- Robust error handling for private/banned subreddits
π Powerful Search & Discovery
- Search across all of Reddit or within specific subreddits
- Find related subreddits and trending communities
- Get detailed subreddit information and statistics
π€ User Analysis & Insights
- Get user profiles, karma, and account information
- Analyze user's posts and comments
- Discover which subreddits users are most active in
π Content Analysis & Intelligence
- Sentiment analysis of subreddit posts
- Popular keyword extraction and trending topics
- Subreddit activity tracking and metrics
π Flexible Authentication
- Works with full Reddit API credentials (recommended)
- Supports anonymous mode with limited functionality
- Automatic fallback handling
π― Smart Content Parsing
- Hierarchical comment threading with proper indentation
- Content type detection and appropriate extraction
- Link resolution for external URLs
Add to your Claude Desktop configuration:
{
"mcpServers": {
"reddit": {
"command": "uvx",
"args": ["--from", "git+https://github.com/glue-tools/mcp-reddit.git", "mcp-reddit"],
"env": {
"REDDIT_CLIENT_ID": "your_client_id",
"REDDIT_CLIENT_SECRET": "your_client_secret",
"REDDIT_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}git clone https://github.com/glue-tools/mcp-reddit.git
cd mcp-reddit
pip install -e .- Go to Reddit App Preferences
- Click "Create App" or "Create Another App"
- Choose "script" type
- Set redirect URI to
http://localhost:8080 - Note your client ID and secret
- Generate a refresh token using Reddit's OAuth flow
Without authentication, the server runs in anonymous mode with rate limiting.
Fetch hot posts from any subreddit.
fetch_hot_threads(subreddit="programming", limit=5)
Fetch top posts from a subreddit within a timeframe.
fetch_top_threads(subreddit="python", timeframe="week", limit=10)
Fetch newest posts from a subreddit.
fetch_new_threads(subreddit="technology", limit=15)
Fetch controversial posts from a subreddit.
fetch_controversial_threads(subreddit="politics", timeframe="month", limit=5)
Fetch rising posts from a subreddit.
fetch_rising_threads(subreddit="startups", limit=10)
Get detailed post content with comment trees.
fetch_post_content(post_id="1a2b3c4", comment_limit=20, comment_depth=3)
Search across Reddit or within specific subreddits.
search_reddit(query="artificial intelligence", subreddit="MachineLearning", sort="top", limit=10)
Search within a specific subreddit (alias for search_reddit).
search_subreddit(subreddit="programming", query="python tutorial", limit=5)
Get detailed subreddit information and statistics.
get_subreddit_info(subreddit="python")
Find subreddits related to a given subreddit.
find_related_subreddits(subreddit="webdev", limit=10)
Get currently trending subreddits.
get_trending_subreddits(limit=15)
Get user profile information and statistics.
get_user_profile(username="spez")
Get user's recent posts.
get_user_posts(username="AutoModerator", limit=10)
Get user's recent comments.
get_user_comments(username="poem_for_your_sprog", limit=15)
Discover which subreddits a user is most active in.
get_user_subreddits(username="gallowboob", limit=25)
Analyze sentiment of recent posts in a subreddit.
analyze_sentiment(subreddit="bitcoin", limit=50)
Extract popular keywords from subreddit posts.
get_popular_keywords(subreddit="artificial", limit=30)
Track subreddit activity metrics over time.
track_subreddit_activity(subreddit="reactjs", timeframe="week")
Get content from multireddits (authenticated).
get_multireddit(multi_path="username/tech_news", limit=10)
Get your saved posts (requires authentication).
get_saved_posts(limit=20)
Monitor live threads (limited support).
get_live_thread(thread_id="12345")
The server provides detailed error messages for common issues:
- Invalid subreddit: "Subreddit r/example not found"
- Private subreddit: "r/example is private or banned"
- Rate limiting: "Rate limit exceeded. Please try again later"
- Deleted posts: "Post with ID 'xyz' has been deleted or removed"
Human: What's trending in r/technology?
Assistant: I'll fetch the latest hot threads from r/technology for you.
Tool: fetch_hot_threads(subreddit="technology", limit=5)
Based on the hot threads in r/technology:
1. **"OpenAI announces GPT-5 with breakthrough reasoning capabilities"**
- Score: 12,400 | Comments: 2,145
- Author: tech_insider_2024
- Link: https://example-news-site.com/gpt5-announcement
2. **"Tesla's new battery technology achieves 1000-mile range"**
- Score: 8,730 | Comments: 1,432
- Author: ev_enthusiast
- Type: Link post with technical specifications
3. **"Major security vulnerability found in popular IoT devices"**
- Score: 6,890 | Comments: 891
- Author: security_researcher
- Detailed technical analysis in post content
Human: Tell me more about that OpenAI post and what people are saying
Tool: fetch_post_content(post_id="abc123", comment_limit=15, comment_depth=3)
The post reveals extensive community discussion:
Top Comments:
β’ **dev_veteran** (Score: 1,240)
"This is a game-changer for software development. The reasoning improvements are incredible."
-- **ai_skeptic** (Score: 340)
"Let's wait and see. Remember the hype around GPT-4?"
-- **tech_realist** (Score: 120)
"Fair point, but the demos look promising this time"
β’ **startup_founder** (Score: 890)
"Already integrating this into our platform. The API response quality is noticeably better."
We welcome contributions! This project is maintained by Glue.tools.
- Fork the repository
- Create a feature branch
- Make your changes with proper error handling
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details.
- Issues: GitHub Issues
- Documentation: Glue.tools Docs
- Community: Discord
- π₯ Enhanced Post Sorting: Added
fetch_top_threads,fetch_new_threads,fetch_controversial_threads,fetch_rising_threads - π Search Functionality: Added
search_reddit,search_subredditwith multiple sort options - π€ User Analysis: Added
get_user_profile,get_user_posts,get_user_comments,get_user_subreddits - π Subreddit Discovery: Added
get_subreddit_info,find_related_subreddits,get_trending_subreddits - π Content Analysis: Added
analyze_sentiment,get_popular_keywords,track_subreddit_activity - π Advanced Features: Added
get_multireddit,get_saved_posts,get_live_thread - π― 18 total tools - Complete Reddit API coverage
- β Fixed authentication handling for anonymous mode
- β Fixed link post content extraction
- β Improved error handling with specific messages
- β Added input validation and rate limit handling
- β Renamed functions for consistency
- Initial release with basic Reddit fetching functionality
Built with β€οΈ by Glue.tools - Making AI integrations seamless.