Skip to main content
Glama
Manju-droid

MongoDB MCP Server

by Manju-droid

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NO_PROXYNoComma-separated list of hosts/domains that bypass the proxy.
ALL_PROXYNoFallback proxy used for all protocols.
HTTP_PROXYNoProxy used for plain HTTP requests.
HTTPS_PROXYNoProxy used for HTTPS requests such as Atlas API, OIDC, and MongoDB Assistant.
DO_NOT_TRACKNoWhen set to 1, disables telemetry collection.
MDB_MCP_CONFIGNoPath to a JSON configuration file for the MongoDB MCP Server.
MDB_MCP_DRY_RUNNoWhen true, dumps configuration and enabled tools, then exits without starting the server.false
MDB_MCP_LOGGERSNoComma-separated logger types: mcp, disk, and/or stderr.disk,mcp
MDB_MCP_LOG_PATHNoFolder to store logs. Defaults to platform-specific MongoDB MCP log directory when the disk logger is used.
MDB_MCP_HTTP_HOSTNoHost address to bind the HTTP server to when transport is 'http'.127.0.0.1
MDB_MCP_HTTP_PORTNoPort number for the HTTP server when transport is 'http'. Use 0 for a random port.3000
MDB_MCP_READ_ONLYNoWhen true, only allows read, connect, and metadata operation types, disabling create/update/delete operations.false
MDB_MCP_TELEMETRYNoWhen set to 'disabled', disables telemetry collection.enabled
MDB_MCP_TRANSPORTNoTransport type: 'stdio' or 'http'.stdio
MDB_MCP_INDEX_CHECKNoWhen true, enforces that query operations must use an index, rejecting collection scans.false
MDB_MCP_EXPORTS_PATHNoFolder to store exported data files. Defaults to platform-specific MongoDB MCP export directory.
MDB_MCP_HTTP_HEADERSNoHeaders that the HTTP server will validate when making requests when transport is 'http'.{}
MDB_MCP_MAX_SESSIONSNoMaximum number of concurrent sessions the HTTP transport will hold in memory.1000
MDB_MCP_MAX_TIME_M_SNoMaximum time in milliseconds that operations are allowed to run on the MongoDB server. Passed as maxTimeMS to read operations when set.
MDB_MCP_API_CLIENT_IDNoAtlas API client ID for authentication. Required for running Atlas tools. Can be used together with MDB_MCP_API_CLIENT_SECRET instead of a connection string.
MDB_MCP_DISABLED_TOOLSNoComma-separated tool names, operation types, and/or categories of tools that will be disabled.
MDB_MCP_VOYAGE_API_KEYNoAPI key for Voyage AI embeddings service, required for creating Atlas Local deployments with auto-embed vector search capabilities.
MDB_MCP_HTTP_BODY_LIMITNoMaximum size of the HTTP request body in bytes when transport is 'http'.102400
MDB_MCP_IDLE_TIMEOUT_MSNoIdle timeout for a client to disconnect when using the HTTP transport.600000
MDB_MCP_CONNECTION_SCOPENoVisibility scope for MongoDB connections created at runtime: 'session' or 'global'.session
MDB_MCP_PREVIEW_FEATURESNoComma-separated preview features that are enabled, such as 'mcpUI'.
MDB_MCP_API_CLIENT_SECRETNoAtlas API client secret for authentication. Required for running Atlas tools. Can be used together with MDB_MCP_API_CLIENT_ID instead of a connection string.
MDB_MCP_CONNECTION_STRINGNoMongoDB connection string for direct database connections. Optional; if not set, the connect tool must be called before interacting with MongoDB data. Can be used instead of Atlas API credentials.
MDB_MCP_EXPORT_TIMEOUT_MSNoTime in milliseconds after which an export is considered expired and eligible for cleanup.300000
MDB_MCP_HEALTH_CHECK_HOSTNoDeprecated. Use MDB_MCP_MONITORING_SERVER_HOST instead. Host address to bind the healthCheck HTTP server to when transport is 'http'.
MDB_MCP_HEALTH_CHECK_PORTNoDeprecated. Use MDB_MCP_MONITORING_SERVER_PORT instead. Port number for the healthCheck HTTP server when transport is 'http'.
MDB_MCP_ASSISTANT_BASE_URLNoBase URL for the MongoDB Assistant API.https://knowledge.mongodb.com/api/v1/
MDB_MCP_HTTP_RESPONSE_TYPENoThe HTTP response type for tool responses: 'sse' for Server-Sent Events, 'json' for standard JSON responses.sse
MDB_MCP_MAX_BYTES_PER_QUERYNoMaximum size in bytes for results from a find or aggregate tool call.16777216
MDB_MCP_MCP_CLIENT_LOG_LEVELNoMinimum severity level for log messages forwarded to the MCP client.debug
MDB_MCP_DANGEROUS_HOST_BINDINGNoWhen true, allows binding the HTTP/monitoring server to a non-loopback host. Off by default for safety.false
MDB_MCP_DISABLE_SERVER_SIDE_JSNoWhen true, disallows server-side JavaScript operators such as $where, $function, and $accumulator.true
MDB_MCP_ELICITATION_TIMEOUT_MSNoTime in milliseconds the user has to respond to an elicitation request before it fails.300000
MDB_MCP_MAX_ACTIVE_CONNECTIONSNoMaximum number of MongoDB connections a single scope can hold open. The preconfigured connection does not count towards the limit.10
MDB_MCP_MONITORING_SERVER_HOSTNoHost address to bind the monitoring HTTP server to when transport is 'http'. Requires MDB_MCP_MONITORING_SERVER_PORT.
MDB_MCP_MONITORING_SERVER_PORTNoPort number for the monitoring HTTP server when transport is 'http'. Requires MDB_MCP_MONITORING_SERVER_HOST.
MDB_MCP_ALLOW_REQUEST_OVERRIDESNoWhen true, allows configuration values to be overridden via request headers and query parameters.false
MDB_MCP_EVICTION_IDLE_GRACE_M_SNoHow long a session must be idle before it becomes eligible for least-recently-used eviction when the HTTP transport is at its maxSessions cap.120000
MDB_MCP_MAX_DOCUMENTS_PER_QUERYNoMaximum number of documents that can be returned by a find or aggregate tool call.100
MDB_MCP_NOTIFICATION_TIMEOUT_MSNoNotification timeout for a client to be aware of disconnect when using the HTTP transport.540000
MDB_MCP_CONNECTION_IDLE_TIMEOUT_MSNoMilliseconds a MongoDB connection may stay unused before it is closed. Set to 0 to disable reaping.600000
MDB_MCP_EXPORT_CLEANUP_INTERVAL_MSNoTime in milliseconds between export cleanup cycles that remove expired export files.120000
MDB_MCP_MONITORING_SERVER_FEATURESNoFeatures to expose on the monitoring server when transport is 'http' and monitoringServerHost/monitoringServerPort are set.health-check
MDB_MCP_CONFIRMATION_REQUIRED_TOOLSNoComma-separated tool names that require user confirmation before execution. Requires client support for elicitation.atlas-create-access-list,atlas-create-db-user,drop-database,drop-collection,delete-many,drop-index,atlas-streams-manage,atlas-streams-teardown
MDB_MCP_EXTERNALLY_MANAGED_SESSIONSNoWhen true, the HTTP transport accepts a session ID supplied externally through the mcp-session-id header.false
MDB_MCP_QUERY_COUNT_MAX_TIME_MS_CAPNoMaximum time in milliseconds for the count phase of find operations.10000
MDB_MCP_DISABLE_UNTRUSTED_DATA_WARNINGNoWhen true, tool responses include potentially untrusted data without wrapping it in delimiters and a prompt-injection warning.false
MDB_MCP_AGGREGATION_COUNT_MAX_TIME_MS_CAPNoMaximum time in milliseconds for the count phase of aggregation operations.60000
MDB_MCP_ATLAS_TEMPORARY_DATABASE_USER_LIFETIME_MSNoTime in milliseconds that temporary database users created when connecting to MongoDB Atlas clusters remain active before being automatically deleted.14400000

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription

No tools

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources