mcp-mongo-server
MCP server for querying and modifying MongoDB from AI assistants
Install
See setup instructions on www.npmjs.comWhat it does
This server implements the Model Context Protocol for MongoDB, letting an AI assistant inspect collections, infer document schemas, run queries and aggregation pipelines, and perform writes. It is intended for developers using MCP-capable clients such as Claude Desktop, Cursor, and Windsurf who want to explore or manipulate a MongoDB database conversationally.
It runs on Node.js 20 or newer via npx and supports stdio for local clients or an HTTP endpoint at /mcp for remote access. Configuration can be given as a connection URI argument or environment variable, or as a JSON object of named connections each with its own database permissions. Read-only mode, cross-database aggregation blocking, and server-side JavaScript blocking are available as flags.
Limits are worth noting: HTTP mode rejects browser origins outside localhost unless explicitly allowed, and an optional bearer token can gate the endpoint. Aggregation stages that touch other databases, and operators like $where and $function, are disabled by default. The project recommends scoping MongoDB users to least privilege as a backstop.
Compatibility and authentication
- Connection
- Local
- Transports
- Unspecified
- Authentication
- Unknown
Security and permissions
- When you run the server locally, it runs with your user permissions.
- Authentication type: Unknown.
Repository data
- Stars
- 284
- Last push
- Nov 11, 2026
- License
- MIT
- Archived
- No
Other MongoDB MCP servers
Compare serversFAQ
- What license does mcp-mongo-server use?
- MIT
- Does mcp-mongo-server run locally or remotely?
- It runs locally.
- Is mcp-mongo-server an official server?
- It is listed as a community server.
Embed a listing badge
<a href="https://aiagentsmarketplace.dev/mcp/mcp-mongo-server"><img src="https://aiagentsmarketplace.dev/badges/featured.svg" alt="Featured on AI Agents Marketplace" width="262" height="36"></a>
Comments
No comments yet.