Package Information
Released: 2 mo ago
Downloads: 0 weeklyΒ /Β 0 monthly
Latest Version: 2.3.2
Available Nodes
Documentation generatingβ¦
Documentation
n8n-nodes-mongodb-vector-search
High-performance n8n community node package for MongoDB Atlas Vector Search, Schema-Aware AI Agent Searching, standard queries, and custom JSON aggregation pipelines.
It provides three dedicated nodes designed for both standard n8n workflows and LangChain AI Agents:
- π
MongoDB Vector Search(Standalone Node): Fast vector search, find, and custom aggregations for regular workflow pipelines. - π€
MongoDB Vector Search (AI)(AI Store / Tool Node): Connects MongoDB Atlas Vector Search directly to n8n AI Agents as a Vector Store or Tool. - π§
MongoDB AI Search(Smart AI Search Node): A schema-aware AI Agent tool for searching MongoDB collections without embeddings, featuring automatic schema analysis, pre/post filters, and context window protection.
Installation
To install this community node package in your n8n instance:
- Go to Settings > Community Nodes.
- Click Install a new node.
- Enter the npm package name:
n8n-nodes-mongodb-vector-search. - Agree to the terms and click Install.
Included Nodes & Usage Guide
1. π§ MongoDB AI Search (mongoDbAiSearch)
Designed specifically for n8n AI Agents to search, filter, and inspect MongoDB collections without requiring vector embeddings.
Features
- Automatic Schema Discovery: On initialization, the node samples documents to discover field names, data types, and distinct sample values (e.g.
payment_method: ["paypal", "credit_card"]). - LLM Schema Prompt: Injecting discovered schema details into the AI Agent tool prompt so the LLM knows exact field names and categorical values without guessing.
- Field Privacy & Projection Mode:
Return All Fields: Emits all document attributes.Include Only Specified Fields: Exposes only whitelisted fields.Exclude Specified Fields: Hides sensitive fields (e.g.password_hash,secret_key).Exclude ID Field (_id): Removes default_id.
- Context Window Protection & Pagination: Supports buffer limits (
limit,maxLimit) and outputs pagination metadata (totalCount,returnedCount,skip,hasMore,nextSkip).
How to Connect in n8n
- Output Port (
Tool): ConnectMongoDB AI Search'sTooloutput port directly to the AI Agent node'sToolsinput port.
2. π€ MongoDB Vector Search (AI) (mongoDbVectorSearchVectorStore)
Connects MongoDB Atlas Vector Search to n8n AI Agents as a Vector Store or Tool.
Features
- Dual Connection Ports: Connects to AI Agents via
Vector Storeport orToolport. - Pre-Filtering (
$vectorSearch.filter): Evaluated inside the vector search index stage before computing distance. - Post-Filtering (
$match): Evaluated after vector candidate retrieval on any document field. - Dynamic Structured Tool (Zod Schema): Uses
DynamicStructuredToolwith a validtype: "object"Zod schema, ensuring 100% compatibility with n8n AI Agent tool calling engines. - Automatic Key-Value Formatting: If documents lack a designated text field, all fields are formatted into readable key-value pairs for the AI Agent.
How to Connect in n8n
- Embedding Model Input: Connect
Embeddings OllamaorEmbeddings OpenAIto the node'sEmbedding Modelinput port (bottom). - AI Agent Output: Connect the node's
Vector StoreorTooloutput port (top) to the AI Agent node'sVector StoreorToolsinput port.
3. π MongoDB Vector Search (Standalone) (mongoDbVectorSearch)
The clean standalone node for standard n8n workflows without AI sub-node handles.
Operations
- Vector Search: Queries Atlas Vector Search indexes using direct vector arrays or connected embedding models.
- Find (Normal Search): Standard MongoDB query filter (
collection.find()). - Custom Search: Execute custom queries or multi-stage
$aggregatepipelines.
Features & Optimizations
- Connection Pooling: Global client cache reuses active
MongoClientconnections across executions for fast, low-latency queries. - Extended JSON (EJSON): Supports
{"$oid": "..."}and{"$date": "..."}data types natively. - Dark & Light Mode Icons: Native high-resolution SVG iconography for n8n UI themes.