MCP Reddit Server
Provides tools for fetching Reddit content, including hot, new, rising, top posts, comment trees, subreddit info, and topic aggregation across multiple subreddits.
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., "@MCP Reddit Server show me hot posts from r/programming"
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.
MCP Reddit Server
A comprehensive Model Context Protocol (MCP) server for Reddit. Provides 8 tools for fetching Reddit content, a full REST API, and Azure deployment support. Works with Claude Desktop, Microsoft Copilot Studio, Power Automate, and any MCP-compatible client.
Features
8 Reddit Tools: Fetch hot, new, rising, and top posts from any subreddit
Topic Aggregation: Fetch posts from multiple related subreddits by topic
Comment Trees: Get post content with threaded comments
Subreddit Info: Get subscriber counts and descriptions
Multiple Connection Methods:
MCP Streamable HTTP (for Copilot Studio, Claude Desktop)
REST API with OpenAPI spec (for Power Automate, direct HTTP)
Azure Deployment: Docker + Container Apps deployment out of the box
Related MCP server: Reddit MCP Server
Available Tools
Tool | Description |
| Get hot posts from a subreddit |
| Get newest posts from a subreddit |
| Get rising/trending posts |
| Get top posts by time period |
| Get Reddit front page posts |
| Get post content with comments |
| Get posts from topic-related subreddits |
| Get subreddit info (subscribers, description) |
Quick Start
Prerequisites
Reddit API Credentials: Create an app at https://www.reddit.com/prefs/apps
Choose "script" type
Set redirect URI to
http://localhost:8080Note your Client ID and Client Secret
Generate Refresh Token:
pip install praw python get_refresh_token.pyCreate
.envfile:cp .env.example .env # Edit .env with your credentials
Local Development
Running Locally
# Install dependencies
pip install uv
uv sync
# Run the server
uv run uvicorn mcp_reddit.web_server:app --host 0.0.0.0 --port 8000The server will be available at:
REST API: http://localhost:8000
API Docs: http://localhost:8000/docs
MCP Endpoint: http://localhost:8000/mcp/ (requires MCP_API_KEY)
Using with Claude Desktop (Local)
Add to your claude_desktop_config.json:
{
"mcpServers": {
"reddit": {
"command": "uv",
"args": ["run", "uvicorn", "mcp_reddit.web_server:app", "--port", "8000"],
"cwd": "/path/to/mcp-reddit",
"env": {
"REDDIT_CLIENT_ID": "your_client_id",
"REDDIT_CLIENT_SECRET": "your_client_secret",
"REDDIT_REFRESH_TOKEN": "your_refresh_token",
"MCP_API_KEY": "your_api_key"
}
}
}
}Or use mcp-remote to connect to a running server:
{
"mcpServers": {
"reddit": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8000/mcp/",
"--header",
"X-API-Key: your_api_key"
]
}
}
}Azure Deployment
Option 1: Automated Deployment Script
chmod +x deploy-to-azure.sh
./deploy-to-azure.shThe script will:
Create a resource group
Create Azure Container Registry
Build and push the Docker image
Create Container Apps environment
Deploy the container with your Reddit credentials
Option 2: Manual Deployment
1. Create Azure Resources
# Set variables
RESOURCE_GROUP="mcp-reddit-rg"
LOCATION="westeurope" # or your preferred region
ACR_NAME="yourregistryname"
# Create resource group
az group create --name $RESOURCE_GROUP --location $LOCATION
# Create container registry
az acr create --name $ACR_NAME --resource-group $RESOURCE_GROUP --sku Basic --admin-enabled true
# Create container apps environment
az containerapp env create --name mcp-reddit-env --resource-group $RESOURCE_GROUP --location $LOCATION2. Build and Push Image
az acr build --registry $ACR_NAME --image mcp-reddit:latest --file Dockerfile.azure .3. Deploy Container App
# Get ACR password
ACR_PASSWORD=$(az acr credential show --name $ACR_NAME --query "passwords[0].value" -o tsv)
# Generate MCP API key
MCP_API_KEY=$(python -c "import secrets; print(secrets.token_urlsafe(32))")
# Create container app
az containerapp create \
--name mcp-reddit-server \
--resource-group $RESOURCE_GROUP \
--environment mcp-reddit-env \
--image $ACR_NAME.azurecr.io/mcp-reddit:latest \
--registry-server $ACR_NAME.azurecr.io \
--registry-username $ACR_NAME \
--registry-password "$ACR_PASSWORD" \
--target-port 8000 \
--ingress external \
--min-replicas 1 \
--max-replicas 5 \
--cpu 0.5 \
--memory 1Gi \
--secrets \
reddit-client-id="YOUR_CLIENT_ID" \
reddit-client-secret="YOUR_CLIENT_SECRET" \
reddit-refresh-token="YOUR_REFRESH_TOKEN" \
mcp-api-key="$MCP_API_KEY" \
--env-vars \
REDDIT_CLIENT_ID=secretref:reddit-client-id \
REDDIT_CLIENT_SECRET=secretref:reddit-client-secret \
REDDIT_REFRESH_TOKEN=secretref:reddit-refresh-token \
MCP_API_KEY=secretref:mcp-api-key4. Get Your Server URL
az containerapp show --name mcp-reddit-server --resource-group $RESOURCE_GROUP --query "properties.configuration.ingress.fqdn" -o tsv5. (Optional) Add Custom Domain
# Add custom domain
az containerapp hostname add \
--name mcp-reddit-server \
--resource-group $RESOURCE_GROUP \
--hostname your-domain.com
# Bind SSL certificate
az containerapp hostname bind \
--name mcp-reddit-server \
--resource-group $RESOURCE_GROUP \
--hostname your-domain.com \
--environment mcp-reddit-env \
--validation-method CNAMEConnection Methods
1. MCP Streamable HTTP (Authenticated)
For Microsoft Copilot Studio and Claude Desktop:
Setting | Value |
URL |
|
Auth | API Key |
Header |
|
Important: The URL must have a trailing slash (/mcp/)
2. REST API / OpenAPI (No Auth Required)
For Power Automate and direct HTTP calls:
Setting | Value |
Base URL |
|
OpenAPI Spec |
|
Docs |
|
REST Endpoints:
POST /api/hot-threads- Get hot postsPOST /api/post-content- Get post with commentsPOST /api/topic-latest- Get posts by topicPOST /api/front-page- Get front page postsPOST /api/subreddit-posts-by-time- Get top posts by timePOST /api/subreddit-new-posts- Get new postsPOST /api/subreddit-rising-posts- Get rising postsPOST /api/subreddit-info- Get subreddit infoGET /api/topics- List available topics
Configuration
Environment Variables
Variable | Required | Description |
| Yes | Reddit app client ID |
| Yes | Reddit app client secret |
| Yes | Reddit OAuth refresh token |
| No | API key for MCP endpoint authentication |
Topic Categories
The server includes predefined topic categories in list.txt:
Programming
Tech News
AI/ML
Gaming
Science
And more...
Edit list.txt to customize topic-to-subreddit mappings.
Updating Deployment
# Rebuild image
az acr build --registry $ACR_NAME --image mcp-reddit:latest --file Dockerfile.azure .
# Force new revision
az containerapp update \
--name mcp-reddit-server \
--resource-group $RESOURCE_GROUP \
--image $ACR_NAME.azurecr.io/mcp-reddit:latest \
--set-env-vars FORCE_UPDATE="$(date +%s)"Cleanup
# Delete all Azure resources
az group delete --name mcp-reddit-rg --yes --no-waitAcknowledgments
This project was originally inspired by mcp-reddit by adhikasp, which taught us how to interface with the Reddit API via MCP. Over time the project grew significantly beyond the original scope — adding a full REST API, topic aggregation across subreddits, Azure deployment, and expanding from 2 tools to 8 — and became its own standalone project.
License
AGPL-3.0 License - see LICENSE for details.
Available Tools
8 toolsreddit_frontB
Get Reddit front page posts.
Args: sort: hot, top, or new (default: hot) limit: Posts to fetch (default: 10) time_filter: hour/day/week/month/year/all
Inputs: sort, limit, time_filter. Returns: result
reddit_hotA
Get hot posts from a subreddit.
Args: subreddit: Subreddit name (without r/) limit: Posts to fetch (default: 10)
Inputs: subreddit (required), limit. Returns: result
reddit_infoA
Get subreddit info (subscribers, description).
Args: subreddit: Subreddit name (without r/)
Inputs: subreddit (required). Returns: result
reddit_newA
Get newest posts from a subreddit.
Args: subreddit: Subreddit name (without r/) limit: Posts to fetch (default: 10)
Inputs: subreddit (required), limit. Returns: result
reddit_postB
Get post content and comments.
Args: post_id: Reddit post ID comment_limit: Comments to fetch (default: 20) comment_depth: Thread depth (default: 3)
Inputs: post_id (required), comment_depth, comment_limit. Returns: result
reddit_risingA
Get rising/trending posts from a subreddit.
Args: subreddit: Subreddit name (without r/) limit: Posts to fetch (default: 10)
Inputs: subreddit (required), limit. Returns: result
reddit_topA
Get top posts from a subreddit by time.
Args: subreddit: Subreddit name (without r/) time_period: hour/day/week/month/year/all limit: Posts to fetch (default: 10)
Inputs: subreddit (required), limit, time_period. Returns: result
reddit_topicB
Get posts from topic-related subreddits.
Args: topic: Topic name (e.g. programming) limit: Posts to fetch (default: 50) max_subreddits: Max subreddits (default: 20)
Inputs: topic (required), limit, max_subreddits. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a clearly different Reddit resource or listing type, with hot/top/new/rising distinguished by sort order. reddit_topic and reddit_front could be slightly confused as both are broad discovery tools, but their descriptions make the distinction clear enough.
All tools follow a consistent reddit_ prefix with snake_case names. The suffixes clearly indicate the target resource or sort type, making the naming pattern predictable and easy to navigate.
Eight tools is a well-scoped set for a Reddit browsing server. Each tool covers a meaningful read-only use case without unnecessary redundancy.
The toolset covers front page, subreddit listings by multiple sort orders, topic aggregation, post details with comments, and subreddit info. Minor gaps exist around general search and user profiles, but core Reddit browsing workflows are well covered.
Maintenance
Related MCP Connectors
Reddit MCP server: search posts, subreddit feeds, comments & user profiles as JSON. No API key.
Real-time Reddit posts, subreddit search, comments & mentions MCP. Local npx or hosted OAuth.
Reddit API as 61 MCP tools: search, subreddits, posts, comments, users, monitors, writes, feedback.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Related MCP Servers
- AlicenseAqualityDmaintenanceA dependency-free MCP server that reads Reddit through its RSS feeds, enabling search, browsing subreddits, and reading post comments without any API keys or authentication.3157 npm18MIT
- AlicenseNot gradedqualityDmaintenanceProvides read-only access to Reddit through 8 tools for searching, browsing, and retrieving posts, comments, and user data, compatible with any MCP client.MIT
- AlicenseAqualityCmaintenanceAn MCP server that enables authenticated Reddit account actions like posting, commenting, voting, and messaging via the Reddit API.1234 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server for interacting with Reddit via OAuth, with tiered tools for reading, writing, and moderation actions.MIT