langchain-mongodb
An integration package connecting MongoDB and LangChain
Decision gist · record as of 2026-08-14
Yes, if you are already committed to MongoDB Atlas and LangChain for a RAG or semantic search application. The package has low install friction and no known vulnerabilities. However, the aging maintenance status (211 days since last release) and unclear license warrant verification before production use. Confirm license terms and compatibility with your LangChain version before deploying.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >= 3.10, a MongoDB Atlas cluster with a vector search index already configured, and credentials for both MongoDB and an embedding provider.
- Low install friction with a pure-wheel distribution.
- Maintenance status is aging—last release was 211 days ago—so expect slower response to issues, though the package remains functional for current LangChain versions.
License · maintenance · safety
(unclear) — License treatment is unclear; no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before use in proprietary or restricted contexts.
last release 2026-01-15 (211 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,033,318 downloads/mo, #4,465 on PyPI
Alternatives
Verify before relying
pip install -U langchain-mongodb
from langchain_mongodb import MongoDBAtlasVectorSearch
import os
vectorstore = MongoDBAtlasVectorSearch.from_connection_string(
connection_string=os.environ["MONGODB_CONNECTION_STRING"],
namespace="langchain_db.test",
embedding=embedding_model,
index_name="index_name",
)
docs = vectorstore.similarity_search("query text")- Whether the package is actively maintained or in maintenance-only mode despite the 'aging' status.
- Actual license under which the package is distributed (SPDX or raw text not provided).
- Compatibility guarantees with future LangChain major versions given the aging maintenance signal.
- Whether external embedding providers (e.g., OpenAI) are required or if embeddings can be sourced elsewhere.
What it is and what it does
langchain-mongodb is a LangChain integration that wraps MongoDB Atlas Vector Search, allowing you to use MongoDB as a vector store for semantic search and retrieval-augmented generation (RAG) applications. It depends on langchain, langchain-core, pymongo, and several text-processing libraries to handle embeddings, document storage, and similarity queries.
The package provides a MongoDBAtlasVectorSearch class that connects to a MongoDB Atlas cluster, stores vector embeddings in a collection, and retrieves documents by semantic similarity. You supply connection credentials, a database and collection name, a vector search index name, and an embedding model, then call methods like similarity_search() to find relevant documents. It is designed for workflows where you want to leverage MongoDB's native vector capabilities within a LangChain application.
Use it for
- Build a RAG chatbot that retrieves context from MongoDB before generating answers with an LLM.
- Implement semantic search over a large document corpus stored in MongoDB Atlas.
- Integrate vector embeddings into an existing MongoDB-backed application without switching databases.
- Prototype AI applications that combine LangChain orchestration with MongoDB vector storage.
- Store and query embeddings from multiple embedding models in a single MongoDB collection.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are already committed to MongoDB Atlas and LangChain for a RAG or semantic search application.
The package has low install friction and no known vulnerabilities. However, the aging maintenance status (211 days since last release) and unclear license warrant verification before production use. Confirm license terms and compatibility with your LangChain version before deploying.
Install
langchain-mongodb on PyPI
Before you install
Low install friction with a pure-wheel distribution. Maintenance status is aging—last release was 211 days ago—so expect slower response to issues, though the package remains functional for current LangChain versions.
Requires Python >= 3.10, a MongoDB Atlas cluster with a vector search index already configured, and credentials for both MongoDB and an embedding provider.
License in practice
License treatment is unclear; no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before use in proprietary or restricted contexts.
Quickstart
pip install -U langchain-mongodb
from langchain_mongodb import MongoDBAtlasVectorSearch
import os
vectorstore = MongoDBAtlasVectorSearch.from_connection_string(
connection_string=os.environ["MONGODB_CONNECTION_STRING"],
namespace="langchain_db.test",
embedding=embedding_model,
index_name="index_name",
)
docs = vectorstore.similarity_search("query text")
Verify before relying
- Whether the package is actively maintained or in maintenance-only mode despite the 'aging' status.
- Actual license under which the package is distributed (SPDX or raw text not provided).
- Compatibility guarantees with future LangChain major versions given the aging maintenance signal.
- Whether external embedding providers (e.g., OpenAI) are required or if embeddings can be sourced elsewhere.
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 8 packageslangchain-classiclangchain-corelangchain-text-splitterslangchainlarknumpypymongo-search-utilspymongo |
| Maintenance | Aging 211 days since the last release |
| First released | |
| Downloads | 1,033,318 / month, #4,465 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: langchain_mongodb-0.11.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “mongodb atlas vector search langchain”
- langchain-mongodbConnects MongoDB Atlas Vector Search to LangChain for semantic search…
- pymongo-search-utilsProvides utility functions for vector search operations in MongoDB…
- langchain-milvusIntegrates LangChain with Milvus vector database to enable vector…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also langchain-elasticsearch · langchain-plaid · langchain-qdrant · pymongo-search-utils · langchain-pinecone · langchain-chroma · langchain-astradb · ragstack-ai-knowledge-store · langgraph-checkpoint-mongodb · langchain-graph-retriever