5. MongoDB MCP Server
The MongoDB MCP Server lets your Agent connect to a MongoDB database and perform read and write operations.
This MCP is useful for:
Querying MongoDB databases
Storing and retrieving data during conversations
Managing structured data in document format
Configuration parameters
connection_string
Yes
MongoDB connection URI. Format: mongodb://user:password@host:port/database or mongodb+srv://....
database_name
No
Name of the database to use. If not set, use the one included in the connection string.
Custom parameters
timeout: maximum time to complete an operation (ms)
maxPoolSize: maximum number of simultaneous connections in the pool
minPoolSize: minimum number of always-active connections
retryWrites: automatically retry failed writes
readPreference: which node to read data from (primary/secondary/nearest)
maxIdleTimeMS: maximum idle time before closing a connection (ms)
serverSelectionTimeoutMS: maximum time to find an available server (ms)
How to get the parameters
After registering, create a cluster (choose the M0 Free plan)
Click "Connect" on your cluster
Choose "Connect your application"
Select Driver: Node.js or Python
Copy the Connection String:
Replace
<password>with your database user's passwordDatabase Name: choose one (e.g.,
test_db,aisuru)
Last updated