MongoDB
Your MongoDB, within reach of the agent
Ask — and act on — your MongoDB in plain language
Official MongoDB server: query your databases and manage Atlas without a shell.
MongoDB is the document database behind countless apps — data stored as flexible JSON-like documents instead of rows and tables. The official connector, published by MongoDB, is "a Model Context Protocol server for interacting with MongoDB Databases and MongoDB Atlas." It's the bridge between what you ask and your data: it translates your requests into the queries and Atlas API calls needed to explore collections, run aggregations, and inspect your clusters.
Ask "list every database on this connection and how many documents each collection holds" and it reads your instance and answers. Say "show me the schema of the orders collection" and it describes the fields for you — no shell, no hand-written queries. It talks to MongoDB with your connection string, so it can reach whatever that connection is allowed to reach.
What you can ask
- "List all the databases on this connection, and the collections inside the 'shop' database."
- "Describe the schema of the 'orders' collection, then find the 10 most recent orders."
- "Run an aggregation on 'sales' that groups revenue by month for this year."
- "List my Atlas clusters and inspect the metadata of the production one."
What token you need
You need a MongoDB connection string — the single line that tells software how to reach your database, including its host and credentials. It looks like mongodb+srv://username:password@cluster.mongodb.net/myDatabase (or mongodb://localhost:27017/myDatabase for a local instance).
- In MongoDB Atlas, open your cluster and click Connect, then choose a connection method to reveal the string; the connection string reference explains the format.
- Copy the full string — it already embeds the database username and password.
- Paste it when the Lab asks for
MONGODB_CONNECTION_STRING. It's stored encrypted in your Keychain.
The connection string contains database credentials, so treat it like a password. A word of caution, straight from MongoDB: the connection string "might contain credentials which can be visible in process lists" — MongoDB "strongly recommend[s] using environment variables to pass sensitive configuration," which is exactly how this manifest injects it. This connector ships with --readOnly on by default, which — in MongoDB's words — "only allows read, connect, and metadata operation types, disabling create/update/delete operations." Leave it on unless you deliberately need to write, and grant the connection only the minimum permissions it needs.
We open the app and set it up in Claude Code (and your other Macs).
How it works with Terminal Sync
Set up the connector once on one machine. Terminal Sync keeps your claude_desktop_config.json encrypted in your Drive, so on any other machine where you open Claude Code, the connector is already there.