reddit-research
Searches Reddit for relevant threads, fetches thread and comment data via Reddit's API, ranks evidence from discussions, and optionally synthesizes cited answers from Reddit content.
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-research
A personal-use, retrieval-augmented research tool that answers questions using Reddit discussions as evidence. It searches for relevant threads via a search API, fetches thread/comment data through the official Reddit Data API, ranks the most useful evidence, and returns structured context (optionally synthesized into a cited answer).
It is intended for interactive question answering and short-lived local research. It does not train models on Reddit data, bulk-archive Reddit, or redistribute collected datasets. See the spec for the full design and non-goals.
Install
uv sync # core CLI
uv sync --extra mcp # + MCP server
uv sync --extra dev # + test toolingRelated MCP server: Eyes-MCP
Configure
Configuration splits cleanly in two:
Secrets → environment /
.env(never the TOML). Copy.env.example:# Reddit creds — only for the "praw" backend (see Fetch backends below) REDDIT_CLIENT_ID=... REDDIT_CLIENT_SECRET=... BRAVE_SEARCH_API_KEY=... # or TAVILY_API_KEY (search always needs a key) ANTHROPIC_API_KEY=... # only if you enable synthesis, which also REDDIT_RESEARCH_SYNTH_PROVIDER=anthropic # needs a provider (or [synth] in TOML)Non-secret behavior →
reddit-research.toml(seereddit-research.example.toml):backend,user_agent, search/synthprovider, comment limits, cache TTLs, etc.
A .env in the current directory (or ~/.config/reddit-research/.env) is loaded
automatically. Precedence is real env var > .env file > TOML > default, so any
TOML value can be overridden by its env var when needed — but each setting has
one canonical home to avoid duplication.
Fetch backends
Reddit gated self-serve API app creation in 2026 (the "Responsible Builder
Policy"), so an approved OAuth app is no longer guaranteed. The fetcher therefore
supports several backends, selectable per-command with --backend or via
[reddit] backend / REDDIT_RESEARCH_BACKEND:
Backend | Auth | Notes |
| — |
|
| none | Arctic Shift archive with PullPush fallback. Works from any IP/host. Serves periodically-updated historical data, so very recent threads may lag; retains deleted/removed content. |
| Reddit OAuth app | Official API; live data + full comment-tree expansion. Needs an approved app. |
| none | Reddit's public |
reddit-research evidence "..." # auto -> arctic (keyless)
reddit-research answer "..." --backend praw # live data, needs an approved appCompliance note: arctic/json let you run without an approved app, but using
them to sidestep API approval sits in tension with the spec's "don't circumvent
access controls" non-goal. Intended for genuine personal, low-volume use.
CLI
reddit-research search "best backup strategy for homelab"
reddit-research fetch "https://www.reddit.com/r/selfhosted/comments/..."
reddit-research evidence "what do selfhosted users recommend for backups?" -r selfhosted -r datahoarder
reddit-research answer "what do Reddit users recommend for homelab backups?"
reddit-research cache stats
reddit-research cache purge --older-than-days 30Useful flags: --subreddit/-r (repeatable), --limit-threads, --max-comments,
--sort, --since-days, --format json|markdown, --no-llm, --show-queries,
--verbose.
MCP server
Exposes search_reddit_threads, fetch_reddit_thread, rank_reddit_evidence,
and the high-level answer_from_reddit. Two transports (REDDIT_RESEARCH_MCP_TRANSPORT):
stdio (default) — local use; the client spawns the process:
{
"mcpServers": {
"reddit-research": {
"command": "reddit-research-mcp",
"env": { "BRAVE_SEARCH_API_KEY": "..." }
}
}
}http / streamable-http — a long-lived network server for container/NAS
deployment (see below). A bearer token is required; the server refuses to
start over HTTP without REDDIT_RESEARCH_MCP_TOKEN, and every request except
GET /healthz must send Authorization: Bearer <token>.
Deploy on a NAS (Docker)
The included Dockerfile + docker-compose.yml run the MCP server over HTTP.
Configure — create
.envnext to the compose file:BRAVE_SEARCH_API_KEY=... # search needs a key REDDIT_RESEARCH_MCP_TOKEN=$(openssl rand -hex 32) # required bearer token # ANTHROPIC_API_KEY=... # synthesis: key + provider # REDDIT_RESEARCH_SYNTH_PROVIDER=anthropicRun — build from source:
docker compose up -d --build curl http://127.0.0.1:8000/healthz # -> okTo deploy a prebuilt image from your own registry instead, set
REDDIT_RESEARCH_IMAGEin.envand pull:export REGISTRY=your-registry.example.com echo "REDDIT_RESEARCH_IMAGE=$REGISTRY/reddit-research-mcp:latest" >> .env docker login "$REGISTRY" # once docker compose pull && docker compose up -dTo publish a new image after code changes:
SHA=$(git rev-parse --short HEAD) docker build --provenance=false --build-arg GIT_SHA=$SHA \ -t "$REGISTRY/reddit-research-mcp:$SHA" \ -t "$REGISTRY/reddit-research-mcp:latest" . docker push "$REGISTRY/reddit-research-mcp:$SHA" docker push "$REGISTRY/reddit-research-mcp:latest"The first line of the container log names the running build, e.g.
reddit-research-mcp starting: version=0.1.0 commit=7e27292 built=2026-11-22T14:03:11Z ...(docker logs reddit-research-mcp | head -1).The SQLite cache persists in
./data. The container binds to127.0.0.1:8000by default, so it's reachable only through the NAS's reverse proxy (change theports:mapping to8000:8000to expose it on the LAN instead).Reverse proxy (Synology) — Control Panel → Login Portal → Advanced → Reverse Proxy → Create:
Source:
https://reddit-mcp.<your-domain>(port 443, HTTPS — enables TLS)Destination:
http://localhost:8000Enable HSTS as desired; the streamable-HTTP transport streams responses, so leave response buffering off (the default reverse-proxy behavior is fine).
Connect from Claude Code:
claude mcp add --transport http reddit-research \ https://reddit-mcp.<your-domain>/mcp \ --header "Authorization: Bearer <your REDDIT_RESEARCH_MCP_TOKEN>"
Security notes: the token gates outbound calls that spend your API keys, so keep
it secret and prefer a random 32-byte value. The compose file sets the keyless
arctic backend (the public .json path is fingerprint-blocked by Reddit for
non-browser clients — see Fetch backends). Switch to praw only if you have an
approved OAuth app and set its credentials in .env.
Architecture
question -> query planner -> search provider -> reddit URL extractor
-> Reddit API fetcher -> cache -> evidence ranker
-> structured evidence -> optional answer synthesisPackage layout under src/reddit_research/:
Module | Responsibility |
| Env + TOML config, secret handling |
| Pydantic data contracts |
| Query planner + Brave/Tavily providers |
| PRAW fetcher + normalization |
| Keyless |
| Arctic Shift / PullPush fetcher |
| Backend selection ( |
| Reddit URL/ID parsing |
| SQLite cache (TTL + purge) |
| Explainable lexical ranking |
| Optional, provider-agnostic synthesis |
| Pipeline + run metadata/warnings |
| Interfaces |
Relevance tuning
With synthesis enabled (provider + key), two extra LLM steps improve what gets retrieved. Both degrade gracefully: on any failure the keyword result is used and a warning says why.
Env var | Default | Effect |
|
| Model that reorders evidence by how well it answers the question, and writes query variants. |
|
| Keyword-prefiltered items the reranker chooses from. |
|
| Evidence items sent to the synthesis model (also the size of the returned list when an answer is written). |
|
| Extra search phrasings per question; results are fused. Each is one more search API call. |
|
| Model that writes the cited answer. |
Brave Search
Env var / | Default | Effect |
|
| Max Brave requests per second, shared by all searches in the process (the free tier allows 1/s). Excess calls wait. |
Safesearch is chosen per query: --safesearch off|moderate|strict on
search/evidence/answer, or the safesearch argument of the
search_reddit_threads and answer_from_reddit MCP tools. The default is
moderate (Brave's own default); Tavily has no such filter and ignores it.
eval/ holds an offline benchmark for the keyword ranking stage
(uv run python eval/run_eval.py --compare eval/baseline_head_b218588.json);
see eval/README.md.
Develop
uv run pytestStatus
MVP implemented: search/fetch/evidence/answer CLI, Brave + Tavily
providers, three fetch backends (praw/json/arctic), SQLite cache, lexical
ranking, JSON/Markdown output, and the MCP server. Later enhancements (async
fetching, semantic reranking, branch summarization) are tracked in the spec.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
One MCP server over 253 data sources: Reddit, LinkedIn, YouTube, G2, search and AI answers.
An MCP server that integrates with Discord to provide AI-powered features.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that generates answers using Gemini 2.0 and Google Search, providing relevant search results alongside the response.1MIT
- AlicenseNot gradedqualityDmaintenanceA research MCP server that enables AI agents to query the internet using multiple sources like SearXNG, GitHub, Reddit, and YouTube, and returns synthesized answers with citations.MIT
- AlicenseAqualityDmaintenanceMCP server that searches 9 sources, scrapes full content, reranks results, and synthesizes cited answers with free LLMs.5MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for researching community discussions, with a focus on Reddit. It enables searching Reddit posts and reading threads/comments, providing structured JSON output for LLM consumption.-