LabscoMCP early access ↗
manpreet2000MCP SERVER

MCP Database Server for MongoDB

Query, insert, delete and aggregate in MongoDB from a conversation — no shell, no driver code.

by manpreet2000 ↗NoSQL, Graph & Key-Value StoresCommunity

LABSCO SUMMARY

Aggregation is what makes it worth wiring up.

Listing documents is convenient; running a pipeline is the part that saves real time, because getting a Mongo aggregation right is fiddly and iterating on it in chat with the data in front of you is genuinely faster than in a shell. The default limit of 10 with a 1000 ceiling is a sensible guard against pulling a collection into context. The write tools have no confirmation step, so scope the connection user accordingly.

What it is

A MongoDB client for assistants. It lists collections, runs find queries with filters and projections, inserts and deletes single documents, and executes aggregation pipelines — the everyday half of a Mongo shell session, reachable in plain language. Other databases are named as future work; MongoDB is what it does today.

What you get

  • getCollections lists every collection in the connected database
  • getCollection returns documents with a query, a projection and a limit that defaults to 10 and caps at 1000
  • insertOne adds a single document to a collection
  • deleteOne removes the first document matching a query
  • aggregate runs an aggregation pipeline with options

Requirements

Node.js v20.12.2 or higher and a MongoDB instance. Clone the repository, npm install, npm run build, then point your client at dist/index.js with MONGODB_URI in the environment block. The connection string carries your database credentials, so keep it out of version control. Write tools are always available — there is no read-only mode — so give the URI a user scoped to what you are willing to let an assistant change.

Setup effort

Build from source — git clone https://github.com/manpreet2000/mcp-database-server.git