This repository contains three complementary projects that demonstrate MongoDB Atlas integration with AI services, vector search capabilities, and Model Context Protocol (MCP) implementations for the MongoDB sample Airbnb dataset.
Document Embedding and Vectorization
A Python application that processes MongoDB documents, generates AI embeddings using AWS Bedrock, and stores vector representations for semantic search capabilities.
- Document chunking and text extraction from JSON
- AWS Bedrock Titan embeddings integration
- Batch processing of MongoDB collections
- Vector storage for similarity search
MongoDB MCP Server
A Model Context Protocol (MCP) server that provides vector search and other capabilities for MongoDB Atlas. This server enables semantic search operations on vector embeddings and integrates with AI agents and tools.
- Vector similarity search using MongoDB
$vectorSearch - Text search with Atlas Search
- Custom aggregation queries
- MCP protocol compliance for AI agent integration
Versions
- simple, single collection single mcp server: searchmcp
- dynamic, multi-collection, multiple mcp endpoint: dyanmicmcp
- advanced, multi-collection, multi-cluster, multiple mcp endpoints, agent tokens, prompts, history: MongoMCP
MCP Client with AWS Bedrock Integration
An interactive client application that connects to MCP servers and uses AWS Bedrock's Claude LLM for intelligent query processing with tool support.
- MCP tool discovery and execution
- AWS Bedrock Claude LLM integration
- Interactive command-line interface
- Conversation history management
- Tool-assisted query processing
- Data Preparation (
jsonembed/): Process raw MongoDB documents and generate vector embeddings - Search Service (
searchmcp/): Deploy MCP server to provide vector search capabilities - AI Interface (
mcpclient/): Use intelligent client to query data through natural language
- Python 3.11 or higher
- MongoDB Atlas cluster with sample Airbnb dataset
- AWS account with Bedrock access
- Docker (optional, for containerized deployment)
-
Set up vector embeddings:
cd jsonembed/ python -m venv venv source venv/bin/activate pip install -r requirements.txt python embedairbnb.py
-
Deploy MCP server:
cd searchmcp/ python -m venv venv source venv/bin/activate pip install -r requirements.txt fastmcp run mongo_mcp.py --transport http --port 8001
-
Run interactive client:
cd mcpclient/ python -m venv venv source venv/bin/activate pip install -r requirements.txt python airbnb-mcp.py
Each project requires configuration files (settings.py or settings_aws.py) with:
- MongoDB Atlas connection details
- AWS credentials and region settings
- Model IDs for Bedrock services
Each project folder contains its own documentation and setup instructions. Please refer to the individual README files for detailed information about each component.
See LICENSE file for details.

