Skip to content

Session Knowledge

Turn your Claude Code session history into a searchable local knowledge base, 13 MCP tools, pure stdlib, nothing leaves your machine

Install: git clone https://github.com/nameforjt-afk/session-knowledge

Works with Claude Code · 304 GitHub stars

Install

$git clone https://github.com/nameforjt-afk/session-knowledge

Install command taken from the project's README or registry entry. Always review code before running it.

session-knowledge

Claude Code's memory is scoped per project directory. Your history isn't.

Every session you've ever run is already on disk in ~/.claude/projects/**/*.jsonl — every decision, every command that worked, every credential you pasted. But open a session in a different directory and none of it is reachable. You re-ask questions you already answered, and re-implement integrations you already wrote.

This indexes all of it and hands Claude 13 MCP tools to search it. You just ask normally.

What was the retry logic in that deploy script? Which DATABASE_URL did I actually use for staging? Before I write the Stripe integration — has anyone here already done payment auth?

Pure Python standard library. No third-party dependencies, no embeddings, no API calls, nothing leaves your machine.

git clone https://github.com/nameforjt-afk/session-knowledge.git
cd session-knowledge
bash install.sh

Restart Claude Code. Done.


⚠️ Read this before installing

The index lives in ~/.claude/session-index/ and it contains plaintext credentials scraped from your sessions. That is the precondition for "which key did I use here" to work at all.

Never commit that directory, never sync it to cloud storage, never send it to anyone. This repo's .gitignore covers the default location, but if you relocate it that's on you.

The full-text index itself is redacted: common credential shapes (API keys, Bearer tokens, JWTs, GitHub PATs, passwords inside connection strings) are replaced with ⟦SECRET:fingerprint⟧ before they are written. Plaintext lives only in vault.db at mode 0600, and only an explicit creds get returns it.

The transcript and code indexes still contain sensitive local context even after redaction. The index directory is restricted to mode 0700; every generated SQLite database, WAL/SHM sidecar, and refresh log is restricted to mode 0600.

Redaction is pattern matching, not magic. Custom-format secrets can slip through. verify-redaction spot-checks for leaks.


What it actually solves

Four things, in rough order of how often they save you:

1. "Have I already built this?" — Search by external service, not by function name. grep only works if you already know the string to search for (you need to know it's tenant_access_token before you can grep for Feishu auth). Capability tags don't require that.

2. "How did we decide this?" — The rationale is buried in thousands of past instructions. Full-text search over them, filterable to just your own instructions.

3. "How did that command go again?" — Every Bash and MCP call, with arguments and results. Filter to only the ones that failed, to recall the traps.

4. "Which value does this key take?" — Same variable name routinely has several real values (multiple apps, dev vs prod, two tables). It returns all candidates ranked, with the call site each came from, rather than silently picking one.


Usage

Day to day: nothing

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

MCP serverDatabases+105 this week

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

Explore related