Skip to content
Install
mcp-registry/mongo-mcp
mongo-mcp logo

mongo-mcp

Author: QuantGeekDev

Description: Model-Context-Protocol (MCP) server that lets LLMs query and manage MongoDB databases through natural-language prompts.

Stars: 158

Forks: 30

License: MIT License

Category: Open Source

Overview

Installation

1. Prerequisites:
• Node.js ≥ 18 and npm ≥ 9 installed
• A running MongoDB instance (local or cloud) and a connection string
2. Clone the repository:
git clone https://github.com/QuantGeekDev/mongo-mcp.git cd mongo-mcp
3. Install dependencies:
npm install
4. Environment configuration:
Create a .env file (or export variables in your shell) with at least: MONGODB_URI="mongodb://<user>:<password>@<host>:<port>/<db-name>" PORT=3000 # port the MCP server will listen on
5. Build TypeScript (if repo not using ts-node directly):
npm run build # usually runs `tsc`
6. Start the server:
npm start # or: node dist/index.js
7. Verify:
The service should listen on http://localhost:3000. Issue a GET /health (or root route) to check readiness.

01

find

Query documents with filtering and projection

02

listCollections

List available collections

03

insertOne

Insert a single document

04

updateOne

Update a single document

05

deleteOne

Delete a single document

06

createIndex

Create a new index

07

dropIndex

Remove an index

08

indexes

List indexes for a collection

License: MIT License
Updated 7/30/2025