# MongoDB

An MCP server that connects your coding agent to MongoDB databases and Atlas, so it can read schemas, run queries and open documents while you work.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 1163 repo stars
- Author: mongodb-js
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mongodb-js/mongodb-mcp-server
- Updated: 2026-10-23
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/mongodb

## What it does

Connect the agent to a deployment and it can read a collection's schema, run a query, look up a document. Tool sets cover Atlas and the database itself, and there are assistant tools alongside.

The fast path is `npx -y mongodb-mcp-server@latest setup`: it asks for the connection string or Atlas API credentials, then walks you through the rest. An agent can do the same job with the setup skill, added through `npx skills add https://github.com/mongodb/agent-skills --skill mongodb-mcp-setup`. Two official plugins split the cases. `mongodb` runs the server locally against your own deployment; `mongodb-atlas` talks to the hosted Atlas server over OAuth and starts nothing on your machine.

The connection string lives in `MDB_MCP_CONNECTION_STRING`. Add `--readOnly` before pointing this at a live database, because that mode turns writes off. Atlas tools also need Atlas API credentials.

## Requirements
- Needs: Docker
- Works with: MongoDB

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- inspect a collection's shape before touching the code
- run a query without leaving the agent chat
- track down a document a filter keeps missing
- set up the server with the interactive wizard
- reach Atlas from the agent with nothing running locally

## Example prompts
- Show me the schema of the `orders` collection and list documents missing `status`.
- Run a read-only count of `users` created this month.
- Install the `mongodb-mcp-setup` skill and wire up the local server for this project.

## Similar
- [705-technologies-nosql-mongodb](https://affpapa.org/en/nevibecode/skills/705-technologies-nosql-mongodb.md) — skill · 216 installs
- [mongodb-expert](https://affpapa.org/en/nevibecode/skills/mongodb-expert.md) — skill · 195 installs
- [mongodb-skills](https://affpapa.org/en/nevibecode/plugins/mongodb-skills.md) — plugin · ★ 1216 repo stars
- [mongodb-mcp-setup](https://affpapa.org/en/nevibecode/skills/mongodb-mcp-setup.md) — skill · 4300 installs
- [mongodb-atlas-stream-processing](https://affpapa.org/en/nevibecode/skills/mongodb-atlas-stream-processing.md) — skill · 4100 installs
- [alibabacloud-mongodb-instances-manage](https://affpapa.org/en/nevibecode/skills/alibabacloud-mongodb-instances-manage.md) — skill · 174 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
