MongoDB Atlas Tool · emploidai Marketplace
emploidai Marketplace
Add-onsAppletsPlugins
Search tools, teams, and capabilitiesPublish
MarketplacePluginsMongoDB Atlas Tool
Plugin
Limited listing

MongoDB Atlas Tool

by mongodb · v0.0.4

Query, search, and write documents in MongoDB Atlas from Chatflow, Workflow, and Agent applications. Supports find, full-text search, vector search, aggregation, insert, update, and delete operations.

514 installsUpdated Jun 27, 2026
Publisher information is incomplete

This community listing does not yet include every recommended support, privacy, pricing, and permission disclosure. Review the available package permissions before installing.

Capabilities

Tools

Available inside your emploidai workspace after installation.

Data sources

Available inside your emploidai workspace after installation.

Category

tool

Version

0.0.4mongodb

Requirements

Maximum memory 256MB

Pricing

Not disclosed by publisher

Security & access

Review before installing

CompatibleRequires emploidai 1.9.0+

Permissions

  • Requires encrypted tool credentials

Dependencies

No additional dependencies

Resources

Privacy policy
emploidai Marketplace

Discover capabilities. Review access. Install inside your workspace.

DocumentationSecuritySupportPrivacyTerms

MongoDB Atlas Tool Plugin for Dify

A Tool-type Dify plugin that lets Chatflow, Workflow, and Agent applications query, search, and write documents in MongoDB Atlas directly from a workflow node or agent tool call.

Companion plugins:

  • Use the Voyage AI plugin to generate real vector embeddings and pipe them into the Vector Search tool's Query Vector field.
  • Use the MongoDB Atlas Datasource plugin to feed Atlas collections into the Dify Knowledge Base / RAG pipeline.

Features

ToolDescription
Find DocumentsQuery a collection with an optional MongoDB filter and projection
Full-Text SearchAtlas $search full-text search (requires an Atlas Search index)
Vector SearchAtlas $vectorSearch ANN search — accepts a pre-computed embedding vector
AggregateRun any raw aggregation pipeline
Insert DocumentInsert a single document and get back its _id
Update DocumentsupdateMany with a filter + update operator JSON
Delete DocumentsdeleteMany with a filter JSON

Prerequisites

  • A MongoDB Atlas cluster (M0 free tier is sufficient for testing)
  • A connection string: mongodb+srv://<user>:<password>@<cluster>.mongodb.net/
  • For Full-Text Search: an Atlas Search index on the target collection
  • For Vector Search: an Atlas Vector Search index on the target collection

Installation

From Dify Marketplace

Search for MongoDB Atlas Tool in the Dify Plugin Marketplace and click Install.

Local / Debug Install

  1. Clone or download this repository.
  2. Copy .env.example to .env and fill in your Dify remote debug URL and key.
  3. Install dependencies:
    pip install -r requirements.txt
    
  4. Run the plugin:
    python -m main
    
  5. The plugin will appear in your Dify workspace under Plugins.

Package for distribution

dify plugin package ./mongodb_atlas_tool

Configuration

When installing the plugin, you will be prompted for:

CredentialRequiredDescription
Connection String✅mongodb+srv://user:password@cluster.mongodb.net/

Tool Reference

Find Documents

Query documents using a MongoDB filter.

ParameterTypeRequiredFormDescription
database_namestring✅formDatabase to query
collection_namestring✅llmCollection to query
filter_jsonstring❌llmJSON filter, e.g. {"status": "active"}
projection_jsonstring❌llmJSON projection, e.g. {"name": 1, "_id": 0}
limitnumber❌formMax documents to return (default 20, max 1000)

Output (JSON): Each document is yielded as its own JSON message — json[0] is the first document, json[1] is the second, etc. Results are directly iterable in Dify's Iterate/Loop nodes.


Full-Text Search

Atlas $search across all text fields. Requires an Atlas Search index.

ParameterTypeRequiredFormDescription
database_namestring✅formDatabase
collection_namestring✅llmCollection
querystring✅llmSearch query string
index_namestring❌formAtlas Search index name (default "default")
limitnumber❌formMax results (default 20)

