mcp-reddit-server
v1.0.0
Published
MCP server for browsing Reddit - search subreddits, get hot and top posts
Downloads
5
Maintainers
Readme
Reddit MCP Server
Browse Reddit directly from Claude! This MCP server provides tools to search subreddits and get hot/top posts from Reddit using the public JSON API.
Features
- 🔍 Search Subreddits - Find subreddits by name or description
- 🔥 Get Hot Posts - Browse current hot posts from any subreddit
- ⭐ Get Top Posts (24h) - View top posts from the last 24 hours
Installation
Quick Install (NPM)
npm install -g mcp-reddit-serverAdd to Claude Code
claude mcp add npx mcp-reddit-server -s userImportant: After adding, restart Claude Code completely:
- Press
Ctrl+Ctwice to stop Claude Code - Run
claude --continueto restart
Available Tools
1. search_subreddits
Search for subreddits by name or description.
Parameters:
query(required): Search termlimit(optional): Number of results (1-25, default: 10)
Example:
Search for "programming" subreddits2. get_hot_posts
Get the current hot posts from a subreddit.
Parameters:
subreddit(required): Subreddit name (without r/ prefix)limit(optional): Number of posts (1-25, default: 10)
Example:
Get hot posts from "technology"3. get_top_posts_24h
Get the top posts from the last 24 hours in a subreddit.
Parameters:
subreddit(required): Subreddit name (without r/ prefix)limit(optional): Number of posts (1-25, default: 10)
Example:
Get top posts from "science" in the last 24 hoursUsage Examples in Claude
Once installed, you can ask Claude:
- "Search for subreddits about machine learning"
- "Show me the hot posts from r/programming"
- "What are the top posts today in r/technology?"
- "Find subreddits related to cooking"
- "Get the latest hot posts from worldnews"
Response Format
Posts are displayed with:
- 🔥/⭐ Visual indicators for hot/top posts
- ⬆️ Upvote score
- 👤 Author username
- 🕒 Time posted
- 📝 Post preview (for text posts)
- 🔗 Direct Reddit link
Development
Local Testing
- Clone and install:
git clone <repository>
cd mcp-reddit-server
npm install- Build:
npm run build- Test with MCP Inspector:
npm run inspectorBuilding from Source
npm run buildPublishing Updates
npm version patch
npm publishTechnical Details
- Uses Reddit's public JSON API (no authentication required)
- Implements rate limiting through custom User-Agent
- Limited to 25 posts per request (Reddit API limitation)
- All data is read-only from public subreddits
Limitations
- Only accesses public subreddits
- Maximum 25 posts per request
- No authentication or user-specific features
- Rate limited by Reddit's public API
Error Handling
The server handles:
- Invalid subreddit names
- Network errors
- Rate limiting
- Malformed requests
License
MIT
Contributing
Issues and pull requests are welcome!
Support
For issues or questions, please open an issue on the GitHub repository.
