MongoDB MCP Server
by Manju-droid
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| NO_PROXY | No | Comma-separated list of hosts/domains that bypass the proxy. | |
| ALL_PROXY | No | Fallback proxy used for all protocols. | |
| HTTP_PROXY | No | Proxy used for plain HTTP requests. | |
| HTTPS_PROXY | No | Proxy used for HTTPS requests such as Atlas API, OIDC, and MongoDB Assistant. | |
| DO_NOT_TRACK | No | When set to 1, disables telemetry collection. | |
| MDB_MCP_CONFIG | No | Path to a JSON configuration file for the MongoDB MCP Server. | |
| MDB_MCP_DRY_RUN | No | When true, dumps configuration and enabled tools, then exits without starting the server. | false |
| MDB_MCP_LOGGERS | No | Comma-separated logger types: mcp, disk, and/or stderr. | disk,mcp |
| MDB_MCP_LOG_PATH | No | Folder to store logs. Defaults to platform-specific MongoDB MCP log directory when the disk logger is used. | |
| MDB_MCP_HTTP_HOST | No | Host address to bind the HTTP server to when transport is 'http'. | 127.0.0.1 |
| MDB_MCP_HTTP_PORT | No | Port number for the HTTP server when transport is 'http'. Use 0 for a random port. | 3000 |
| MDB_MCP_READ_ONLY | No | When true, only allows read, connect, and metadata operation types, disabling create/update/delete operations. | false |
| MDB_MCP_TELEMETRY | No | When set to 'disabled', disables telemetry collection. | enabled |
| MDB_MCP_TRANSPORT | No | Transport type: 'stdio' or 'http'. | stdio |
| MDB_MCP_INDEX_CHECK | No | When true, enforces that query operations must use an index, rejecting collection scans. | false |
| MDB_MCP_EXPORTS_PATH | No | Folder to store exported data files. Defaults to platform-specific MongoDB MCP export directory. | |
| MDB_MCP_HTTP_HEADERS | No | Headers that the HTTP server will validate when making requests when transport is 'http'. | {} |
| MDB_MCP_MAX_SESSIONS | No | Maximum number of concurrent sessions the HTTP transport will hold in memory. | 1000 |
| MDB_MCP_MAX_TIME_M_S | No | Maximum 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_ID | No | Atlas 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_TOOLS | No | Comma-separated tool names, operation types, and/or categories of tools that will be disabled. | |
| MDB_MCP_VOYAGE_API_KEY | No | API key for Voyage AI embeddings service, required for creating Atlas Local deployments with auto-embed vector search capabilities. | |
| MDB_MCP_HTTP_BODY_LIMIT | No | Maximum size of the HTTP request body in bytes when transport is 'http'. | 102400 |
| MDB_MCP_IDLE_TIMEOUT_MS | No | Idle timeout for a client to disconnect when using the HTTP transport. | 600000 |
| MDB_MCP_CONNECTION_SCOPE | No | Visibility scope for MongoDB connections created at runtime: 'session' or 'global'. | session |
| MDB_MCP_PREVIEW_FEATURES | No | Comma-separated preview features that are enabled, such as 'mcpUI'. | |
| MDB_MCP_API_CLIENT_SECRET | No | Atlas 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_STRING | No | MongoDB 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_MS | No | Time in milliseconds after which an export is considered expired and eligible for cleanup. | 300000 |
| MDB_MCP_HEALTH_CHECK_HOST | No | Deprecated. Use MDB_MCP_MONITORING_SERVER_HOST instead. Host address to bind the healthCheck HTTP server to when transport is 'http'. | |
| MDB_MCP_HEALTH_CHECK_PORT | No | Deprecated. Use MDB_MCP_MONITORING_SERVER_PORT instead. Port number for the healthCheck HTTP server when transport is 'http'. | |
| MDB_MCP_ASSISTANT_BASE_URL | No | Base URL for the MongoDB Assistant API. | https://knowledge.mongodb.com/api/v1/ |
| MDB_MCP_HTTP_RESPONSE_TYPE | No | The HTTP response type for tool responses: 'sse' for Server-Sent Events, 'json' for standard JSON responses. | sse |
| MDB_MCP_MAX_BYTES_PER_QUERY | No | Maximum size in bytes for results from a find or aggregate tool call. | 16777216 |
| MDB_MCP_MCP_CLIENT_LOG_LEVEL | No | Minimum severity level for log messages forwarded to the MCP client. | debug |
| MDB_MCP_DANGEROUS_HOST_BINDING | No | When true, allows binding the HTTP/monitoring server to a non-loopback host. Off by default for safety. | false |
| MDB_MCP_DISABLE_SERVER_SIDE_JS | No | When true, disallows server-side JavaScript operators such as $where, $function, and $accumulator. | true |
| MDB_MCP_ELICITATION_TIMEOUT_MS | No | Time in milliseconds the user has to respond to an elicitation request before it fails. | 300000 |
| MDB_MCP_MAX_ACTIVE_CONNECTIONS | No | Maximum number of MongoDB connections a single scope can hold open. The preconfigured connection does not count towards the limit. | 10 |
| MDB_MCP_MONITORING_SERVER_HOST | No | Host address to bind the monitoring HTTP server to when transport is 'http'. Requires MDB_MCP_MONITORING_SERVER_PORT. | |
| MDB_MCP_MONITORING_SERVER_PORT | No | Port number for the monitoring HTTP server when transport is 'http'. Requires MDB_MCP_MONITORING_SERVER_HOST. | |
| MDB_MCP_ALLOW_REQUEST_OVERRIDES | No | When true, allows configuration values to be overridden via request headers and query parameters. | false |
| MDB_MCP_EVICTION_IDLE_GRACE_M_S | No | How 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_QUERY | No | Maximum number of documents that can be returned by a find or aggregate tool call. | 100 |
| MDB_MCP_NOTIFICATION_TIMEOUT_MS | No | Notification timeout for a client to be aware of disconnect when using the HTTP transport. | 540000 |
| MDB_MCP_CONNECTION_IDLE_TIMEOUT_MS | No | Milliseconds a MongoDB connection may stay unused before it is closed. Set to 0 to disable reaping. | 600000 |
| MDB_MCP_EXPORT_CLEANUP_INTERVAL_MS | No | Time in milliseconds between export cleanup cycles that remove expired export files. | 120000 |
| MDB_MCP_MONITORING_SERVER_FEATURES | No | Features to expose on the monitoring server when transport is 'http' and monitoringServerHost/monitoringServerPort are set. | health-check |
| MDB_MCP_CONFIRMATION_REQUIRED_TOOLS | No | Comma-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_SESSIONS | No | When true, the HTTP transport accepts a session ID supplied externally through the mcp-session-id header. | false |
| MDB_MCP_QUERY_COUNT_MAX_TIME_MS_CAP | No | Maximum time in milliseconds for the count phase of find operations. | 10000 |
| MDB_MCP_DISABLE_UNTRUSTED_DATA_WARNING | No | When 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_CAP | No | Maximum time in milliseconds for the count phase of aggregation operations. | 60000 |
| MDB_MCP_ATLAS_TEMPORARY_DATABASE_USER_LIFETIME_MS | No | Time 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
| Name | Description |
|---|---|
No tools | |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues