reddit-relay
Enables AI agents to read Reddit content through the user's logged-in browser session, including posts with full comment trees, subreddit listings, user pages, and Reddit search results.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
reddit-relay
Let your AI agent read Reddit through your own browser session, with no API key or approval.
It reads posts with their full comment trees, subreddits, users and search.
Reddit now refuses most automated reads. Plain HTTP clients get 403 or a login wall, the
anonymous .json endpoints answer only browsers, new API apps need manual approval, and browser
agents such as Claude in Chrome refuse reddit.com outright. reddit-relay hands the fetch to a tiny
Chrome extension, so Reddit sees an ordinary logged-in browser.
CLI / MCP server ──► relay.py (127.0.0.1:8902) ◄── long-poll ── Chrome extension ──► reddit.com
◄──────────────── text ◄──────────────────── result ◄──────────┘ (your cookies)Standard library only. Python 3.9+, no
pip install. The extension has no build step.No tab automation. The extension never opens, reads or clicks a tab. It makes background requests and nothing else.
LLM-friendly output. Posts come back as an indented comment tree with authors, scores and permalinks, not raw JSON.
Install
Clone this repo.
In Chrome, open
chrome://extensions, turn on Developer mode, click Load unpacked and pick theextensionfolder. Stay logged in to Reddit in that browser.Use it from the command line, or register the MCP server (below).
The relay starts by itself on the first request and stops after 60 idle minutes.
Related MCP server: Reddit Buddy MCP
Command line
python reddit.py https://www.reddit.com/r/LocalLLaMA/comments/abc123/some_post/
python reddit.py https://www.reddit.com/r/LocalLLaMA/top/?t=week --limit 10
python reddit.py --search "mcp server" -r ClaudeAI --sort top -t month
python reddit.py <address> --json # raw Reddit JSON (search: parsed results as JSON)
python reddit.py --status # relay version, and when the extension last polledAny Reddit address works: posts, comment permalinks, subreddits and their sort tabs, users,
old.reddit.com, share links (/r/<sub>/s/...) and redd.it links.
A post comes back like this (an invented example):
Which mechanical keyboard switches are quietest?
r/keyboards · u/quiet_typist · 412 points (97% up) · 3 comments · 2026-10-02
https://www.reddit.com/r/keyboards/comments/abc123/which_switches_are_quietest/
Open office, need something my neighbours won't hate.
------------------------------------------------------------
Comments
- u/switch_nerd (120 points) https://www.reddit.com/r/keyboards/comments/abc123/x/def456/
Silent linears with O-rings. Nothing else comes close.
- u/quiet_typist [OP] (40 points) https://www.reddit.com/r/keyboards/comments/abc123/x/ghi789/
Any brand you'd pick first?
[1 more replies not loaded: read a parent comment's permalink]Listings and search come back one block per post: score, comment count, subreddit, date, author, title, link, and a short text snippet.
MCP server
claude mcp add reddit -- python /absolute/path/to/reddit-relay/mcp_server.pyAny MCP client works the same way: the command is python mcp_server.py over stdio. Tools:
Tool | Does |
| Any Reddit address as text: a post with its comments, or a listing. |
| Search all of Reddit or one subreddit. |
How Reddit's blocks are handled
Reddit's "blocked by network security" page hits some JSON endpoints even inside a logged-in browser. Measured 2026-11-05:
Address | JSON | What reddit-relay does |
Posts, comments, users, | answers | JSON, rendered as text |
| 403 | falls back to old Reddit's listing page and parses it |
Search | 403 | reads old Reddit's search page and parses it |
A thread deeper than one request shows [N more replies not loaded]. Open the parent comment's
permalink, which the output prints, to read that branch.
Files
File | Job |
| HTTP server on 127.0.0.1:8902: queues jobs, holds the extension's long-polls, returns results. |
| Client library and CLI: starts the relay, fetches, falls back, renders text. |
| MCP stdio server over |
| Manifest V3 extension. |
|
|
| Notes for AI agents changing the code: checks, restarting the relay, re-probing Reddit's blocks. |
Security
The relay can make requests as you, so it is locked down:
It binds 127.0.0.1 only and checks the
Hostheader, which defeats DNS rebinding./fetchrefuses any request with anOriginorSec-Fetch-Siteheader, so no web page can drive it./joband/resultneed anX-Relayheader, which forces a CORS preflight that the relay never answers.Only Reddit hosts are accepted, and the extension refuses any address that resolves off reddit.com. It is not a general proxy for your cookies.
Requests are spaced at least 1 second apart.
Any program running as you on the same computer can still call the relay. Treat it like your browser's cookie jar.
Use it politely
Every request goes out under your Reddit account. Reddit's terms forbid bulk scraping, and heavy automated use can get an account flagged. reddit-relay is for reading the threads you would open yourself, not for crawling.
Development
python -m unittest discover -s tests
ruff check . && ruff format --check .
node --check extension/worker.jsCI runs these on every push, with the tests on Python 3.9 and 3.13.
Licence
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only Reddit search API for AI agents: posts, comments, comment trees, subreddit rules.
Reddit posts, full comment trees, searches, subreddits and users, as JSON or Markdown for LLMs.
Search public Reddit posts, browse subreddit feeds, and read posts, comments, and profiles.
Reddit posts, comments, keyword search and historical archives as tools. Runs on Apify.
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.-
- AlicenseAqualityAmaintenanceEnables AI assistants to browse Reddit, search posts, analyze user activity, and fetch comments without requiring API keys. Features smart caching, clean data responses, and optional authentication for higher rate limits.52,001 npm874MIT
- 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.-
- 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