mongosh

officialcautiondatabasebrew

MongoDB · MongoDB, database inspection, and queries from the terminal.

$ brew install mongosh
One-liner to try
$ mongosh --version

Agent pack

Copy into an agent

A markdown-ready setup brief with install, verify, safe starting commands, and guardrails for AI agents.

Open .mdJSON
Readiness
Usable with guardrails · 50/100
Verify
mongosh --version
Agent URL
/cli/mongosh/agent.md

Quick reference

Install
brew install mongosh
Verify
mongosh --version
First command
mongosh --version
Machine JSON
/cli/mongosh.json

About

The official CLI from MongoDB. MongoDB, database inspection, and queries from the terminal.

Example workflow

1. mongosh --version

Alternatives worth considering