Database Design
Security scan passedEquips your coding agent with a database architect, a SQL specialist and a PostgreSQL table-design skill.

MongoDB's own MCP server: your agent explores schemas, queries and updates data, suggests indexes and manages Atlas clusters.
by mongodb· DatabasesUnclaimed · Yours? Claim it
4 images
About
The MongoDB MCP Server is MongoDB's official MCP server. It lets your agent work with your MongoDB data and deployments in plain words, on any deployment: MongoDB Atlas, Atlas Local, Community Edition or Enterprise Advanced. What you can do with it - List databases and collections, and explain a collection's schema, indexes and storage size - Run find queries, counts and aggregations, and export the results - Insert, update and delete documents, and create, rename or drop collections and indexes - Read explain plans, recent mongod logs and Atlas Performance Advisor suggestions for indexes, schema and slow queries - Manage Atlas: list and create projects, clusters and database users, set IP access lists, load sample data, read alerts and run Stream Processing - Create, connect to and delete local Atlas deployments in Docker - Search MongoDB's documentation and expert guidance through the MongoDB Assistant knowledge base How it connects It runs on your machine with npx -y mongodb-mcp-server (Node.js 22.13 or later), or in Docker. Give it a connection string in MDB_MCP_CONNECTION_STRING for the database tools, or Atlas service account credentials in MDB_MCP_API_CLIENT_ID and MDB_MCP_API_CLIENT_SECRET for the Atlas tools. Running npx -y mongodb-mcp-server@latest setup walks you through the configuration. MongoDB recommends passing secrets as environment variables rather than command-line arguments. Read-only when you want it Start it with --readOnly (or MDB_MCP_READ_ONLY=true) and only its read, connect and metadata tools are registered; MongoDB's own examples use it by default. You can also switch off tools by name or type with disabledTools, ask for confirmation before tools like drop-database and delete-many, and reject queries that don't use an index with --indexCheck. Good to know The Atlas tools only appear when you give it Atlas API credentials, and MongoDB advises granting the service account only the permissions it needs. MongoDB also runs a hosted Atlas Managed MCP Server that you sign in to with OAuth through its mongodb-atlas plugin; this listing is the server you run yourself, which also works with self-managed deployments. It sends usage telemetry to MongoDB unless you set MDB_MCP_TELEMETRY=disabled or DO_NOT_TRACK=1.
Once it’s added
“Show the schema of the 'users' collection and explain the purpose of each field.”
“Find all users from the past week and update their orders to 'shipped'.”
“Show me slow queries from the last 24 hours and suggest indexes to improve performance.”
“Create a new database user for my Atlas cluster with read-only access.”
“Review the schema for the 'users' collection, then generate a Python script that deletes profiles older than 2 years.”
“Summarize and export the contents of the movies collection.”
Before you add it
Reads only
Databases, collections, schemas and indexes · Query and aggregation results · Explain plans and recent mongod logs · Atlas projects, clusters, database users and alerts · Performance Advisor suggestions and slow query logs
Makes changes · your agent can ask first
Inserts, updates and deletes documents · Creates, renames and drops collections and indexes · Creates Atlas projects, clusters, database users and IP access list entries · Pauses, resumes and upgrades Atlas clusters
From people who use it
Step by step
Nothing new reaches your agent until a person has looked at it.
Scanned on every change, and again when our rules improve.
Plugins people install alongside MongoDB MCP Server.
Runs on your machine.
claude_desktop_config.json{
"mcpServers": {
"mongodb-mcp-server": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Runs on your machine.
Add to VS Codecode --add-mcp '{"name":"mongodb-mcp-server","command":"npx","args":["-y","[email protected]"]}'copilot mcp add mongodb-mcp-server -- npx -y [email protected]
Runs on your machine.
Add to Cursor.cursor/mcp.json{
"mcpServers": {
"mongodb-mcp-server": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Runs on your machine.
claude mcp add mongodb-mcp-server -- npx -y [email protected]
Runs on your machine.
codex mcp add mongodb-mcp-server -- npx -y [email protected]
Runs on your machine.
~/.gemini/config/mcp_config.json{
"mcpServers": {
"mongodb-mcp-server": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Runs on your machine.
gemini mcp add mongodb-mcp-server npx -y [email protected]
Runs on your machine.
Runs on your machine.
opencode mcp add mongodb-mcp-server -- npx -y [email protected]
Runs on your machine.
~/.hermes/config.yaml{
"mcp_servers": {
"mongodb-mcp-server": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}MDB_MCP_ALLOW_REQUEST_OVERRIDESOptionalWhen set to true, allows configuration values to be overridden via request headers and query parameters.MDB_MCP_API_CLIENT_IDOptionalSecretAtlas API client ID for authentication. Required for running Atlas tools.MDB_MCP_API_CLIENT_SECRETOptionalSecretAtlas API client secret for authentication. Required for running Atlas tools.MDB_MCP_ASSISTANT_BASE_URLOptionalBase URL for the MongoDB Assistant API.MDB_MCP_ATLAS_TEMPORARY_DATABASE_USER_LIFETIME_MSOptionalTime in milliseconds that temporary database users created when connecting to MongoDB Atlas clusters will remain active before being automatically deleted.MDB_MCP_CONFIRMATION_REQUIRED_TOOLSOptionalComma separated values of tool names that require user confirmation before execution. Requires the client to support elicitation.MDB_MCP_CONNECTION_SCOPEOptionalVisibility scope for MongoDB connections created at runtime. With 'session' (the default), each MCP session only sees the connections it created (plus the shared 'preconfigured' one) and they are closed when the session ends — recommended when the HTTP transport is exposed to multiple clients without authentication. With 'global', connections are shared across all sessions and survive session rotation.MDB_MCP_CONNECTION_STRINGOptionalSecretMongoDB connection string for direct database connections. Optional, if not set, you'll need to call the connect tool before interacting with MongoDB data.MDB_MCP_DISABLE_SERVER_SIDE_JSOptionalWhen set to true, disallows the use of server-side JavaScript operators (such as $where, $function, and $accumulator) in query filters and aggregation pipelines.MDB_MCP_DISABLED_TOOLSOptionalComma separated values of tool names, operation types, and/or categories of tools that will be disabled.MDB_MCP_DRY_RUNOptionalWhen true, runs the server in dry mode: dumps configuration and enabled tools, then exits without starting the server.MDB_MCP_ELICITATION_TIMEOUT_MSOptionalTime in milliseconds the user has to respond to an elicitation request (such as a tool confirmation prompt) before it fails.MDB_MCP_EXPORT_CLEANUP_INTERVAL_MSOptionalTime in milliseconds between export cleanup cycles that remove expired export files.MDB_MCP_EXPORT_TIMEOUT_MSOptionalTime in milliseconds after which an export is considered expired and eligible for cleanup.MDB_MCP_EXPORTS_PATHOptionalFolder to store exported data files.MDB_MCP_EXTERNALLY_MANAGED_SESSIONSOptionalWhen true, the HTTP transport allows requests with a session ID supplied externally through the 'mcp-session-id' header. When an external ID is supplied, the initialization request is optional.MDB_MCP_HEALTH_CHECK_HOSTOptionalDeprecated. Use `monitoringServerHost` instead. Host address to bind the healthCheck HTTP server to (only used when transport is 'http'). If provided, `healthCheckPort` must also be set.MDB_MCP_HEALTH_CHECK_PORTOptionalDeprecated. Use `monitoringServerPort` instead. Port number for the healthCheck HTTP server (only used when transport is 'http'). If provided, `healthCheckHost` must also be set.MDB_MCP_HTTP_BODY_LIMITOptionalMaximum size of the HTTP request body in bytes (only used when transport is 'http'). This value is passed as the optional limit parameter to the Express.js json() middleware.MDB_MCP_HTTP_HEADERSOptionalHeader that the HTTP server will validate when making requests (only used when transport is 'http').MDB_MCP_HTTP_HOSTOptionalHost address to bind the HTTP server to (only used when transport is 'http').MDB_MCP_HTTP_PORTOptionalPort number for the HTTP server (only used when transport is 'http'). Use 0 for a random port.MDB_MCP_HTTP_RESPONSE_TYPEOptionalThe HTTP response type for tool responses: 'sse' for Server-Sent Events, 'json' for standard JSON responses.MDB_MCP_IDLE_TIMEOUT_MSOptionalIdle timeout for a client to disconnect (only applies to http transport).MDB_MCP_INDEX_CHECKOptionalWhen set to true, enforces that query operations must use an index, rejecting queries that perform a collection scan.MDB_MCP_LOG_PATHOptionalFolder to store logs.MDB_MCP_LOGGERSOptionalComma separated values of logger types.MDB_MCP_MAX_ACTIVE_CONNECTIONSOptionalMaximum number of MongoDB connections a single scope (an MCP session by default, see connectionScope) can hold open. When exceeded, the scope's least-recently-used connection is closed and its connectionId revoked. The preconfigured connection does not count towards the limit.MDB_MCP_MAX_BYTES_PER_QUERYOptionalThe maximum size in bytes for results from a find or aggregate tool call. This serves as an upper bound for the responseBytesLimit parameter in those tools.MDB_MCP_MAX_DOCUMENTS_PER_QUERYOptionalThe maximum number of documents that can be returned by a find or aggregate tool call. For the find tool, the effective limit will be the smaller of this value and the tool's limit parameter.MDB_MCP_MAX_SESSIONSOptionalMaximum number of concurrent sessions the HTTP transport will hold in memory (only used when transport is 'http'). Each session holds a full server instance, transport, and timers, so choose a value based on your deployment's available memory; the default is a conservative safety net rather than a recommended production value.MDB_MCP_MAX_TIME_M_SOptionalThe maximum time in milliseconds that operations are allowed to run on the MongoDB server. When set, this value is passed as the maxTimeMS option to read operations such as find, aggregate, and count.MDB_MCP_MCP_CLIENT_LOG_LEVELOptionalMinimum severity level for log messages forwarded to the MCP client.MDB_MCP_MONITORING_SERVER_FEATURESOptionalFeatures to expose on the monitoring server (only used when transport is 'http' and monitoringServerHost/monitoringServerPort are set).MDB_MCP_MONITORING_SERVER_HOSTOptionalHost address to bind the monitoring HTTP server to (only used when transport is 'http'). If provided, `monitoringServerPort` must also be set.MDB_MCP_MONITORING_SERVER_PORTOptionalPort number for the monitoring HTTP server (only used when transport is 'http'). If provided, `monitoringServerHost` must also be set.MDB_MCP_NOTIFICATION_TIMEOUT_MSOptionalNotification timeout for a client to be aware of disconnect (only applies to http transport).MDB_MCP_PREVIEW_FEATURESOptionalComma separated values of preview features that are enabled.MDB_MCP_READ_ONLYOptionalWhen set to true, only allows read, connect, and metadata operation types, disabling create/update/delete operations.MDB_MCP_TELEMETRYOptionalWhen set to disabled, disables telemetry collection.MDB_MCP_TRANSPORTOptionalEither 'stdio' or 'http'.MDB_MCP_VOYAGE_API_KEYOptionalSecretAPI key for Voyage AI embeddings service (required for creating Atlas Local deployments with auto-embed vector search capabilities).Scanned and passed · checked 6 h ago
Security scan
Passed
Safe to install in every agent it supports. Runs on your machine.
Plugins people install alongside MongoDB MCP Server.
Equips your coding agent with a database architect, a SQL specialist and a PostgreSQL table-design skill.
Let your agent explore schemas and query your databases, from Postgres and MySQL to BigQuery, AlloyDB and Spanner.
Let your agent work with your Firebase projects: Firestore data, Auth users, security rules, Crashlytics and deploys.
Supabase's own MCP server: your agent manages tables, runs SQL and migrations, checks logs and deploys Edge Functions in your projects.
Nobody has shared how they use MongoDB MCP Server yet.
No reviews yet. Used MongoDB MCP Server? Say how it went.
Write a review