recall-mcp
The recall-mcp server is a local, private knowledge base that lets AI assistants search, read, and write to your personal notes and documents. All processing runs locally β no data leaves your device.
Search documents (
search_documents): Find relevant passages using natural language or keywords. Supportssemantic(meaning-based, via local embeddings),keyword(exact matching),hybrid(Reciprocal Rank Fusion), orauto(semantic if available, otherwise keyword) modes. Results include source and relevance score.Read a full document (
get_document): Retrieve the complete text of a specific document by its source name.List available documents (
list_sources): See all documents in the knowledge base and the active search mode.Add notes (
add_note): Save a new plain-text or Markdown note with a title; it is indexed immediately and becomes searchable right away.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@recall-mcp search my notes for how to undo a git commit"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π§ Recall β a local, private knowledge-base MCP server
Recall turns a folder of your own notes and documents into a searchable knowledge base that any AI assistant can use. It is a Model Context Protocol (MCP) server: connect it to Claude Desktop, Claude Code, or any MCP client, and the assistant can search, read, and add to your notes through well-defined tools.
It uses semantic search powered by local embeddings, so it finds passages by meaning, not just matching keywords β and it runs entirely on your machine. No API key, no cloud, your documents never leave your device.
Why this project is interesting
Retrieval-Augmented Generation (RAG) done locally β chunking, embeddings, and cosine-similarity retrieval, the core of modern AI knowledge systems.
Hybrid retrieval β fuses semantic and keyword results with Reciprocal Rank Fusion (RRF), the technique production search systems use.
Model Context Protocol β exposes capabilities as tools an LLM can call, the emerging standard for connecting AI assistants to real systems.
Privacy-first β semantic search runs on-device with a small embedding model; nothing is sent to a third party.
Graceful degradation β if the embedding model can't load, it automatically falls back to keyword search instead of breaking.
Related MCP server: mcp-memory-search
See it in action
Ask Claude (with Recall connected) "search my notes for how to undo a git
commit" β it calls the search_documents tool and answers grounded in
git-cheatsheet.md, entirely on your machine.
See the difference: keyword vs. semantic
Ask "how do I undo a commit?" against a small dev knowledge base:
Search mode | Top result | Why |
Keyword | the doc that literally contains the words "undo a commit" | matches exact words |
Semantic |
| matches meaning |
Semantic search finds the genuinely useful answer even though the words don't overlap. That is the whole point of embeddings.
Retrieval quality (measured)
A small labelled eval (10 paraphrased queries over the sample docs) compares the three search modes. Semantic beats keyword clearly, especially at recall@1:
Mode | recall@1 | recall@3 |
Keyword | 40% | 80% |
Semantic | 80% | 90% |
Hybrid | 60% | 90% |
Reproduce it with python eval/run_eval.py. The corpus is small and topically
overlapping, so treat the numbers as illustrative. (Pure semantic edges out
hybrid here; hybrid tends to win when exact keyword matches matter β codes,
names, error strings.) The harness is the real point: retrieval quality is
measured, not assumed.
What the AI can do (the MCP tools)
Tool | What it does |
| Find the most relevant passages. |
| Return the full text of one document so the assistant can read or summarise it. |
| List the documents currently loaded and the active search mode. |
| Save a new note into the knowledge base; it becomes searchable immediately. |
How it works
Your documents (.md / .txt / .pdf)
β
βΌ
βββββββββββββββββββββ
β DocumentStore β 1. split each file into paragraph "chunks"
β (recall/store.py) β 2. embed every chunk into a vector (local model)
βββββββββββββββββββββ
β query
βΌ
βββββββββββββββββββββ
β Semantic search β embed the query, rank chunks by cosine similarity
β (or keyword) β (falls back to keyword search if no model)
βββββββββββββββββββββ
β tools
βΌ
βββββββββββββββββββββ MCP (stdio / JSON-RPC)
β FastMCP server β βββββββββββββββββββββββββββββΆ Claude Desktop,
β (recall/server.py)β Claude Code, ...
βββββββββββββββββββββChunk β documents (Markdown, plain text, or PDF) are split on blank lines into passages, with each Markdown heading kept attached to the text it introduces, so results land on a precise, self-contained passage.
Embed β each chunk is turned into a vector with a local
fastembedmodel (bge-small-en-v1.5, 384-dimensional vectors).Retrieve β a query is embedded and compared to every chunk by cosine similarity; the closest chunks win.
Serve β the FastMCP server exposes search/read/write as MCP tools over stdio, so any MCP client can use them.
Quickstart
Requires Python 3.10+.
# 1. Clone and enter the project
git clone https://github.com/jaswanthsurya007-source/recall-mcp.git
cd recall-mcp
# 2. Create and activate a virtual environment
python -m venv .venv
# Windows (PowerShell):
.venv\Scripts\Activate.ps1
# macOS / Linux:
source .venv/bin/activate
# 3. Install
pip install -e .
# 4. Try a search from Python
python -c "from recall.store import DocumentStore; s=DocumentStore('data/documents'); print([r.chunk.source for r in s.search('how do I undo a commit', 1)])"The first run downloads the embedding model (~66 MB) once, then caches it.
Behind a corporate proxy?
Recall uses truststore to trust
your operating system's certificates automatically, so it works on networks that
inspect TLS traffic (common at large companies) without extra configuration.
Connect it to Claude Desktop
Add Recall to your claude_desktop_config.json
(Settings β Developer β Edit Config):
{
"mcpServers": {
"recall": {
"command": "/absolute/path/to/recall-mcp/.venv/bin/python",
"args": ["-m", "recall.server"],
"env": {
"RECALL_DOCS_DIR": "/absolute/path/to/recall-mcp/data/documents"
}
}
}
}On Windows, use the full path to python.exe and escape backslashes, e.g.
"C:\\path\\to\\recall-mcp\\.venv\\Scripts\\python.exe".
Restart Claude Desktop, and you'll see Recall's tools available. Ask it things like "Search my notes for how to undo a git commit" or "Save a note titled 'Meeting' with these action itemsβ¦".
Use your own documents
Point Recall at any folder of .md, .txt, or .pdf files:
# macOS / Linux: set RECALL_DOCS_DIR to your own notes folder
RECALL_DOCS_DIR="/path/to/my/notes" python -m recall.server# Windows (PowerShell)
$env:RECALL_DOCS_DIR = "C:\path\to\my\notes"; python -m recall.serverThe data/documents/ folder ships with a few sample notes so you can try it
immediately.
Running the tests
pip install -e ".[dev]"
pytest -qThe test suite runs fully offline (keyword mode), so it needs no model download.
Project structure
recall-mcp/
βββ .github/workflows/ # CI: ruff + pytest on every push
βββ recall/
β βββ server.py # FastMCP server: defines the MCP tools
β βββ store.py # load β chunk β search (semantic, keyword, hybrid)
β βββ embeddings.py # local embedding model wrapper (fastembed)
βββ data/documents/ # sample knowledge base (.md and .pdf)
βββ tests/ # offline pytest suite (+ fixtures/)
βββ eval/ # retrieval-quality eval (recall@k)
βββ pyproject.toml # packaging + tooling config
βββ requirements.txt
βββ LICENSEDesign notes
Why local embeddings? Privacy and zero cost.
fastembeduses ONNX runtime rather than PyTorch, so installs are small and inference is fast on CPU.Why chunk by paragraph? It is simple and transparent, and it makes results land on a focused passage. A future version could use overlapping token windows.
Why a fallback to keyword search? A tool should never hard-fail. If the model can't be downloaded, search still works β just less cleverly.
Re-indexing on write is a full reload for clarity; at larger scale you would embed only the newly added chunks.
Roadmap
Retrieval-quality eval harness (recall@k)
Hybrid search (Reciprocal Rank Fusion of semantic + keyword)
PDF document support
Persist embeddings to disk so startup is instant on large corpora
Support HTML documents
Optional LLM-generated summaries via the Claude API
Expose documents as MCP resources, not just tools
License
Available Tools
4 toolsadd_noteA
Save a new note to the knowledge base and index it immediately.
Args: title: A short title; also used to name the file. content: The note body (plain text or Markdown).
Returns: A confirmation with the created document's source name.
Inputs: title (required), content (required). Returns: result
get_documentA
Return the full text of one document by its source name.
Use list_sources first to see valid names. The caller can then read or summarise the returned text.
Inputs: source (required). Returns: result
list_sourcesB
List the documents in the knowledge base and the active search mode.
Inputs: no named parameters. Returns: result
search_documentsA
Search the knowledge base for passages relevant to a query.
Args: query: What to look for, in natural language or keywords. limit: Maximum number of passages to return (1-50, default 5). mode: "auto" (semantic if available, else keyword), "semantic", or "keyword". Use "keyword" to force exact-word matching.
Returns: The most relevant passages, each labelled with its source and score.
Inputs: query (required), limit, mode. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: adding notes, retrieving a specific document, listing sources, and searching. No overlap or ambiguity.
All tool names follow a consistent verb_noun pattern with snake_case: add_note, get_document, list_sources, search_documents. The pattern is uniform and predictable.
4 tools is slightly below average but still reasonable for a focused knowledge base server. It covers core operations without being too sparse or excessive.
The tool set provides create, read, and search capabilities but lacks update and delete operations. This is a significant gap for managing a knowledge base, as agents cannot modify or remove notes.
Maintenance
Related MCP Connectors
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
Private persistent memory for Claude, ChatGPT & Gemini via MCP - semantic search, zero-code setup.
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceTurns local plain-text notes into searchable long-term memory for AI agents through the MCP protocol.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables local semantic and full-text search over Markdown notes through MCP, returning relevant passages ranked by meaning and exact terms without requiring a GPU or hosted APIs.MIT
- AlicenseNot gradedqualityBmaintenanceTurns any folder of PDFs, markdown, and text files into a local, queryable knowledge base exposed as an MCP server. Enables MCP-compatible agents to semantically search indexed documents, retrieve relevant passages with source and relevance scores, list or reindex documents, and inspect cache and token usage β instead of reading whole files into context.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables semantic and full-text search over markdown notes, with tools to create, edit, move, and delete notes, all through MCP. Runs entirely locally using Ollama for embeddings and SQLite for storage, working with Obsidian or standalone.MIT