list_databasesLABSCO SUMMARY
drop_database is in the tool list, so scope the connection's credentials rather than trusting the conversation.
Most database servers stop at reading and writing documents. This one can remove a database, which is useful for the setup-and-teardown work around testing and catastrophic anywhere near production. The protection that actually works is the MongoDB user you connect with: give it rights over the databases it should touch and nothing else. A confirmation prompt is a speed bump; a permission is a wall.
What it is
A MongoDB server that goes past reading data into managing the databases themselves.
What you get
- list_databases and get_database_stats
- create_database and drop_database
- The collection and document operations underneath them
Requirements
Python 3.10 or above, a running MongoDB, and uv recommended for launching. MIT licensed. Documentation in English and Chinese.
Setup effort
One command — uvx mongo-mcp
USE CASES
Working with the data
Query and update documents from the conversation.
Setting up a test database
Create it, use it, drop it.
Checking size and health
Database statistics without a shell.
30 tools
Listed in project docs. Your client may show a different list.
create_databasedrop_databaseget_database_statslist_collectionscreate_collectiondrop_collectionrename_collectionget_collection_statsinsert_documentinsert_many_documentsfind_documentsfind_one_documentcount_documentsupdate_documentreplace_documentdelete_documentlist_indexescreate_indexcreate_text_indexcreate_compound_indexdrop_indexreindex_collectionaggregate_documentsdistinct_valuesget_server_statusget_replica_set_statusping_databasetest_mongodb_connectionget_connection_detailsBEFORE YOU INSTALL
What to know first
Tools you get
30 tools named in the project's documentation.
Requires
- uvx on PATH
- Python 3.10 or later
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
uvx mongo-mcpMCP Clients
Cursor
{
"mcpServers": {
"mongo-mcp": {
"command": "uvx",
"args": [
"mongo-mcp"
],
"env": {
"MONGODB_URI": "mongodb://localhost:27017",
"MONGODB_DEFAULT_DB": "<YOUR_MONGODB_DEFAULT_DB>",
"LOG_LEVEL": "INFO"
}
}
}
}