MongoDB
Query MongoDB databases and manage Atlas clusters.
- Checks
- 9 of 9 passed
- License
- Apache License 2.0
- Last commit
- yesterday
- GitHub stars
- 1.2k
- Reviewed at
6900d84· Dec 4, 2026
Install
npm · mongodb-mcp-server@latest
Needs MDB_MCP_CONNECTION_STRING.
claude mcp add mongodb -e MDB_MCP_CONNECTION_STRING=... -- npx -y mongodb-mcp-server@latest --readOnly{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server@latest",
"--readOnly"
],
"env": {
"MDB_MCP_CONNECTION_STRING": "..."
}
}
}
}Tools
18 tools and 2 resources listed by MongoDB MCP Server 3.4.0 in our sandbox on Dec 4, 2026.
aggregate-dbRead-onlyReaches outsideRun an aggregation against a MongoDB database
aggregateRead-onlyReaches outsideRun an aggregation against a MongoDB collection
collection-indexesRead-onlyReaches outsideDescribe the indexes for a collection
collection-schemaRead-onlyReaches outsideDescribe the schema for a collection
collection-storage-sizeRead-onlyReaches outsideGets the size of the collection
connectRead-onlyReaches outsideConnect to a MongoDB instance and get back a connectionId to pass to the other MongoDB tools.
countRead-onlyReaches outsideGets the number of documents in a MongoDB collection using db.collection.count() and query as an optional filter parameter
db-statsRead-onlyReaches outsideReturns statistics that reflect the use state of a single database
disconnectRead-onlyReaches outsideClose a MongoDB connection and revoke its connectionId.
explainRead-onlyReaches outsideReturns statistics describing the execution of the winning plan chosen by the query optimizer for the evaluated method.
exportRead-onlyReaches outsideExport a query or aggregation results in the specified EJSON format.
findRead-onlyReaches outsideRun a find query against a MongoDB collection
list-collectionsRead-onlyReaches outsideList all collections for a given database
list-connectionsRead-onlyReaches outsideList the active MongoDB connections and their connectionIds.
list-databasesRead-onlyReaches outsideList all databases for a MongoDB connection
mongodb-logsRead-onlyReaches outsideReturns the most recent logged mongod events
search-knowledgeRead-onlyReaches outsideSearch for information in the MongoDB Assistant knowledge base.
list-knowledge-sourcesRead-onlyReaches outsideList available data sources in the MongoDB Assistant knowledge base.
Related MCP servers
More databasesSupabase
OfficialManage Supabase projects: run SQL, apply migrations, read logs, deploy edge functions.
Qdrant
OfficialStore and find memories in a Qdrant vector database.
Neon
OfficialManage Neon Postgres projects and branches, run SQL and plan migrations.
Redis
OfficialNatural-language access to Redis data structures, search and streams.