logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mongo-db-integration-tool

Facilitates direct operational control over MongoDB instances, enabling sophisticated data retrieval, schema examination, and manipulation tasks using conversational language inputs.

Author

mongo-db-integration-tool logo

vivek1612

MIT License

Quick Info

GitHub GitHub Stars 0
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

mongodbapisschemasvivek1612 mongodbmongodb mcpmongodb databases

🗄️ MongoDB MCP Server for LLMs

Node.js 18+ License: MIT smithery badge

A Model Context Protocol (MCP) service interface designed to grant Large Language Models (LLMs) direct access to interact with MongoDB persistence layers. Users can execute complex database queries, introspect collection structures, and manage stored entities fluidly via natural language commands.

✨ Core Capabilities

  • 🔍 Introspection of collection structural definitions (schemas)
  • 📊 Execution of document retrieval with advanced filtering
  • 📈 Management and overview of database indexes
  • 📝 Atomic operations on documents (creation, modification, purging)

Demo Video

https://github.com/user-attachments/assets/2389bf23-a10d-49f9-bca9-2b39a1ebe654

🚀 Getting Started

To begin utilizing this service, first secure your MongoDB connection URI and integrate the following configuration block into your Claude Desktop configuration file:

MacOS Path: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows Path: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "mongodb": { "command": "npx", "args": [ "mongo-mcp", "mongodb://:@:/?authSource=admin" ] } } }

Automated Installation via Smithery

Leverage the Smithery CLI for streamlined deployment of the MongoDB MCP Server for Claude Desktop:

bash npx -y @smithery/cli install mongo-mcp --client claude

Prerequisites

  • A runtime environment supporting Node.js version 18 or higher
  • The Node Package eXecuter (npx)
  • Docker and Docker Compose (required solely for operating the local sandbox environment)
  • An MCP-compatible client application (e.g., Claude Desktop)

Local Testing Environment Setup

If you lack an accessible MongoDB server for immediate connection, follow these steps to provision a sample sandbox:

  1. Initiate the MongoDB service via Docker Compose:

bash docker-compose up -d

  1. Populate the database with representative test records:

bash npm run seed

Configuration for Claude Desktop

Update your Claude Desktop configuration file with the relevant settings:

MacOS Path: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows Path: %APPDATA%/Claude/claude_desktop_config.json

Local Development Configuration Mode:

{ "mcpServers": { "mongodb": { "command": "node", "args": [ "dist/index.js", "mongodb://root:example@localhost:27017/test?authSource=admin" ] } } }

Sample Sandbox Data Schema Overview

The seeding utility populates three distinct collections with sample entities:

Users Collection

  • Biographical and contact information (name, electronic mail address, age)
  • Hierarchical address structure including geographic coordinates
  • Lists detailing user proclivities or hobbies
  • Timestamps marking membership commencement

Products Collection

  • Catalog details (designation, SKU identifier, classification)
  • Nested technical attribute descriptions
  • Pricing structure and current inventory levels
  • Associative metadata tags and quality evaluations

Orders Collection

  • Transaction specifics, including constituent items
  • References linking back to the involved user entity
  • Logistics and payment modality documentation
  • Current processing or fulfillment status indicator

🎯 Illustrative Usage Scenarios

Engage Claude with these sample directives to explore the tool's capabilities:

Fundamental Operations

plaintext "Query the roster of accessible collections." "Display the structural blueprint for the 'users' dataset." "Retrieve every user record geographically situated in San Francisco."

Complex Retrieval Logic

plaintext "Identify all items categorized as electronics that are presently stocked and priced below one thousand U.S. dollars." "Fetch all transaction records associated with the email john@example.com." "Generate a listing of products whose quality assessment score surpasses 4.5."

Index Administration

plaintext "Enumerate the indexes currently defined on the users collection." "Establish a new index on the products collection targeting the 'category' attribute." "Provide a consolidated inventory of all indexes across the entire database structure."

Document Lifecycle Management

plaintext "Introduce a novel product entry named 'Gaming Laptop' into the products collection." "Modify the transactional state for the order identified by key X to 'shipped'." "Locate and permanently remove any product entries currently marked as depleted from inventory."

📝 Exposed Interface Methods

The service layer exposes the following functional methods for database interaction:

Retrieval Methods

  • find: Executes targeted document retrieval incorporating filtering criteria and output projection specifications
  • listCollections: Provides a catalog of all extant collections
  • insertOne: Persists a single, newly created document
  • updateOne: Modifies the contents of a specific existing document
  • deleteOne: Erases a designated document from its collection

Index Management Methods

  • createIndex: Formulates and applies a new index to a collection
  • dropIndex: Decommissions and removes an existing index
  • indexes: Returns the index definitions pertinent to a specified collection

📜 Licensing Information

This software artifact is distributed under the terms of the MIT License; consult the accompanying LICENSE documentation for comprehensive details.

WIKIPEDIA: XMLHttpRequest (XHR) is an API in the form of a JavaScript object whose methods transmit HTTP requests from a web browser to a web server. The methods allow a browser-based application to send requests to the server after page loading is complete, and receive information back. XMLHttpRequest is a component of Ajax programming. Prior to Ajax, hyperlinks and form submissions were the primary mechanisms for interacting with the server, often replacing the current page with another one.

== History == The concept behind XMLHttpRequest was conceived in 2000 by the developers of Microsoft Outlook. The concept was then implemented within the Internet Explorer 5 browser (1999). However, the original syntax did not use the XMLHttpRequest identifier. Instead, the developers used the identifiers ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP"). As of Internet Explorer 7 (2006), all browsers support the XMLHttpRequest identifier. The XMLHttpRequest identifier is now the de facto standard in all the major browsers, including Mozilla's Gecko layout engine (2002), Safari 1.2 (2004) and Opera 8.0 (2005).

=== Standards === The World Wide Web Consortium (W3C) published a Working Draft specification for the XMLHttpRequest object on April 5, 2006. On February 25, 2008, the W3C published the Working Draft Level 2 specification. Level 2 added methods to monitor event progress, allow cross-site requests, and handle byte streams. At the end of 2011, the Level 2 specification was absorbed into the original specification. At the end of 2012, the WHATWG took over development and maintains a living document using Web IDL.

== Usage == Generally, sending a request with XMLHttpRequest has several programming steps.

Create an XMLHttpRequest object by calling a constructor: Call the "open" method to specify the request type, identify the relevant resource, and select synchronous or asynchronous operation: For an asynchronous request, set a listener that will be notified when the request's state changes: Initiate the request by calling the "send" method: Respond to state changes in the event listener. If the server sends response data, by default it is captured in the "responseText" property. When the object stops processing the response, it changes to state 4, the "done" state. Aside from these general steps, XMLHttpRequest has many options to control how the request is sent and how the response is processed. Custom header fields can be added to the request to indicate how the server should fulfill it, and data can be uploaded to the server by providing it in the "send" call. The response can be parsed from the JSON format into a readily usable JavaScript object, or processed gradually as it arrives rather than waiting for the entire text. The request can be aborted prematurely or set to fail if not completed in a specified amount of time.

== Cross-domain requests ==

In the early development of the World Wide Web, it was found possible to brea

See Also

`