npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-mongodb-vector-search

v1.0.11

Published

Custom n8n node for high-performance MongoDB Vector Search, standard queries, and custom JSON aggregations.

Readme

n8n-nodes-mongodb-vector-search

An n8n community node designed for high-performance MongoDB Vector Search, standard queries, and custom JSON aggregation pipelines. It integrates directly with MongoDB Atlas Vector Search and leverages connection pooling to ensure fast, low-latency execution.


Features

  • Atlas Vector Search: Natively query MongoDB Atlas vector indexes using query vectors and candidates constraints.
  • Connection Pooling: Connections are cached globally in memory, reusing MongoClient instances across executions to prevent connection establishment overhead.
  • EJSON Parsing: Supports Extended JSON natively, allowing you to easily use MongoDB-specific types (e.g. {"$oid": "..."}, {"$date": "..."}) in queries.
  • Seamless Credential Reuse: Directly reuses n8n's standard MongoDB (mongoDb) credentials.
  • Custom Searches: Run custom native queries or complex aggregation pipelines via the raw JSON code editor.
  • Aesthetic Iconography: Comes with matching icons for both light and dark modes.

Installation

To install this community node in your n8n instance:

  1. Go to Settings > Community Nodes.
  2. Click Install a new node.
  3. Enter the npm package name: n8n-nodes-mongodb-vector-search.
  4. Agree to the terms and click Install.

Once installed, restart n8n (if self-hosted) to load the node assets.


Operations & Configuration

1. Vector Search

Uses MongoDB Atlas Vector Search ($vectorSearch aggregation stage).

  • Index Name: Name of the Vector Search index in Atlas (default is default).
  • Embedding Field: Field containing the vector embeddings (e.g. embedding).
  • Query Vector: The input search embedding as a JSON array of numbers (e.g. [0.021, -0.14, 0.985]).
  • Num Candidates: Number of candidate documents to scan (default 100).
  • Limit: Number of documents to return.
  • Filter: Optional MongoDB filter query to narrow down vector search results (e.g. {"status": "active"}).
  • Projection: Optional fields projection.

2. Find (Normal Search)

Performs a standard query against a collection.

  • Query (JSON): Standard MongoDB query filter (e.g. {"category": "AI", "age": {"$gte": 21}}).
  • Sort (JSON): Sort order representation (e.g. {"createdAt": -1}).
  • Limit / Skip: Pagination settings.

3. Custom Search

Runs a native query or custom aggregation.

  • Custom Type: Choose between Native Query (find) or Aggregation Pipeline (aggregate).
  • Query (JSON): Input raw filter JSON.
  • Aggregation Pipeline (JSON): Input raw pipeline stages array JSON (e.g., [{"$match": {...}}, {"$group": {...}}]).

Advanced Options

  • EJSON Formatting: Enabled by default. Converts MongoDB type definitions from JSON input automatically and serializes results safely.
  • Output Mode:
    • Separate Items: Emits each document as a separate n8n execution item.
    • Single Array: Groups all resulting documents into a single array under the key results.
  • Include Similarity Score: Appends Atlas similarity score as _score in vector search results.