Prerequisites
- A TrueFoundry account with permission to add MCP servers.
- A MongoDB Atlas project and cluster.
Create a Connection String
In Atlas, open Database > Connect > Drivers and copy the connection string. Create a dedicated database user under Database Access and grant the minimum role, such as read-only access for exploration workflows.Run and Register the MCP Server
Deploy the MongoDB MCP server on TrueFoundry or your own infrastructure with the connection string configured asMDB_MCP_CONNECTION_STRING. Then add the resulting MCP URL in MCP Gateway as a remote MCP server.
If you run a hosted stdio version, configure MDB_MCP_CONNECTION_STRING as an environment variable and keep credentials in a secret store.