--- id: langchain-mongodb version: "0.11.0" license: unclear license_treatment: unclear maintenance: aging --- # langchain-mongodb — An integration package connecting MongoDB and LangChain License: unclear · Maintenance: aging · Downloads: 1.0M/mo ## 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 above — verify before relying. Connects MongoDB Atlas Vector Search to LangChain for semantic search and retrieval-augmented generation workflows using vector embeddings stored in MongoDB. 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 pip install langchain-mongodb uv add langchain-mongodb poetry add langchain-mongodb ## Installing langchain-mongodb 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. 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") Requires Python >= 3.10, a MongoDB Atlas cluster with a vector search index already configured, and credentials for both MongoDB and an embedding provider. 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_current - Install friction: low - Maintenance: aging - Downloads: 1.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags mongodb atlas vector search langchain, semantic search mongodb, rag with mongodb, vector store mongodb, langchain mongodb integration, embedding storage mongodb, similarity search mongodb, vector-search, rag, mongodb [View on SkillFed](https://skillfed.io/packages/langchain-mongodb) · [View on PyPI](https://pypi.org/project/langchain-mongodb/)