Reddit KB
lh1207/reddit-kb
Base de conhecimento pessoal a partir de seus salvos do Reddit
Ver no GitHubServidor MCP que transforma seu conteúdo salvo no Reddit em uma base de conhecimento pessoal searchável. Utiliza embeddings com nomic-embed-text e ChromaDB para indexar posts/comentários salvos, permitindo busca semântica local sem depender da API do Reddit.
Instalação
npx convez-ai lh1207/reddit-kb1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Recuperar comentários técnicos salvos no Reddit por busca semântica
- Manter um arquivo pessoal de respostas úteis antes que posts sejam editados/deletados
- Integrar histórico de salvos do Reddit com fluxo de trabalho via Claude
Veredito

Solução prática para quem acumula salvos no Reddit e precisa recuperá-los depois. Implementação sólida com embeddings locais (sem depender de APIs externas) e suporte a Docker. Exige setup inicial (cookie de autenticação, Ollama), mas oferece controle total sobre os dados.
README
A tradução para o português deste README ainda está na fila.
reddit-kb
MCP server that turns your Reddit content into a searchable knowledge base.
Saved posts/comments are embedded with nomic-embed-text (via Ollama) and stored
in ChromaDB; tools are exposed over MCP with fastmcp.
Purpose
I kept bookmarking useful Reddit comments, the kind with a real answer buried in them, and wanted to actually reference them later and keep them intact. Reddit's saved list is basically a junk drawer: no search, no tags, and posts can get edited or deleted out from under you.
This pulls that content into a local index you control, so a vague memory like "that thread about Proxmox ghost nodes" can turn into an actual search instead of a lost cause.
Authentication
Reddit closed self-service API access in November 2025, so PRAW/OAuth is no
longer an option. Instead, reddit-kb reads the logged-in old.reddit JSON
listing (old.reddit.com/user/<username>/saved.json) authenticated with your
browser's reddit_session cookie. The cookie lives only in .env (gitignored)
and is never logged.
The saved listing is capped by Reddit at roughly the most recent ~1000 items. If you need older saves, request a Reddit data export and backfill from the CSV it provides (not yet automated).
Tools
| Tool | Purpose |
|---|---|
search_saved | Semantic search over ingested saved content |
fetch_reddit_thread | Fetch a live thread (post + top comments) by URL |
search_reddit | Live Reddit search, optionally scoped to a subreddit |
ingest_saved | Pull saved items, embed them, upsert into ChromaDB |
Setup
-
Create a venv and install dependencies:
python3 -m venv .venv && source .venv/bin/activate pip install -r requirements.txt -
Copy
.env.exampleto.env, setREDDIT_USERNAME, and paste thereddit_sessioncookie value from a logged-in browser session at https://old.reddit.com intoREDDIT_SESSION_COOKIE. -
Pull the embedding model in Ollama:
ollama pull nomic-embed-text -
Run the server:
python server.pyOr run it in Docker — see below.
Docker
Build and start the container (from the repo root):
docker compose -f docker/docker-compose.yml up --build -d
Ollama caveat: inside the container,
localhostis the container itself, so the bare-metal defaultOLLAMA_BASE_URL=http://localhost:11434will not reach the Ollama instance on your host. Before starting, setOLLAMA_BASE_URLin.envtohttp://host.docker.internal:11434(provided natively by Docker Desktop and OrbStack on macOS; OrbStack'shttp://host.orb.internal:11434also works), or to your host LAN / Tailscale IP on Linux. Credentials and config arrive only via.envat runtime — nothing is baked into the image. Note that changes to.envrequire recreating the container (up -d), not just restarting it.
Ingest your saved items from inside the container:
docker compose -f docker/docker-compose.yml exec reddit-kb \
python -c "from tools.ingest import ingest_saved; print(ingest_saved())"
Stop the container:
docker compose -f docker/docker-compose.yml down
The vector store is bind-mounted at ./store/chroma, so ingested data
persists on the host across restarts and rebuilds.
Connecting an MCP client
The container serves MCP over streamable HTTP at http://localhost:8000/mcp.
Any MCP-compatible client can connect to that endpoint.
Claude Code:
claude mcp add --transport http reddit-kb http://localhost:8000/mcp
Generic client config (e.g. mcpServers in Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"reddit-kb": {
"type": "http",
"url": "http://localhost:8000/mcp"
}
}
}
stdio (no Docker): clients that spawn servers themselves can run it
directly — python server.py uses stdio transport by default:
{
"mcpServers": {
"reddit-kb": {
"command": "/path/to/reddit-kb/.venv/bin/python",
"args": ["/path/to/reddit-kb/server.py"]
}
}
}
Layout
server.py— FastMCP server; registers the four tools (stdio locally, HTTP in Docker)lib/reddit.py— cookie-authenticated old.reddit JSON listing clientlib/embeddings.py—embed/embed_batchagainst the Ollama APIlib/chroma.py— persistent collection atCHROMA_PATHtools/ingest.py— saved items → embeddings → ChromaDBtools/search_saved.py— query embedding → ChromaDB similarity searchtools/fetch_live.py— live thread fetch + live Reddit searchdocker/— Dockerfile + compose for the containerised HTTP server