Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Embabel Mongo

БесплатноНе проверен

A demo MCP server for MongoDB built using Embabel. It showcases how AI agents can interact with MongoDB through the Model Context Protocol, enabling operations

GitHubEmbed

Описание

A demo MCP server for MongoDB built using Embabel. It showcases how AI agents can interact with MongoDB through the Model Context Protocol, enabling operations such as listing databases, fetching collections, executing simple and complex queries, managing indexes, creating collections, and inserting documents

README

This repository demonstrates how to build a MongoDB MCP Server using the Embabel Framework and Spring Boot. The application acts as a bridge between AI agents (like Claude Desktop) and your MongoDB Database, allowing the AI to list databases, run complex queries, and insert documents through natural language.

⚠️ Note: This is not an official MongoDB MCP server. It is a demo MCP server created specifically to demonstrate how developers can build their own MCP servers that interact with databases using the Embabel Framework.

📖 Complete Guide: For detailed explanations and a full code walkthrough, read our comprehensive tutorial.
👉 Build MongoDB MCP Server Using Embabel Framework

🎥 Video Tutorial: Prefer hands-on learning? Watch our step-by-step implementation guide.
👉 YouTube Tutorial - Build a MongoDB MCP Server Using Embabel Framework | Chat With Your Database using AI

Build a MongoDB MCP Server Using Embabel Framework | Chat With Your Database using AI

▶️ Watch on YouTube


✨ What This Project Demonstrates

This application showcases how to connect AI agents to a Database using the MCP Server:

  • Model Context Protocol (MCP) implementation using Embabel framework.
  • Database Integration connecting an AI agent to MongoDB.
  • Tool Exposure using Embabel's @Export annotation to turn Java service methods into AI tools.
  • Data Operations including listing databases/collections, executing simple & complex JSON queries, managing indexes, and inserting documents.

📋 Prerequisites

Before running this application, ensure you have:

  • Java 21 or higher
  • OpenRouter API Key (free tier available at OpenRouter.ai)
  • MongoDB Instance (Running locally on port 27017 or via MongoDB Atlas)
  • Node.js (Optional, required if testing with MCP Inspector)
  • Claude Desktop App (Optional, for real-world agent testing)

🚀 Quick Start

1️⃣ Clone the Repository

git clone https://github.com/BootcampToProd/embabel-mongo-mcp-server.git
cd embabel-mongo-mcp-server

2️⃣ Configure Environment Variables

Provide your OpenRouter API key and MongoDB connection details.

OPENAI_API_KEY={YOUR_OPENROUTER_API_KEY}
MONGO_HOST=localhost
MONGO_PORT=27017

3️⃣ Build the Project

mvn clean install

4️⃣ Run the Application

mvn spring-boot:run

The server will start on http://localhost:8080. The MCP endpoint is exposed at /sse.


💡 How to Test

You can test the server using Claude Desktop or the MCP Inspector.

🤖 Option 1: Claude Desktop (Recommended)

  1. Open your Claude Desktop configuration file:

    • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add the following configuration:

{
  "mcpServers": {
    "embabel-mongo-server": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://localhost:8080/sse"
      ]
    }
  }
}
  1. Restart Claude Desktop. You should see your mcp server and available tools.

  2. Ask Claude:

    • "List all databases."
    • "Create a collection named 'users' in 'test_db'."
    • "Insert a user named Alice with age 28 into 'test_db.users'."
    • "Find all users in 'test_db.users' where age is greater than 25."

🔍 Option 2: MCP Inspector

If you want to debug the tools manually:

  1. Ensure the Spring Boot app is running.
  2. Run the inspector in your terminal:
    npx @modelcontextprotocol/inspector
    
  3. In the browser window that opens:
    • Select SSE.
    • Enter URL: http://localhost:8080/sse.
    • Click Connect and test the tools via the UI.

from github.com/BootcampToProd/embabel-mongo-mcp-server

Установка Embabel Mongo

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/BootcampToProd/embabel-mongo-mcp-server

FAQ

Embabel Mongo MCP бесплатный?

Да, Embabel Mongo MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Embabel Mongo?

Нет, Embabel Mongo работает без API-ключей и переменных окружения.

Embabel Mongo — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Embabel Mongo в Claude Desktop, Claude Code или Cursor?

Открой Embabel Mongo на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

wenb1n-dev/SmartDB_MCP

A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim

wenb1n-devавтор: wenb1n-dev

Postgres Server

This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools

madhurprashавтор: madhurprash

Postgres

Query your database in natural language

Anthropicавтор: Anthropic

PostgreSQL

Read-only database access with schema inspection.

modelcontextprotocolавтор: modelcontextprotocol

Redis

Interact with Redis key-value stores.

modelcontextprotocolавтор: modelcontextprotocol

SQLite

Database interaction and business intelligence capabilities.

modelcontextprotocolавтор: modelcontextprotocol

mxcp

Open-source framework for building enterprise-grade MCP servers using just YAML, SQL, and Python, with built-in auth, monitoring, ETL and policy enforcement.

raw-labsавтор: raw-labs

tadas-github/a2asearch-mcp

MCP server to search 4,800+ MCP servers, AI agents, CLI tools and agent skills. Install: npx -y a2asearch-mcp. Ask Claude: "Find MCP servers for database access

tadas-githubавтор: tadas-github

julien040/anyquery

Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by desi

julien040автор: julien040

drakonkat/wizzy-mcp-tmdb

A MCP server for The Movie Database API that enables AI assistants to search and retrieve movie, TV show, and person information.

drakonkatавтор: drakonkat

Compare Embabel Mongo with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории data