The MongoDB MCP server lets agents query databases, inspect schemas, and manage collections or indexes. Use a dedicated Atlas database user and allow network access from the environment that runs the MCP server.Documentation Index
Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt
Use this file to discover all available pages before exploring further.
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.