Loading...
npx -y @smithery/cli install mongo-mcp --client claude{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"mongo-mcp",
"mongodb://<username>:<password>@<host>:<port>/<database>?authSource=admin"
]
}
}
}findQuery documents in a MongoDB collection using specified filters and projections.
Read-only operation; retrieves data without modifying it.
listCollectionsList the available collections in the MongoDB database.
Read-only operation; retrieves metadata without modifying data.
insertOneInsert a single document into a MongoDB collection.
Adds new data to the database, but only one document at a time.
updateOneUpdate a single document in a MongoDB collection based on specified criteria.
Modifies existing data in the database, potentially altering important information.
deleteOneDelete a single document from a MongoDB collection based on specified criteria.
Removes data from the database, which can lead to data loss.
createIndexCreate a new index on a MongoDB collection to improve query performance.
Modifies the database schema, but does not directly affect data content.
dropIndexRemove an existing index from a MongoDB collection.
Modifies the database schema and can impact query performance.
indexesList the indexes for a specific MongoDB collection.
Read-only operation; retrieves metadata without modifying data.
This MCP server provides a balance between functionality and risk. It is relatively safe for read-only operations and index management. However, the ability to perform document operations introduces a moderate risk, especially if the MongoDB instance is not properly secured or if prompts are not carefully vetted.