index_directoryLABSCO SUMMARY
Preview before you index, and context after you search.
Two calls set this apart from the usual local-RAG setup. The dry run tells you what a scan would pull in and why it would skip the rest, which is the check you want before pointing anything at a home directory — dangerous root scans are blocked outright. And after a search, fetching the surrounding chunks or pages means a citation can be verified against the real file instead of trusted. The store stays in a local directory, not a hosted vector database.
What it is
A multimodal RAG server that indexes local files with Google's gemini-embedding-2-preview model into a ChromaDB store that never leaves your machine. Unlike text-only local search, one query reaches across modalities; PDFs are rendered page by page as images for the embedding model while extracted text is kept for citations.
What you get
- Indexing of a local folder into the store, with wildcard ignore patterns —
index_directory - A dry run that shows what would be indexed, grouped by modality and skip reason, before the scan happens —
preview_directory - Semantic search with compact filters for scope, path prefix, item type, extension and modality, so a query can be pinned to one folder or one file type —
search_my_documents - Neighbouring chunk or page context for a result you already have, for citing the original correctly —
get_result_context - Index maintenance: list the indexed roots, sync to pick up new, updated and deleted files with ghost-vector cleanup, and remove a directory —
list_indexed_directories,sync_indexed_directories,remove_directory_from_index - A resource exposing live vector-store statistics —
gemini://database-stats
Requirements
A free Gemini API key from Google AI Studio, supplied as GEMINI_API_KEY. Python 3.11 or newer and uv, since the documented path is uvx --from git+https://github.com/AlaeddineMessadi/gemini-embedding-2-mcp-server.git@v1.2.1 gemini-embedding-2-mcp — pin the release tag for a stable install, omit it to track main. The index lives at ~/.gemini_mcp_db. A Dockerfile is included; mount that directory as a volume so the store survives restarts.
Setup effort
Add the configuration to your client
USE CASES
Finding the page of a PDF that explains something
Search across the indexed corpus, then pull the neighbouring pages of the top hit so the citation names the right page.
Searching a screenshot or image library by description
Query in words and let the shared embedding space return images, since visual content sits in the same index as the text.
Indexing a new folder without surprises
Run the dry run first to see what would be indexed by modality and what would be skipped, then commit to the scan with ignore patterns.
Keeping the index honest after files move
Sync the indexed roots so new and updated files are picked up and vectors for deleted files are cleaned out.
Restricting a search to one project
Use the scope or path-prefix filter with an extension or modality filter, so results come only from the folder and file types you meant.
7 tools
Listed in project docs. Your client may show a different list.
preview_directorysearch_my_documentsget_result_contextlist_indexed_directoriessync_indexed_directoriesremove_directory_from_indexBEFORE YOU INSTALL
What to know first
Tools you get
7 tools named in the project's documentation.
Requires
GEMINI_API_KEY in your environment
INSTALLATION
Connect your client
MCP Clients
Claude Code
claude mcp add gemini-embedding-2-mcp \
--env GEMINI_API_KEY="<YOUR_GEMINI_API_KEY>" \
-- uvx --from git+https://github.com/AlaeddineMessadi/gemini-embedding-2-mcp-server.git@v1.2.1 gemini-embedding-2-mcpAny MCP client — Docker
git clone https://github.com/AlaeddineMessadi/gemini-embedding-2-mcp-server.git
cd gemini-embedding-2-mcp-server
docker build -t gemini-embedding-2-mcp-server .
docker run --rm -i \
-e GEMINI_API_KEY="<YOUR_GEMINI_API_KEY>" \
-v "$HOME/.gemini_mcp_db:/root/.gemini_mcp_db" \
gemini-embedding-2-mcp-server