Connection-string based. Multi-account = multi-database (Atlas clusters, dev/prod, per-client).
#MongoDB
Connection-string based. Multi-account = multi-database (Atlas clusters, dev/prod, per-client).
#Get a token
Generate a Connection string (mongodb+srv://…) at https://cloud.mongodb.com/v2/projects/.
#Recommended scopes
- Use a read-only role per agent context unless writes are explicitly required.
#Add it to the vault
bashmcpvault add mongodb
Example session:
text$ mcpvault add mongodb Label: acme-prod Connection string: mongodb+srv://•••• ✓ Parsed connection (host: cluster.mongodb.net, db: main) ✓ Saved.
#Tools exposed
see upstream — find, aggregate, list databases, list collections
#Switch to this account
In any chat client wired to mcpvault, ask:
Switch to my <label> MongoDB account.
The vault server's activate_account tool flips the active label. Wrappers re-read it on the next call — no restart.