Reddit MCP Tool
Provides read-only access to Reddit's API for browsing and searching content, including searching posts in subreddits, retrieving post details, getting subreddit information, and fetching hot posts with various sorting and filtering options.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Reddit MCP Tool search for posts about Python tutorials in r/learnprogramming"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Reddit MCP Tool
A Model Context Protocol (MCP) server that provides read-only tools for browsing and searching Reddit content through Reddit's official API. Built with FastMCP for seamless integration and automatic serialization. This server allows you to search for posts, read post details, and get subreddit information through MCP-compatible clients.
Features
🔍 Search Posts: Search for posts in specific subreddits with various sorting and filtering options
🌐 Site-wide Search: Search across all of Reddit with keyword queries
📊 Get Subreddit Info: Retrieve detailed information about subreddits
🔥 Get Hot Posts: Fetch hot posts from subreddits
📋 Get Post Details: Get comprehensive details about specific posts
⚡ FastMCP Integration: Built with FastMCP for automatic serialization and seamless MCP compatibility
Related MCP server: MCP Reddit Server
Prerequisites
Python 3.10+ installed on your system
uv package manager installed (installation guide)
Reddit API credentials (see setup section below)
Reddit API Setup
Create a Reddit App:
Go to Reddit App Preferences
Click "Create App" or "Create Another App"
Choose "script" for the app type
Fill in the required fields:
Name: Your app name (e.g., "Reddit MCP Tool")
Description: Brief description
About URL: Can be blank
Redirect URI: http://localhost:8080 (required but not used)
Get Your Credentials:
Client ID: Found under your app name (short string)
Client Secret: Found in the app details (longer string)
Installation
Clone or download this repository:
git clone <repository-url> cd reddit-mcp-toolInstall dependencies using uv:
uv syncQuick setup (recommended):
uv run python scripts/setup.pyThis will create your
.envfile and show you what to do next.Manual setup:
cp env.example .envEdit the
.envfile with your Reddit API credentials:REDDIT_CLIENT_ID=your_client_id_here REDDIT_CLIENT_SECRET=your_client_secret_here REDDIT_USER_AGENT=reddit-mcp-tool:v0.2.0 (by /u/yourusername)Test your setup:
uv run python scripts/test_basic.pyNote: This server operates in read-only mode and only requires the client ID, secret, and user agent for basic API access.
Troubleshooting
If you encounter issues, see TROUBLESHOOTING.md for detailed solutions to common problems.
Usage
Running the MCP Server
uv run reddit-mcp-toolOr directly with Python:
uv run python -m reddit_mcp.serverAvailable Tools
1. Search Reddit Posts (Subreddit-specific)
Search for posts in a specific subreddit:
{
"name": "search_reddit_posts",
"arguments": {
"subreddit": "python",
"query": "machine learning",
"limit": 10,
"sort": "relevance",
"time_filter": "week"
}
}Parameters:
subreddit(required): The subreddit name (without r/)query(required): Search query stringlimit(optional): Number of posts to return (1-100, default: 10)sort(optional): Sort method - "relevance", "hot", "top", "new", "comments" (default: "relevance")time_filter(optional): Time filter - "all", "day", "week", "month", "year" (default: "all")
2. Search All Reddit (Site-wide)
Search across all of Reddit:
{
"name": "search_reddit_all",
"arguments": {
"query": "artificial intelligence",
"limit": 20,
"sort": "top",
"time_filter": "week"
}
}Parameters:
query(required): Search query stringlimit(optional): Number of posts to return (1-100, default: 10)sort(optional): Sort method - "relevance", "hot", "top", "new", "comments" (default: "relevance")time_filter(optional): Time filter - "all", "day", "week", "month", "year" (default: "all")
3. Get Post Details
Get detailed information about a specific post:
{
"name": "get_reddit_post_details",
"arguments": {
"post_id": "abc123"
}
}Parameters:
post_id(required): The Reddit post ID
4. Get Subreddit Information
Get information about a subreddit:
{
"name": "get_subreddit_info",
"arguments": {
"subreddit": "python"
}
}Parameters:
subreddit(required): The subreddit name (without r/)
5. Get Hot Posts
Get hot posts from a subreddit:
{
"name": "get_hot_reddit_posts",
"arguments": {
"subreddit": "programming",
"limit": 15
}
}Parameters:
subreddit(required): The subreddit name (without r/)limit(optional): Number of posts to return (1-100, default: 10)
Search Tool Comparison
Feature |
|
|
Scope | Single subreddit | All Reddit |
Use Case | Focused community search | Broad topic discovery |
Results | From one subreddit | From multiple subreddits |
Example | "python" in r/programming | "python" across all Reddit |
Configuration
Environment Variables
Variable | Required | Description |
| Yes | Your Reddit app's client ID |
| Yes | Your Reddit app's client secret |
| Yes | User agent string for API requests |
Integration with MCP Clients
This server implements the Model Context Protocol and can be used with any MCP-compatible client. Configure your MCP client to connect to this server using stdio transport.
Claude Desktop Configuration
Add this to your Claude Desktop configuration:
{
"mcpServers": {
"reddit-mcp-tool": {
"command": "uvx",
"args": ["reddit-mcp-tool@latest"],
"env": {
"REDDIT_CLIENT_ID": "your_client_id_here",
"REDDIT_CLIENT_SECRET": "your_client_secret_here",
"REDDIT_USER_AGENT": "reddit-mcp-tool:v0.2.0 (by /u/yourusername)"
}
}
}
}Local Development Configuration
For local development, use:
{
"mcpServers": {
"reddit-mcp-tool": {
"command": "uv",
"args": ["run", "reddit-mcp-tool"],
"cwd": "/path/to/reddit-mcp-tool",
"env": {
"REDDIT_CLIENT_ID": "your_client_id_here",
"REDDIT_CLIENT_SECRET": "your_client_secret_here",
"REDDIT_USER_AGENT": "reddit-mcp-tool:v0.2.0 (by /u/yourusername)"
}
}
}
}Error Handling
The server includes comprehensive error handling for common scenarios:
Invalid subreddit names
Post not found
Authentication failures
Rate limiting
Network errors
All errors are returned as descriptive text content through the MCP protocol.
Rate Limiting
Reddit's API has rate limits. The server respects these limits, but you may encounter rate limiting errors if you make too many requests in a short period. The default rate limit for authenticated users is typically 60 requests per minute.
Development
Running Tests
uv run pytestCode Formatting
uv run black .
uv run ruff check .Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Run the test suite
Submit a pull request
License
This project is licensed under the MIT License. See LICENSE file for details.
Disclaimer
This tool is for educational and development purposes. Please ensure you comply with Reddit's API Terms of Service and community guidelines when using this tool. This is a read-only tool that respects Reddit's API limits and does not provide any posting or commenting capabilities.
Notes
This project was renamed to
reddit-mcp-toolto avoid conflicts with the existingreddit-mcppackage on PyPIOnly read-only operations are supported (search, read posts, get subreddit info)
No user authentication is required - only app credentials for basic API access
Built with the reliable PRAW (Python Reddit API Wrapper) library
Includes proper rate limiting and error handling
Available Tools
5 toolsget_hot_reddit_postsB
Get hot posts from a subreddit
Args: subreddit: The name of the subreddit (without r/) limit: Number of posts to return (default: 10, max: 100)
Returns: Human readable string containing hot posts
Inputs: subreddit (required), limit. Returns: result
get_reddit_post_detailsC
Get detailed information about a specific Reddit post
Args: post_id: The Reddit post ID
Returns: Human readable string containing detailed post information
Inputs: post_id (required). Returns: result
get_subreddit_infoC
Get information about a subreddit
Args: subreddit: The name of the subreddit (without r/)
Returns: Human readable string containing subreddit information
Inputs: subreddit (required). Returns: result
search_reddit_allB
Search for posts across all of Reddit (site-wide search)
Args: query: The search query to search across all Reddit limit: Number of posts to return (default: 10, max: 100) sort: Sort method - "relevance", "hot", "top", "new", "comments" (default: "relevance") time_filter: Time filter - "all", "day", "week", "month", "year" (default: "all")
Returns: Human readable string containing search results from across Reddit
Inputs: query (required), limit, sort, time_filter. Returns: result
search_reddit_postsB
Search for posts in a specific subreddit
Args: subreddit: The name of the subreddit to search in (without r/) query: The search query limit: Number of posts to return (default: 10, max: 100) sort: Sort method - "relevance", "hot", "top", "new", "comments" (default: "relevance") time_filter: Time filter - "all", "day", "week", "month", "year" (default: "all")
Returns: Human readable string containing search results
Inputs: query (required), subreddit (required), limit, sort, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: get_hot_reddit_posts retrieves trending posts from a subreddit, get_reddit_post_details fetches details for a specific post, get_subreddit_info provides subreddit metadata, search_reddit_all performs site-wide searches, and search_reddit_posts searches within a specific subreddit. There is no overlap or ambiguity between these functions.
All tool names follow a consistent verb_noun pattern with 'get_' or 'search_' prefixes, using snake_case throughout. The naming is predictable and clearly indicates the action and target resource, such as get_hot_reddit_posts and search_reddit_posts.
With 5 tools, the server is well-scoped for its purpose of accessing Reddit content. Each tool serves a distinct and necessary function for browsing, searching, and retrieving information, making the count appropriate without being too sparse or overwhelming.
The tool set covers core read-only operations for Reddit, including fetching posts, details, subreddit info, and searches. Minor gaps exist, such as the inability to interact with posts (e.g., upvoting, commenting) or access user-specific data, but agents can still perform essential browsing and search tasks effectively.
Related MCP Connectors
Search public Reddit posts, browse subreddit feeds, and read posts, comments, and profiles.
Read-only Reddit search API for AI agents: posts, comments, comment trees, subreddit rules.
Reddit posts, comments, keyword search and historical archives as tools. Runs on Apify.
Query Reddit communities, posts, brands and trends from your AI agent. OAuth 2.1.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides AI assistants with read-only access to Reddit's API for browsing subreddits, reading posts and comments, searching Reddit, and retrieving user/subreddit information. Enables safe exploration of Reddit content without posting capabilities through natural language interactions.-
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to interact with Reddit by searching subreddits, retrieving hot posts, and fetching detailed post information with comments through the Reddit API.-
- FlicenseNot gradedqualityCmaintenanceEnables interaction with Reddit through the Reddit API, allowing users to search posts, retrieve saved content, fetch comments, reply to comments, and access detailed post information with comment trees.4-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search, read, and analyze Reddit content, including posts, comments, subreddits, and user profiles using natural language commands. It provides atomic tools for interacting with the Reddit API to retrieve trending topics and community metadata.MIT