
Reddit Buddy MCP enables Claude Desktop and other AI assistants to browse Reddit, search posts, and analyze user activity through a set of tools that require no API key authentication. The server provides three authentication tiers offering 10 to 100 requests per minute, delivering clean, unfiltered data optimized for language models without fabricated metrics or sentiment scores. It solves the problem of AI assistants needing direct Reddit access for real-time information gathering and analysis across subreddits without the friction of official API registration.
Sponsors
A Model Context Protocol (MCP) server for browsing Reddit, searching posts, and analyzing user activity. Anonymous browsing uses Reddit's public RSS feeds when available. Search, comments, user analysis, and full metrics require approved Reddit API access. Version 1.2.0 adds optional posting and commenting with per-process caps and a client-dependent confirmation flow. See Posting.

Claude checking Reddit's reaction to the Dune Part Three trailer and whether the AirPods Max 2 are worth $549

Claude analyzing real-time sentiment about H-1B visa changes across r/cscareerquestions and r/india
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"reddit": {
"command": "npx",
"args": ["-y", "reddit-mcp-buddy"]
}
}
}
Run this command to add the MCP server (user scope):
claude mcp add --transport stdio reddit-mcp-buddy -s user -- npx -y reddit-mcp-buddy
Use the NPM method: npx -y reddit-mcp-buddy
Ask your AI assistant to:
browse_subredditBrowse posts from any subreddit with sorting options.
- Subreddit:
- "all" - entire Reddit frontpage
- "popular" - trending across Reddit
- Any specific subreddit (e.g., "technology", "programming", "science")
- Sort by: hot, new, top, rising, controversial
- Time range: hour, day, week, month, year, all (for top/controversial sort)
- Include subreddit info: Optional flag for subreddit metadata (requires credentials)
No credentials? Results are served from Reddit's public RSS feed (
data_source: "rss"):score,num_comments,upvote_ratio, andnsfwcome backnull, and theinclude_nsfwfilter can't be applied. Add credentials (Authentication) for full data via the API.
search_redditSearch across Reddit or specific subreddits.
- Query: Your search terms
- Filter by: subreddit, author, time, flair
- Sort by: relevance, hot, top, new, comments
get_post_detailsGet a post with all its comments.
- Input:
- Reddit URL (supports multiple formats), OR
- Post ID alone (will auto-detect subreddit, 2 API calls), OR
- Post ID + subreddit (most efficient, 1 API call)
- Supported URL formats:
- reddit.com, www.reddit.com
- old.reddit.com, new.reddit.com
- np.reddit.com (No Participation links)
- m.reddit.com (mobile links)
- redd.it short URLs
- URLs with query params (?utm_source=...) or fragments (#comment)
- Options: comment sorting, depth, link extraction
user_analysisAnalyze a Reddit user's profile.
- Username: Any Reddit user
- Returns: karma, posts, comments, active subreddits
reddit_explainGet explanations of Reddit terms.
- Terms: karma, cake day, AMA, ELI5, etc.
create_post, add_comment, and subreddit_rules only appear when you enable posting; read-only installs see exactly the five tools above. Details in Posting (v1.2.0).
Search, post details, user analysis, and full metrics require Reddit API credentials for an approved app and use case.
Reddit's Responsible Builder Policy requires explicit approval before using its API. Creating an app is not a self-service guarantee of access. Reddit directs developers to Devvit first; for use cases Devvit does not support, use Reddit's API access request form.
If you already have approved access, use your app's credentials below. This project cannot grant approval or guarantee an approval timeline, and it does not provide shared API keys or a third-party OAuth service.
Without credentials, browse_subreddit can use public RSS feeds and reddit_explain works offline. RSS can be blocked or throttled and does not provide engagement metrics or NSFW flags. It does not enable search, post details, or user analysis, and it does not grant API approval.
http://localhost:8080. It is unused by password-grant authentication.{
"mcpServers": {
"reddit": {
"command": "npx",
"args": ["-y", "reddit-mcp-buddy"],
"env": {
"REDDIT_CLIENT_ID": "your_client_id",
"REDDIT_CLIENT_SECRET": "your_client_secret",
"REDDIT_USERNAME": "your_username",
"REDDIT_PASSWORD": "your_password"
}
}
}
}
An approved web app can authenticate a user without their Reddit password. --oauth runs Reddit's authorization-code flow once and prints a refresh token.
Register the redirect URI. On Reddit app preferences, the web app's redirect URI must be a loopback address with a port, such as http://localhost:8080.
Run the consent command on the machine where your browser is signed in to Reddit:
npx -y reddit-mcp-buddy --oauth
It prompts for the web app's client ID and secret, or reads REDDIT_CLIENT_ID and REDDIT_CLIENT_SECRET from the environment. It requests identity, read, and history, which the read-only tools need. Add --write to also request submit and flair for posting. Pass --redirect-uri http://localhost:<port> if you registered a different port.
Open the printed link and click Allow. Reddit redirects back to a temporary local server that only listens on your machine. It checks the random state value, exchanges the one-time code, and confirms the account with /api/v1/me. It waits up to 5 minutes and never posts.
Copy the token into your config. It prints REDDIT_REFRESH_TOKEN=.... To keep it off the screen, add --out ~/reddit-token.env, a path outside any repository. If that file already exists, the command stops before asking for consent. If writing fails after consent, it prints the token instead. On macOS and Linux the file is readable only by you.
Set these variables in the server's environment:
{
"REDDIT_CLIENT_ID": "your_client_id",
"REDDIT_CLIENT_SECRET": "your_client_secret",
"REDDIT_REFRESH_TOKEN": "your_refresh_token"
}
Leave REDDIT_PASSWORD unset when using a refresh token. Setting both is rejected at startup. The server exchanges the refresh token for access tokens as needed and does not write environment credentials to auth.json. Refresh tokens loaded from that file are not used; configure this mode through the environment.
Treat a refresh token like a password. Keep it outside version control and revoke access in Reddit app preferences when it is no longer needed. OAuth consent does not grant Reddit API approval or extend the approved use case.
Reddit MCP Buddy enforces these local caps. They are not Reddit API quotas or guaranteed throughput:
| Mode | Local Cap | Required Credentials | Best For |
|---|---|---|---|
| Anonymous | 10 req/min* | None | Testing, light usage |
| App-Only | 60 req/min | Client ID + Secret | Regular browsing |
| Authenticated | 100 req/min | Client ID + Secret, plus refresh token or username/password | Heavy usage, automation |
*Server-side cap. Anonymous requests are served from Reddit's logged-out RSS feed, which applies its own stricter per-IP throttle (often one uncached request per 25-60 seconds). The 15-minute cache and automatic retries absorb much of this, but sustained anonymous browsing is effectively slower than 10 req/min.
browse_subreddit (plus the offline reddit_explain) works: Reddit blocks the logged-out JSON API, so browse results come from Reddit's public RSS feed (data_source: "rss") with engagement metrics and NSFW flags as null. The remaining tools require credentials.Important Notes:
Since v1.2.0 the server can post for you. Three tools, all opt-in:
create_post - Submit a text or link post to one subreddit. Checks mechanical rules (title limits, flair required, link vs text allowed) and supports validate_only: true as a dry run. Confirmation depends on the client's capabilities as described below.add_comment - Comment on a post or reply to a specific comment (by id or URL), with the same confirmation flow.subreddit_rules - Read-only. Fetches a sub's rules, posting requirements, capability flags, and flair choices in one cached call, so drafts fit the sub before anything is submitted.The intended workflow: subreddit_rules first, then create_post with validate_only: true, review the full draft and options with the user, then submit the identical payload.
Add REDDIT_BUDDY_WRITE next to your existing credentials:
{
"mcpServers": {
"reddit": {
"command": "npx",
"args": ["-y", "reddit-mcp-buddy"],
"env": {
"REDDIT_CLIENT_ID": "your_client_id",
"REDDIT_CLIENT_SECRET": "your_client_secret",
"REDDIT_USERNAME": "your_username",
"REDDIT_PASSWORD": "your_password",
"REDDIT_BUDDY_WRITE": "true"
}
}
}
}
Claude Desktop extension users: flip the Enable posting tools toggle in the extension settings instead. It maps to the same REDDIT_BUDDY_WRITE variable.
Alternatively, replace REDDIT_PASSWORD with REDDIT_REFRESH_TOKEN from the web-app consent flow; npx -y reddit-mcp-buddy --oauth --write requests the posting scopes. Posting requires the granted scopes identity, read, submit, and flair. Add history if you also use user_analysis. REDDIT_USERNAME is optional with a refresh token; when provided, it must match the account returned by Reddit.
Credentials must come from environment variables (or extension config fields, which become environment variables). The interactive --auth file setup does not enable posting. Startup verifies the account through Reddit and checks granted scopes. If any requirement is missing, the server logs the reason and keeps posting tools disabled.
Posting uses your account. The server enforces registration, rate limits, and duplicate checks; human approval also depends on the client:
REDDIT_BUDDY_WRITE, the write tools do not exist: read-only installs see exactly the same 5 tools as before, and pay zero extra context.status: "filtered" with a warning when that happens, instead of telling you it went live.Reddit's password grant returns a token with full account scope. An OAuth refresh token carries the permissions granted during consent. These permissions apply across the account, not just one subreddit. With posting off, the server uses the credentials for reads; enabling posting lets it submit posts and comments. Keep passwords and refresh tokens out of version control and off shared machines.
Also worth knowing: Reddit applies its own account-level posting throttles on top of everything above, based on account age and karma. If Reddit says "try again in N minutes", the server surfaces the wait instead of hammering.
Reddit MCP Buddy is designed with privacy and transparency in mind. Here's how your data is handled:
~/.reddit-mcp-buddy/auth.json when using --auth CLI setupREDDIT_BUDDY_NO_CACHE=truehttps://oauth.reddit.com and https://www.reddit.com)--auth CLI setups also cache the token in ~/.reddit-mcp-buddy/auth.json (file mode 600)~/.reddit-mcp-buddy/auth.json at any timeIf you have any privacy questions or concerns, please open an issue on GitHub.
Reddit MCP Buddy includes comprehensive testing tools to verify your authentication is working correctly:
# Clone the repository first
git clone https://github.com/karanb192/reddit-mcp-buddy.git
cd reddit-mcp-buddy
npm install
# Test with your current environment settings
npm run test:rate-limit
# Test specific authentication modes
npm run test:rate-limit:anon # Test anonymous mode (10 rpm)
npm run test:rate-limit:app # Test app-only mode (60 rpm)
npm run test:rate-limit:auth # Test authenticated mode (100 rpm)
The rate limit tester will:
For local development and testing, you can set up authentication interactively:
npx -y reddit-mcp-buddy --auth
This will prompt you for Reddit app credentials and save them locally. Note: This does NOT work with Claude Desktop - use environment variables in your Claude config instead.
Build the checkout, then print the proposed test without making any requests:
npm run build
REDDIT_TEST_SUBREDDIT=your_private_sub node tests/live-write.mjs
The live run requires an approved app, REDDIT_CLIENT_ID and REDDIT_CLIENT_SECRET, plus either REDDIT_REFRESH_TOKEN or the script-app REDDIT_USERNAME/REDDIT_PASSWORD pair. The account must moderate the private test subreddit. OAuth validation requires all six scopes: identity, read, submit, flair, history for recovery, and edit for cleanup. The harness checks these before connecting any posting client. Keep credentials outside the repository. On Node versions supporting --env-file, a local environment file can supply them:
RUN_WRITE_TESTS=1 REDDIT_TEST_SUBREDDIT=your_private_sub \
node --env-file=/path/to/private.env tests/live-write.mjs --run
This command performs real writes. It starts actual stdio MCP connections, declines one post request, accepts one test post, and tests comment preview followed by an identical submission from a client without elicitation. The harness supplies the confirmation responses automatically; running it authorizes these test actions. It creates one post and one comment, verifies their content, then attempts deletion of both even after a failure.
The unique marker and any cleanup failures are printed for manual inspection. Lost responses trigger a search of the test user's newest posts and comments; an unresolved outcome or unverified deletion fails the run. Cleanup cannot be guaranteed if the process is killed or Reddit is unavailable. Ordinary unit tests use an offline API fixture, and normal integration runs skip posting unless explicitly enabled.
To test the server directly in your terminal:
# Run in HTTP mode on port 3000
npx -y reddit-mcp-buddy --http
# Or with custom port
REDDIT_BUDDY_PORT=8080 npx -y reddit-mcp-buddy --http
Note: The server runs in stdio mode by default (for Claude Desktop). Use --http flag for testing with Postman MCP or direct API calls.
npm install -g reddit-mcp-buddy
reddit-buddy --http # For testing
git clone https://github.com/karanb192/reddit-mcp-buddy.git
cd reddit-mcp-buddy
npm install
npm run build
npm link
The Docker image and CI workflows use Node.js 26. To build and run the image:
git clone https://github.com/karanb192/reddit-mcp-buddy.git
cd reddit-mcp-buddy
docker build --pull -t reddit-mcp-buddy .
docker run -it reddit-mcp-buddy
Run the container smoke test with Docker, curl, and jq installed:
bash tests/test-docker.sh reddit-mcp-buddy
The test checks container health, MCP initialization, tool discovery, and shutdown without Reddit credentials.
For one-click installation in Claude Desktop, download the pre-built extension:
📦 Download reddit-mcp-buddy.mcpb
Installation: Simply open the downloaded .mcpb file - Claude Desktop will automatically install the extension and the Reddit tools will be immediately available.
If you prefer to build the extension yourself:
git clone https://github.com/karanb192/reddit-mcp-buddy.git
cd reddit-mcp-buddy
./scripts/build-mcpb.sh
Note: Most users should use the standard npm installation method shown in Quick Start.
| Feature | Reddit MCP Buddy | Other MCP Tools |
|---|---|---|
| Anonymous Access | RSS browsing; other data tools require approved API access | Varies by server |
| Language | TypeScript/Node.js | Python (most) |
| Tools Count | 5 read + 3 opt-in write | 8-10 (redundant) |
| Fake Metrics | ✅ Real data only | ❌ "Sentiment scores" |
| Search | ✅ Full search | Limited or none |
| Caching | ✅ Smart caching | Usually none |
| LLM Optimized | ✅ Clear params | Confusing options |
| Rate Limit Testing | ✅ Built-in tools | ❌ No verification |
| Mode | Requests/Minute | Cache TTL | Setup Required |
|---|---|---|---|
| Anonymous | 10 | 15 min | None |
| App-only | 60 | 5 min | Client ID + Secret |
| Authenticated | 100 | 5 min | All credentials |
Cache TTL applies to subreddit listings. Post details (10 min), search results (10 min), and user profiles (15 min) use fixed TTLs in all modes. Anonymous throughput is additionally bounded by Reddit's own per-IP RSS throttle, which is stricter than 10/min for uncached requests.
"What are the top posts about GPT-4 today?"
→ search_reddit with query="GPT-4", time="day", sort="top"
"Show me what's trending in technology"
→ browse_subreddit with subreddit="technology", sort="hot"
"What do people think about this article?"
→ search_reddit with the article URL to find discussions
"Analyze the user DeepFuckingValue"
→ user_analysis with username="DeepFuckingValue"
"Get the comments from this Reddit post"
→ get_post_details with url="https://reddit.com/r/..."
"What's trending across all of Reddit?"
→ browse_subreddit with subreddit="all", sort="hot"
"Cannot create an app" or "API approval required"
"Can't achieve 100 requests/minute"
npm run test:rate-limit:app or npm run test:rate-limit:auth to inspect the corresponding local mode (requires cloning the repo)"Command not found" error
# Ensure npm is installed
node --version
npm --version
# Try the full global-bin path
$(npm prefix -g)/bin/reddit-mcp-buddy
Browsing works but search / comments / user analysis fail
browse_subreddit (served from Reddit's public RSS feed, no scores or comment counts) and the offline reddit_explain workRate limit errors
Retry in Ns, wait that long before retrying. The server returns long upstream waits immediately instead of sleeping through the client's request timeout.Write tools don't show up
REDDIT_BUDDY_WRITE=true, client credentials plus a refresh token or username/password via environment variables, stdio transport, a verified user identity, and granted identity/read/submit/flair scopes--auth file setups cannot write: the password is never saved, so restarts fall back to app-only tokens. Move credentials into your MCP client config's env block"Subreddit not found"
Connection issues
| Variable | Description | Required | Rate Limit |
|---|---|---|---|
REDDIT_CLIENT_ID | Reddit app client ID | No | Local cap: 60 req/min (with secret) |
REDDIT_CLIENT_SECRET | Reddit app secret | No | Local cap: 60 req/min (with ID) |
REDDIT_USERNAME | Reddit account username | No | Local cap: 100 req/min (with all 4) |
REDDIT_PASSWORD | Reddit account password | No | Local cap: 100 req/min (with all 4) |
REDDIT_REFRESH_TOKEN | OAuth refresh token; leave password unset | No | Local cap: 100 req/min with client ID + secret |
REDDIT_USER_AGENT | Custom user agent string (applies when credentials are configured) | No | - |
| Variable | Description | Default |
|---|---|---|
REDDIT_BUDDY_HTTP | Run as HTTP server instead of stdio | false |
REDDIT_BUDDY_PORT | HTTP server port (when HTTP=true) | 3000 |
REDDIT_BUDDY_HOST | Interface the HTTP server binds to | 127.0.0.1 |
REDDIT_BUDDY_ALLOWED_ORIGINS | Comma-separated browser origins allowed to call the HTTP endpoint | none |
REDDIT_BUDDY_ALLOWED_HOSTS | Comma-separated host:port values accepted in the Host header (DNS-rebinding protection) | loopback values when bound to localhost |
REDDIT_BUDDY_NO_CACHE | Disable caching (always fetch fresh) | false |
| Variable | Description | Default |
|---|---|---|
REDDIT_BUDDY_WRITE | Register the posting tools; requires env user credentials, verified identity and scopes, and stdio | false |
REDDIT_BUDDY_MAX_POSTS_PER_HOUR | Posts per hour; only values from 1 to 4 are honored (0 and invalid values are ignored) | 5 |
REDDIT_BUDDY_MAX_COMMENTS_PER_HOUR | Comments per hour; only values from 1 to 29 are honored (0 and invalid values are ignored) | 30 |
REDDIT_BUDDY_MIN_WRITE_INTERVAL_S | Seconds between writes; only values ABOVE 15 are honored | 15 |
The three rate-floor variables can only tighten the built-in caps. Setting them looser than the defaults does nothing, on purpose, and 0 does not mean "pause posting": it falls back to the default cap.
HTTP mode has no authentication. It binds to localhost so only your machine can reach it, and rejects Host headers outside the loopback set. Setting
REDDIT_BUDDY_HOST=0.0.0.0exposes it to your whole network - only do that on a trusted network (e.g. inside Docker, which sets it deliberately). On a non-loopback bind the Host check is off by default, since clients legitimately arrive with a container IP or service name; setREDDIT_BUDDY_ALLOWED_HOSTSto restrict it. Browser requests are rejected unless their origin is listed inREDDIT_BUDDY_ALLOWED_ORIGINS; non-browser clients like Postman are unaffected.
On Node 22.21.0+ in the 22.x line, or Node 24 and newer, enable Node's built-in proxy support before starting the server. The project's Node 26 Docker image supports this. Check node --version first: unsupported versions can ignore these settings and connect directly. Node currently marks this feature as under active development.
{
"mcpServers": {
"reddit": {
"command": "npx",
"args": ["-y", "reddit-mcp-buddy"],
"env": {
"NODE_USE_ENV_PROXY": "1",
"HTTP_PROXY": "http://proxy.example.com:8080",
"HTTPS_PROXY": "http://proxy.example.com:8080",
"NO_PROXY": "localhost,127.0.0.1"
}
}
}
}
HTTP_PROXY routes HTTP requests; HTTPS_PROXY routes HTTPS requests, including Reddit API and RSS calls. NO_PROXY excludes matching hosts. Export these variables in your shell for CLI use, or pass them with Docker's -e options. Set them in the process environment before startup; the server does not load a project .env file automatically.
Inside Docker, localhost refers to the container. On Docker Desktop, use host.docker.internal to reach a proxy running on the host.
Proxy authentication can be included in the proxy URL as http://username:password@proxy.example.com:8080. Treat that value as a credential and redact it from shared logs and configuration. For a network that uses a private certificate authority, use NODE_EXTRA_CA_CERTS with your organization's PEM certificate file instead of disabling TLS verification.
See Node's proxy and certificate configuration guide. Proxy support routes network traffic; it does not grant Reddit API approval or bypass Reddit's access rules.
Reddit MCP Buddy includes intelligent caching to improve performance and reduce API calls:
This means faster responses and staying well within Reddit's rate limits, all while using minimal system resources.
# Install dependencies
npm install
# Run in development
npm run dev
# Build
npm run build
# Run tests
npm test # Unit tests
npm run test:integration # Integration tests
npm run test:all # All tests
# Test rate limits
npm run test:rate-limit # Test with current environment
npm run test:rate-limit:anon # Test anonymous mode (10 rpm)
npm run test:rate-limit:app # Test app-only mode (60 rpm)
npm run test:rate-limit:auth # Test authenticated mode (100 rpm)
# Type check
npm run typecheck
PRs welcome! See CONTRIBUTING.md for guidelines.
We keep things simple:
# Get all versions of reddit-mcp-buddy from the registry
curl -s "https://registry.modelcontextprotocol.io/v0/servers?search=reddit-mcp-buddy" | jq
# Get just names, version numbers, and latest flag
curl -s "https://registry.modelcontextprotocol.io/v0/servers?search=reddit-mcp-buddy" | \
jq '.servers[] | {name: .server.name, version: .server.version, isLatest: ._meta."io.modelcontextprotocol.registry/official".isLatest}'
MIT - Use it however you want!
Made with ❤️ for the MCP community. No venture capital, no tracking, just a good MCP server.
Built by Karan Bansal (Head of AI at ArmorCode). I write about Claude Code, MCP, and production agentic AI at karanbansal.in/blog.