Skip to main content
Glama
Vijayakumar-DevOps

MongoDB MCP Server

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 (Atlas API, OIDC, Assistant).
DO_NOT_TRACKNoWhen set to 1, disables telemetry collection.
MDB_MCP_CONFIGNoPath to a JSON configuration file.
MDB_MCP_DRY_RUNNoWhen true, runs the server in dry mode: dumps configuration and enabled tools, then exits without starting the server.false
MDB_MCP_LOGGERSNoComma separated values of logger types.disk,mcp
MDB_MCP_LOG_PATHNoFolder to store logs.
MDB_MCP_HTTP_HOSTNoHost address to bind the HTTP server to (only used when transport is 'http').127.0.0.1
MDB_MCP_HTTP_PORTNoPort number for the HTTP server (only used when transport is 'http'). Use 0 for a random port.3000
MDB_MCP_READ_ONLYNoWhen set to 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_TRANSPORTNoEither 'stdio' or 'http'.stdio
MDB_MCP_INDEX_CHECKNoWhen set to true, enforces that query operations must use an index, rejecting queries that perform a collection scan.false
MDB_MCP_EXPORTS_PATHNoFolder to store exported data files.
MDB_MCP_HTTP_HEADERSNoHeader that the HTTP server will validate when making requests (only used when transport is 'http').{}
MDB_MCP_MAX_SESSIONSNoMaximum 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.1000
MDB_MCP_MAX_TIME_M_SNoThe 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_API_CLIENT_IDNoAtlas API client ID for authentication. Required for running Atlas tools.
MDB_MCP_DISABLED_TOOLSNoComma separated values of 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 (only used when transport is 'http'). This value is passed as the optional limit parameter to the Express.js json() middleware.102400
MDB_MCP_IDLE_TIMEOUT_MSNoIdle timeout for a client to disconnect (only applies to http transport).600000
MDB_MCP_PREVIEW_FEATURESNoComma separated values of preview features that are enabled.
MDB_MCP_API_CLIENT_SECRETNoAtlas API client secret for authentication. Required for running Atlas tools.
MDB_MCP_CONNECTION_STRINGNoMongoDB 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_EXPORT_TIMEOUT_MSNoTime in milliseconds after which an export is considered expired and eligible for cleanup.300000
MDB_MCP_HEALTH_CHECK_HOSTNoDeprecated. 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_PORTNoDeprecated. 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_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_QUERYNoThe 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.16777216
MDB_MCP_MCP_CLIENT_LOG_LEVELNoMinimum severity level for log messages forwarded to the MCP client.debug
MDB_MCP_DISABLE_SERVER_SIDE_JSNoWhen set to true, disallows the use of server-side JavaScript operators (such as $where, $function, and $accumulator) in query filters and aggregation pipelines.true
MDB_MCP_MONITORING_SERVER_HOSTNoHost 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_PORTNoPort number for the monitoring HTTP server (only used when transport is 'http'). If provided, monitoringServerHost must also be set.
MDB_MCP_ALLOW_REQUEST_OVERRIDESNoWhen set to true, allows configuration values to be overridden via request headers and query parameters.false
MDB_MCP_MAX_DOCUMENTS_PER_QUERYNoThe 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.100
MDB_MCP_NOTIFICATION_TIMEOUT_MSNoNotification timeout for a client to be aware of disconnect (only applies to http transport).540000
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 (only used when transport is 'http' and monitoringServerHost/monitoringServerPort are set).health-check
MDB_MCP_CONFIRMATION_REQUIRED_TOOLSNoComma separated values of tool names that require user confirmation before execution. Requires the client to support 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 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.false
MDB_MCP_ATLAS_TEMPORARY_DATABASE_USER_LIFETIME_MSNoTime in milliseconds that temporary database users created when connecting to MongoDB Atlas clusters will 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

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
resources
{
  "subscribe": true,
  "listChanged": true
}
completions
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
aggregate-dbC

Run an aggregation against a MongoDB database

aggregateB

Run an aggregation against a MongoDB collection

collection-indexesA

Describe the indexes for a collection

collection-schemaB

Describe the schema for a collection

collection-storage-sizeB

Gets the size of the collection

connectA

Connect to a MongoDB instance. The config resource captures if the server is already connected to a MongoDB cluster. If the user has configured a connection string or has previously called the connect tool, a connection is already established and there's no need to call this tool unless the user has explicitly requested to switch to a new MongoDB cluster.

countA

Gets the number of documents in a MongoDB collection using db.collection.count() and query as an optional filter parameter

create-collectionA

Creates a new collection in a database. If the database doesn't exist, it will be created automatically.

create-indexB

Create an index for a collection

db-statsB

Returns statistics that reflect the use state of a single database

delete-manyA

Removes all documents that match the filter from a MongoDB collection

drop-collectionA

Removes a collection or view from the database. The method also removes any indexes associated with the dropped collection.

drop-databaseA

Removes the specified database, deleting the associated data files

drop-indexA

Drop an index for the provided database and collection.

explainA

Returns statistics describing the execution of the winning plan chosen by the query optimizer for the evaluated method

exportB

Export a query or aggregation results in the specified EJSON format.

findB

Run a find query against a MongoDB collection

insert-manyA

Insert an array of documents into a MongoDB collection. If the list of documents is above com.mongodb/maxRequestPayloadBytes, consider inserting them in batches.

list-collectionsA

List all collections for a given database

list-databasesA

List all databases for a MongoDB connection

mongodb-logsA

Returns the most recent logged mongod events

rename-collectionB

Renames a collection in a MongoDB database

update-manyA

Updates all documents that match the specified filter for a collection. If the list of documents is above com.mongodb/maxRequestPayloadBytes, consider updating them in batches.

list-knowledge-sourcesA

List available data sources in the MongoDB Assistant knowledge base. Use this to explore available data sources or to find search filter parameters to use in search-knowledge.

search-knowledgeA

Search for information in the MongoDB Assistant knowledge base. This includes official documentation, curated expert guidance, and other resources provided by MongoDB. Supports filtering by data source and version.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
configServer configuration, supplied by the user either as environment variables or as startup arguments
debug-mongodbDebugging information for MongoDB connectivity issues. Tracks the last connectivity attempt and error information.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Vijayakumar-DevOps/mongo-mcp-1.14.0'

If you have feedback or need assistance with the MCP directory API, please join our Discord server