MCP server tools

Each tool of the MCP server, with its arguments and whether it reads or writes.

Tools

ToolWhat it doesRequired argumentsOptional argumentsRead-onlyDestructive
list-databasesLists the databases.NoneNoneYesNo
list-collectionsLists the collections of a database.databaseNoneYesNo
collection-schemaInfers the schema of a collection from a sample of documents.databasecollectionsampleSizeresponseBytesLimitYesNo
collection-indexesLists the classic and search indexes of a collection.databasecollectionNoneYesNo
collection-storage-sizeGives the size a collection takes.databasecollectionNoneYesNo
db-statsGives the statistics of a database.databaseNoneYesNo
findFinds documents with a filter, a projection, a sort and a limit.databasecollectionfilterprojectionlimitsortresponseBytesLimitYesNo
aggregateRuns an aggregation on a collection, without $out or $merge.databasecollectionpipelineresponseBytesLimitYesNo
aggregate-dbRuns an aggregation on a database, without $out or $merge.databasepipelineresponseBytesLimitYesNo
countCounts the documents that match a filter.databasecollectionqueryYesNo
explainExplains how a find, an aggregate or a count runs.databasecollectionmethodfindaggregatecountverbosityYesNo
exportExports the result of a query to a resource the client can read.databasecollectionexportTitleexportTargetjsonExportFormatYesNo
mongodb-logsReads the last lines of the node log or its start-up warnings.NonetypeglobalstartupWarningslimitYesNo
insert-manyInserts documents into a collection.databasecollectiondocumentsNoneNoNo
create-indexCreates an index on a collection.databasecollectiondefinitionnameNoNo
create-collectionCreates a collection.databasecollectionNoneNoNo
update-manyUpdates the documents that match a filter.databasecollectionupdatefilterupsertNoYes
rename-collectionRenames a collection.databasecollectionnewNamedropTargetNoYes
delete-manyDeletes the documents that match a filter.databasecollectionfilterNoYes
drop-indexDrops a classic or search index.databasecollectionindexNametypeclassicsearchNoYes
drop-collectionDrops a collection.databasecollectionNoneNoYes
drop-databaseDrops a database.databaseNoneNoYes
connectReturns the connection identifier, which the server sets from the authenticated user.connectionStringconnectionNameYesNo
disconnectCloses the connection; the server opens it again on the next call.NoneNoneYesNo
list-connectionsLists the connection of the authenticated user.NoneNoneYesNo

See also