Local MCP server for recalling past code, commits, and AI conversations — search-only, no local LLM required
Project description
fridai 🛠️
English | 한국어
A lightweight MCP server that lets coding agents (Claude Code, etc.) recall your past
code, commits, and AI conversations via the recall tool — 100% local.
Search & recall only — no local LLM required.
- Search-only (read-only). The calling agent (an LLM) does the reasoning; fridai just returns evidence with sources.
- Local embeddings (fastembed, onnx). No Ollama or external API. Semantic search works out of the box (falls back to lexical if fastembed isn't installed).
- Multi-agent history. Auto-indexes Claude Code · OpenAI Codex CLI · Gemini CLI conversations.
- Private by design. Your memory never leaves the machine; secrets are auto-masked at index time.
Status: early development. Requires Python 3.10+ and git (for code/commit indexing).
How it works
- Index (
fridai index) builds a local database from three source types:- AI conversations — parses each agent's session logs into question→answer turns, and matches a question to its resulting git commit (time window ∩ touched files).
- Code — chunks git-tracked files by function/class (line-window fallback), with line ranges.
- Commits — indexes git commit history (subject + changed files).
- Everything is stored in sqlite + FTS5 (lexical) plus float32 vectors at
~/.fridai/index.db. - Recall fuses lexical (BM25) and vector (cosine) results via RRF, then reranks so real work artifacts (code/commits/edited turns) outrank bare question turns, and dedupes repeated questions.
Install
git clone https://github.com/chloeeekim/fridai.git
cd fridai
pipx install . # isolated (recommended). Or: pip install -e . in a venv
Pulls numpy + fastembed (onnx) + mcp. Registers the fridai command.
Quickstart
fridai index --source all # build the index (current repo + all agent conversations)
fridai stats # index overview
claude mcp add fridai -- fridai mcp # register with Claude Code
After registering, the agent recalls via the recall tool. Re-run fridai index anytime to
refresh — it's incremental (only changed files/sessions/new commits are reprocessed), so it's cheap.
CLI reference
| Command | Description |
|---|---|
fridai index |
Build/update the index. |
fridai mcp |
Run the stdio MCP server. |
fridai stats |
Print document counts by source. |
index flags:
| Flag | Meaning |
|---|---|
--source agent|code|commits|all |
What to index (default all). agent = all AI conversations. |
--path DIR |
Target repo for code/commits (default: current directory). |
--reindex |
Ignore incremental state and rebuild everything. |
--no-embed |
Skip embeddings (lexical index only). |
--no-prune |
Keep chunks of files deleted from git (code). |
--no-redact |
Turn off secret masking (on by default). |
The recall tool (MCP)
The server exposes one tool, recall(query, k=5, repo="", source_type=""):
query— search text (natural language and/or code identifiers).k— max results (default 5).repo— empty = current working repo (server detects cwd);"all"= every repo;"<name>"= a specific repo.source_type— empty = all; one ofagent_turn·code·commit·note.
It returns text with numbered, cited hits for the agent to read — for example:
fridai recall — 2 memory item(s) for "docker mount" (all repos, with sources):
### [1] myrepo 2026-07-01 [codex] session:how did I add the docker mount?
Q: how did I add the docker mount?
A: added a bind mount via volumes.
### [2] myrepo/docker-compose.yml:1-20
volumes: ...
Non-Claude sources are tagged (🤖 codex / 🤖 gemini in the CLI, [codex]/[gemini] in citations).
Registering with other MCP clients
fridai is a standard stdio MCP server — the launch command is fridai mcp. Any MCP-capable
client can use it. For clients that read an mcpServers config:
{
"mcpServers": {
"fridai": { "command": "fridai", "args": ["mcp"] }
}
}
Indexed agent sources
| Agent | Default data path | Override env var |
|---|---|---|
| Claude Code | ~/.claude/projects/ |
FRIDAI_CLAUDE_PROJECTS |
| OpenAI Codex CLI | ~/.codex/sessions/ |
FRIDAI_CODEX_SESSIONS |
| Gemini CLI | ~/.gemini/tmp/ |
FRIDAI_GEMINI_SESSIONS |
A missing agent directory is silently skipped.
Security
Secrets (AWS keys, GitHub/Slack tokens, PEM private keys, JWTs, password=…) are auto-masked
at index time (on by default). Nothing is sent off the machine.
fridai index --source code --no-redact # disable masking
echo "*.env" >> .fridaiignore # exclude paths (repo root or ~/.fridai/)
The high-entropy heuristic is off by default (too many false positives on long identifiers);
enable it with FRIDAI_REDACT_ENTROPY=1.
Environment variables
| Variable | Default | Description |
|---|---|---|
FRIDAI_HOME |
~/.fridai |
Data home (index DB, etc.). |
FRIDAI_CLAUDE_PROJECTS |
~/.claude/projects |
Claude Code transcript location. |
FRIDAI_CODEX_SESSIONS |
~/.codex/sessions |
Codex CLI session location. |
FRIDAI_GEMINI_SESSIONS |
~/.gemini/tmp |
Gemini CLI session location. |
FRIDAI_EMBED_BACKEND |
auto | none disables embeddings (lexical only). |
FRIDAI_FASTEMBED_MODEL |
nomic-ai/nomic-embed-text-v1.5 |
fastembed model name. |
FRIDAI_REDACT_ENTROPY |
off | 1 enables the high-entropy secret heuristic. |
FRIDAI_WORK_PENALTY |
8 |
How far to demote pure question turns in ranking. 0 disables. |
FRIDAI_COMMIT_WINDOW_MIN |
180 |
Minutes window for matching a question to its resulting commit. |
Embedder consistency: index and query with the same embedder. Mixing models makes vectors
incomparable even at the same dimension — the store then falls back to lexical search. Reindex
(--reindex) after switching models.
Development
PYTHONPATH=src python3 -m unittest discover -s tests
CI (GitHub Actions) runs the suite on Python 3.10–3.14 plus a fastembed smoke check on every push/PR.
Tests are hermetic — tests/__init__.py isolates all FRIDAI_* paths and disables the embedder,
so no real ~/.fridai/~/.codex/etc. is touched and no model is downloaded.
See docs/build-order.md for the design & build-order rationale.
License
MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fridai-0.1.0.tar.gz.
File metadata
- Download URL: fridai-0.1.0.tar.gz
- Upload date:
- Size: 46.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb0b304cf613d68133287eb051495c0f883b14f4c0a4624accd34c5680cde30c
|
|
| MD5 |
7de9613eb7e82f94fe99c1b8ee3676a3
|
|
| BLAKE2b-256 |
da7b6bc4c01d2278900b688e25aa21e2bedf2d058e325a7190aab2629c2c3022
|
Provenance
The following attestation bundles were made for fridai-0.1.0.tar.gz:
Publisher:
release.yml on chloeeekim/fridai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fridai-0.1.0.tar.gz -
Subject digest:
bb0b304cf613d68133287eb051495c0f883b14f4c0a4624accd34c5680cde30c - Sigstore transparency entry: 2188210978
- Sigstore integration time:
-
Permalink:
chloeeekim/fridai@f9764453aa3285f01a5d544732484bc38724d7ff -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/chloeeekim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f9764453aa3285f01a5d544732484bc38724d7ff -
Trigger Event:
push
-
Statement type:
File details
Details for the file fridai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fridai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 35.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
720163b1b1c73f672e7196f8c71402dd51cea77d6d17fd4117aa344ce2f91f36
|
|
| MD5 |
eb51cccd3dc44134e838436736825255
|
|
| BLAKE2b-256 |
8378793f5e40b712301f050c56e903701784c2ca9de7f700eeb5181f48390a95
|
Provenance
The following attestation bundles were made for fridai-0.1.0-py3-none-any.whl:
Publisher:
release.yml on chloeeekim/fridai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fridai-0.1.0-py3-none-any.whl -
Subject digest:
720163b1b1c73f672e7196f8c71402dd51cea77d6d17fd4117aa344ce2f91f36 - Sigstore transparency entry: 2188210982
- Sigstore integration time:
-
Permalink:
chloeeekim/fridai@f9764453aa3285f01a5d544732484bc38724d7ff -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/chloeeekim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f9764453aa3285f01a5d544732484bc38724d7ff -
Trigger Event:
push
-
Statement type: