Gemini Embedding 2 Mcp
About
A powerful Model Context Protocol (MCP) server using gemini embedding 3 that transforms any local directory into an ultrafast, visually-aware spatial search engine for AI agents.
Details
- Author
- AlaeddineMessadi
- Downloads
- 328
- Categories
- Search, Other, AI, Knowledge Base
Jump to
- Local privacy with ChromaDB stored at ~/.gemini_mcp_db
- Enterprise‑grade embeddings via gemini-embedding-2-preview with MRL 768 optimization
- Native support for images, video, and audio without text extraction
- Visual PDF RAG page‑by‑page preserving charts and layout
- Agentic guardrails: junk filter, wildcard blacklisting, exponential backoff, ghost pruning
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Gemini Embedding 2 McpCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install uv (pip install uv), get a free Gemini API key from Google AI Studio, then configure your client using the uvx command with the GEMINI_API_KEY environment variable. Zero-Install (recommended) runs directly from GitHub without cloning; alternatively, clone the repository and run uv sync for local development.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"gemini embedding 2 mcp": {
"gemini-embedding-2-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/AlaeddineMessadi/gemini-embedding-2-mcp-server.git",
"gemini-embedding-2-mcp"
],
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
}
}
McpServers
{
"gemini-embedding-2-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/AlaeddineMessadi/gemini-embedding-2-mcp-server.git",
"gemini-embedding-2-mcp"
],
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
A multimodal local memory MCP for AI agents powered by Gemini Embedding 2.
Connect your local documents, code, PDFs, images, audio, and video directly toClaude,Cursor, orVS Codeusing Google'sgemini-embedding-2-previewmodel and a strictly localChromaDBvector database.
Unlike text-only local RAG tools, this server keeps one local memory layer across text, visual PDF pages, images, audio, and video, then returns exact file paths and page or chunk context back to your agent.
- One embedding space across modalities: Search code, PDFs, images, audio, and video from the same memory layer.
- Local-first persistence: Your index stays in~/.gemini_mcp_db, not in a hosted vector database.
- Agent-friendly retrieval: Search results include exact paths, types, modalities, and page-aware context.
- Zero-config by default: The server uses built-in guardrails and sensible indexing defaults so most users do not need a config file.
- Find the PDF page that explains our design tokens.
- Search my image library for screenshots of dashboards with dark sidebars.
- Find the audio or video clip where we talked about pricing changes.
- Search only my work docs folder for onboarding notes about incident response.
- Give me the surrounding context for result 2 so I can cite the original file correctly.
We support two ways to run this server:Zero-Install(Recommended) orLocal Developer Clone. Make sure you haveuvinstalled on your machine (pip install uv).
You can point your AI assistant to run the server directly from GitHub without ever cloning the repository locally.uvxacts likenpxfor Python, downloading and caching the server in a secure ephemeral environment automatically.
PyPI is configured as the long-term stable distribution channel for tagged releases. Until the first PyPI publish completes, use the pinned Git release-tag install below.
For astable install, pin to a release tag:
uvx --from git+https://github.com/AlaeddineMessadi/gemini-embedding-2-mcp-server.git@<release-tag> gemini-embedding-2-mcp
uvx --from git+https://github.com/AlaeddineMessadi/gemini-embedding-2-mcp-server.git@v1.2.1 gemini-embedding-2-mcp
For anedge install, omit the tag and track the latestmainbranch state.
Once PyPI publishing is live, the stable install command becomes:
To power the embedding model, you need a free API key from Google.
- Go toGoogle AI Studio.
- ClickCreate API key.
- Copy the key and use it in your client configurations below asGEMINI_API_KEY.
You can attach this server to theClaude CodeCLI natively. Run the following command in your terminal:
claude mcp add gemini-embedding-2-mcp \ --env GEMINI_API_KEY="your-api-key-here" \ -- uvx --from git+https://github.com/AlaeddineMessadi/gemini-embedding-2-mcp-server.git@v1.2.1 gemini-embedding-2-mcp
Open your Claude Desktop config file (usually~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS) and add:
{ "mcpServers": { "gemini-embedding-2-mcp": { "command": "uvx", "args": [ "--from", "git+https://github.com/AlaeddineMessadi/gemini-embedding-2-mcp-server.git@v1.2.1", "gemini-embedding-2-mcp" ], "env": { "GEMINI_API_KEY": "your-api-key-here" } } } }
- Go toSettings>Features>MCP
- Click+ Add new MCP server
- Choosecommandas the type.
- Name:gemini-embedding
- Command:GEMINI_API_KEY="your-api-key" uvx --from git+https://github.com/AlaeddineMessadi/gemini-embedding-2-mcp-server.git@v1.2.1 gemini-embedding-2-mcp
Open your~/.codeium/windsurf/mcp_config.jsonfile and add:
{ "mcpServers": { "gemini-embedding-2-mcp": { "command": "uvx", "args": [ "--from", "git+https://github.com/AlaeddineMessadi/gemini-embedding-2-mcp-server.git@v1.2.1", "gemini-embedding-2-mcp" ], "env": { "GEMINI_API_KEY": "your-api-key-here" } } } }
Open your~/.config/zed/settings.jsonand append the MCP server block:
{ "experimental.mcp": { "gemini-embedding-2-mcp": { "command": "uvx", "args": [ "--from", "git+https://github.com/AlaeddineMessadi/gemini-embedding-2-mcp-server.git@v1.2.1", "gemini-embedding-2-mcp" ], "env": { "GEMINI_API_KEY": "your-api-key-here" } } } }
Open~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.jsonand append:
{ "mcpServers": { "gemini-embedding": { "command": "uvx", "args": [ "--from", "git+https://github.com/AlaeddineMessadi/gemini-embedding-2-mcp-server.git@v1.2.1", "gemini-embedding-2-mcp" ], "env": { "GEMINI_API_KEY": "your-api-key-here" } } } }
# 1. Clone the repository git clone https://github.com/AlaeddineMessadi/gemini-embedding-2-mcp-server.git cd gemini-embedding-2-mcp-server # 2. Install dependencies uv sync
(If you use this method, you can add it directly to Claude Code CLI locally by running:)
claude mcp add gemini-embedding-local --env GEMINI_API_KEY="your-api-key" -- uv --directory "$(pwd)" run gemini-embedding-2-mcp
If you need a containerized MCP server for registry validation or deployment, build and run the included image:
docker build -t gemini-embedding-2-mcp-server . docker run --rm -i \ -e GEMINI_API_KEY="your-api-key-here" \ -v "$HOME/.gemini_mcp_db:/root/.gemini_mcp_db" \ gemini-embedding-2-mcp-server
The container communicates over standard I/O like any other local MCP server and persists ChromaDB data in the mounted volume.
Once connected, your AI assistant instantly gains the following tools:
- index_directory(path: str, ignore: list = None): Scan and formally embed a completely new local folder into the DB. Safely supports wildcardignorepatterns.
- preview_directory(path: str, ignore: list = None): Dry-run a scan and see what would be indexed, grouped by modality and skip reason.
- search_my_documents(query: str, limit: int, scope: str = None, types: list[str] = None, path_prefix: str = None, extensions: list[str] = None, modalities: list[str] = None): Run semantic search with compact retrieval filters.
- get_result_context(source: str, locator: str = None, window: int = 1): Fetch nearby chunk or page context for a previously indexed result.
- list_indexed_directories(): See which directory roots the AI already knows about.
- sync_indexed_directories(): Automatically forces the DB to find new, updated, or recently deleted (ghost) files and cleans up vectors.
- remove_directory_from_index(path: str): Clears a specific trajectory of vectors.
The main search tool stays simple by default, but supports a few high-value filters when you need exactness:
- scope: Limit matches to a broad directory scope such as/Users/me/work
- path_prefix: Limit matches to a more exact path prefix
- types: Restrict by stored item type such astextorpdf_visual_page
- extensions: Restrict by file extension such as.pdfor.md
- modalities: Restrict by modality such astext,pdf,image,audio, orvideo
- gemini://database-stats: Real-time observability! Exposes the exact scale of the vector segments inside ChromaDB directly to the assistant's context.
- Architecture Deep Dive
- Ultimate Multimodality & PDF RAG
- Agentic Safety Guardrails
- Use Cases
- Result Model
- Releasing
Search global news using natural language. Webz.io News Search API returns the most relevant articles and content, with filters for source, country, language, date, sentiment, and category.
An MCP server providing semantic search capabilities for APLCart data.
MCP server for Christian scholarship and research — scripture, Greek/Hebrew word data, cross-references, patristic texts, and semantic search,
Access and search EPUB ebook collections using semantic vector search.
An MCP server powered by txtai for semantic search, knowledge graphs, and AI-driven text processing.
local-first semantic search in Lojban dictionaries
Search 419,000+ space regulatory filings from the FCC, ITU, UNOOSA, and FAA-AST — semantic search, entity dossiers, spectrum holdings, launch licenses, and alerts.
Self-hosted web search for AI agents — multi-engine parallel search with embedding-based result reranking. Zero API keys, pip install.
The MCP server provides end-to-end workflows for SEC filings and earnings call transcripts—including ticker resolution, document retrieval, OCR, embedding, on-disk resource discovery, and semantic search—exposed via MCP and powered by the same olmOCR and embedding backends as the vLLM backends.
MCP server that enables AI assistants to search Reddit conversations, explore subreddits, and access trending topics.
Provides semantic search across local files by creating vector embeddings from watched directories.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