Output (JSON): Each document is yielded as its own JSON message — directly iterable.
Output (text): A JSON array of stringified documents, pipeable to the Rerank tool's documents parameter.
Each document includes a _search_score field.


Vector Search

Atlas $vectorSearch approximate nearest-neighbour search. Requires an Atlas Vector Search index.

ParameterTypeRequiredFormDescription
database_namestring✅formDatabase
collection_namestring✅llmCollection
query_vectorstring✅*llmPre-computed embedding as a JSON float array
query_textstring✅*llmFallback text query (uses placeholder zero-vector — use Voyage AI plugin for real embeddings)
vector_index_namestring❌formVector Search index name (default "vector_index")
vector_fieldstring❌formEmbedding field name (default "embedding")
num_candidatesnumber❌formANN candidates (default 150, must be ≥ limit)
limitnumber❌formMax results (default 20)

* Provide either query_vector or query_text.

Tip: Use the Voyage AI plugin's Embed Text tool to generate query_vector. The output text variable can be piped directly into query_vector — the plugin automatically handles the array format.

Output (JSON): Each document is yielded as its own JSON message — directly iterable.
Output (text): A JSON array of stringified documents, pipeable to the Rerank tool's documents parameter.
Each document includes a _vector_score field. The embedding field is excluded from results.


Aggregate

Run a raw MongoDB aggregation pipeline.

ParameterTypeRequiredFormDescription
database_namestring✅formDatabase
collection_namestring✅llmCollection
pipeline_jsonstring✅llmPipeline as JSON array, e.g. [{"$match": {...}}, {"$group": {...}}]
limitnumber❌formSafety cap — appended automatically if no $limit stage present (default 100)

Output (JSON): Each result document is yielded as its own JSON message — directly iterable.


Insert Document

ParameterTypeRequiredFormDescription
database_namestring✅formDatabase
collection_namestring✅llmCollection
document_jsonstring✅llmDocument as JSON object, e.g. {"name": "Alice", "age": 30}

Output: { "database", "collection", "inserted_id", "acknowledged": true }


Update Documents

ParameterTypeRequiredFormDescription
database_namestring✅formDatabase
collection_namestring✅llmCollection
filter_jsonstring✅llmFilter JSON, e.g. {"status": "pending"}
update_jsonstring✅llmUpdate JSON, e.g. {"$set": {"status": "done"}}
upsertboolean❌formInsert if no match (default false)

Output: { "database", "collection", "matched_count", "modified_count", "upserted_id", "acknowledged" }


Delete Documents

ParameterTypeRequiredFormDescription
database_namestring✅formDatabase
collection_namestring✅llmCollection
filter_jsonstring✅llmFilter JSON, e.g. {"status": "archived"}

⚠️ Passing {} as filter_json deletes all documents in the collection.

Output: { "database", "collection", "deleted_count", "acknowledged" }


Recommended Workflow (with Voyage AI)

User query → Voyage AI Embed Text (input_type=query)
               ↓ output: text (JSON float array)
          → MongoDB Atlas Vector Search (query_vector = {{embed.text}})
               ↓ json output: json[0], json[1], ... (individual documents)
               ↓ text output: stringified doc array (for reranker)
          → Voyage AI Rerank (query, documents = {{vector_search.text}})
               ↓ json output: json[0], json[1], ... (ranked results)
          → Iterate node / LLM answer node

Note: All query/search tools yield one JSON message per document. This means json[0], json[1], etc. are individual documents — you can pipe the output directly to an Iterate or Loop node without extracting a nested field.


Observability

All MongoClient connections use appname="devrel-integration-atlas-dify-python", which appears in Atlas logs and the Atlas Monitoring dashboard under Application Names.


Support

  • GitHub Issues: https://github.com/mongodb-developer/dify-plugins-mongodbatlas-tool/issues
  • MongoDB Developer Community: https://www.mongodb.com/community/forums/

License

Apache 2.0 — see LICENSE for details.