Set up the MongoDB MCP server
The MongoDB MCP server lets AI agents query databases, inspect schemas, and manage collections and indexes. This guide covers getting your Atlas connection string, installing the server from the MintMCP MCP store, and adding MintMCP's egress IP to your Atlas access list.
Prerequisites
- A MintMCP admin account
- A MongoDB Atlas account at cloud.mongodb.com
Get your MongoDB connection string
The MCP server connects to your Atlas cluster using a connection string.
- In your Atlas project, click Database, then click Connect on the cluster.
- Select Drivers.
- Copy the connection string. Replace
<username>and<password>with credentials for a database user.
To create a dedicated database user, go to Database Access → Add New Database User, set a username and password, and assign a role such as Read Any Database (or a more restrictive custom role).
Add MongoDB to MintMCP
- In MintMCP, go to MCP store > Manage store.
- Find MongoDB under Recommended servers and click to install it.
- In the setup dialog, enter your Connection String (
MDB_MCP_CONNECTION_STRING): your Atlas connection string. - Click Save.
Add MintMCP's egress IP to Atlas
MintMCP runs the MongoDB MCP server on managed infrastructure. Atlas requires the server's IP to be on your access lists before it can connect.
Get the Dedicated Egress IP:
- In MintMCP, open the MongoDB server's settings page.
- Click the Hosted Connector tab.
- Copy the Dedicated Egress IP address shown there.
Add to Atlas cluster network access:
- Go to your Atlas project at cloud.mongodb.com.
- In the left sidebar under Security, click Network Access.
- Click Add IP Address.
- Paste the Dedicated Egress IP and click Confirm.
For more details, see MongoDB MCP Server prerequisites.
Security considerations
- Database user credentials in the connection string should belong to a dedicated user, not a personal account.
- MintMCP's Dedicated Egress IP is stable — add it once and it does not change.
Next steps
- Tool customization — Control which MongoDB tools are exposed to users
- MCP gateway administration — Manage access and permissions