mcp-mongodb
Verified Safeby ziangziangziang
Overview
Exposes a MongoDB database to Model Context Protocol (MCP) agents, providing tools for database inspection, querying, and aggregation.
Installation
npm run build && PORT=3000 npm startEnvironment Variables
- MONGODB_URI
- ALLOWED_DB_NAME
- DISALLOWED_DB_NAME
- PORT
- DEBUG
Security Notes
The `query` and `aggregation` tools accept flexible JSON objects for filters, projections, sort, and pipelines (`z.any()` in their input schemas). This allows agents to construct arbitrary MongoDB read queries. While the README emphasizes 'read-only access' and strongly recommends not exposing the server publicly, and database access can be controlled via `ALLOWED_DB_NAME`/`DISALLOWED_DB_NAME` environment variables, a compromised or maliciously instructed agent could potentially execute complex, resource-intensive read operations or exfiltrate unintended data if the connected MongoDB user has broader permissions than strictly necessary for these tools. It is CRITICAL to ensure the MongoDB user configured via `MONGODB_URI` has minimal, read-only privileges.
Similar Servers
tiger-memory-mcp-server
A backend server for a Minecraft-related application, likely providing data management or proxy services.
lumino-mcp-server
Provides an AI assistant with specialized tools to monitor, analyze, troubleshoot, predict, and simulate changes in Kubernetes, OpenShift, and Tekton environments for SREs and DevOps.
java-mcp-sql-server
Manages and stores game-related data for a Minecraft Coder Pack (MCP) server using a SQL database.
scb-mcp-server
Provides backend server functionality, likely related to Minecraft (MCP) protocol interactions or extensions.