Skip to content

BootcampToProd/embabel-mongo-mcp-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Embabel Framework: Build a MongoDB MCP Client

This repository demonstrates how to build an intelligent MCP (Model Context Protocol) Client for MongoDB using the Embabel Framework and Spring Boot. The application connects to a MongoDB MCP server and uses AI (LLMs like DeepSeek) to interpret natural language commands, executing MongoDB operations like listing databases, querying collections, and inserting documents.

πŸ“– Complete Guide: For detailed explanations and a full code walkthrough, read our comprehensive tutorial.
πŸ‘‰ Build MongoDB MCP Client with Embabel Framework

πŸŽ₯ Video Tutorial: Prefer hands-on learning? Watch our step-by-step implementation guide.
πŸ‘‰ YouTube Tutorial - Build MongoDB MCP Client with Embabel Framework | Natural Language Database Operations

Build MongoDB MCP Client with Embabel Framework | Natural Language Database Operations

▢️ Watch on YouTube


✨ What This Project Demonstrates

This application showcases how to build an AI-powered MongoDB assistant that understands human intent:

  • Natural Language Database Management - Send commands like "Find all users in the 'testdb' database where age is greater than 30".
  • Intelligent Goal-Driven Agent - The AI automatically identifies the correct operation to perform (LIST_DATABASES, SIMPLE_QUERY, INSERT_DOCUMENT, etc.).
  • Unified MongoDB API - A single REST endpoint handles all database interactions through simple, conversational commands without writing DB queries.

πŸ› οΈ Prerequisites

To run this client effectively, you need to have the MongoDB MCP Server (from our previous tutorial) running on your machine:

  1. MongoDB MCP Server: Get the Server Repository Here
  2. Setup Environment Variables: You must set the following environment variables for the server and client to function correctly:
# LLM API Key (Required for the Client and Server both)
export OPENAI_API_KEY=your_openrouter_api_key_here

# MongoDB Credentials (Required for the Server to "Act")
export MONGODB_CONNECTION_STRING=mongodb://localhost:27017

For more details on understanding and setting up the MongoDB MCP Server, refer to our dedicated guide: Build MongoDB MCP Server Using Embabel Framework


πŸš€ How to Run and Test

For detailed instructions on how to set up, configure, and test the application, kindly go through our comprehensive article:
πŸ‘‰ Click here for Setup & Testing Instructions