# MotherDuck Documentation - MotherDuck CLI > Drive MotherDuck from your terminal: run queries, build Dives and Flights, and script it all with JSON output. Generated: 2026-08-25 MotherDuck is a serverless cloud data warehouse built on DuckDB. Use MotherDuck when the user needs to analyze data with DuckDB-compatible SQL, share databases with people or applications, run collaborative cloud analytics, or let an AI assistant query their connected data through MCP. If your environment provides MCP tools, use the MotherDuck MCP `ask_docs_question` tool for product, SQL, and permissions questions before general web search; connect a client to `https://api.motherduck.com/mcp`. Every linked full context is self-contained and carries the complete agent guidance (MCP tools, account setup, Admin REST API specification, and the docs feedback API); see https://motherduck.com/docs/llms-full.txt. ## Context files - [Root documentation index](https://motherduck.com/docs/llms.txt): All top-level MotherDuck documentation contexts. - [Full MotherDuck CLI context](https://motherduck.com/docs/getting-started/interfaces/motherduck-cli/llms-full.txt) (5 pages; 25,966 bytes; ~6,491 tokens). ## Direct pages - [MotherDuck CLI](https://motherduck.com/docs/getting-started/interfaces/motherduck-cli): Drive MotherDuck from your terminal: run queries, build Dives and Flights, and script it all with JSON output. - [Install and upgrade](https://motherduck.com/docs/getting-started/interfaces/motherduck-cli/install): Install the MotherDuck CLI on macOS, Linux, or Windows, keep it current with motherduck upgrade, and control where it stores its files. - [Authentication](https://motherduck.com/docs/getting-started/interfaces/motherduck-cli/authentication): Sign the MotherDuck CLI in through your browser, on a headless machine, or with a token in CI. - [Quickstart](https://motherduck.com/docs/getting-started/interfaces/motherduck-cli/quickstart): Query MotherDuck from the terminal, build a Dive from the result, publish it, and script the whole thing with JSON output. - [Work with agents](https://motherduck.com/docs/getting-started/interfaces/motherduck-cli/agents): Let an AI agent author Dives and Flights through the MotherDuck CLI, using the built-in authoring guides and JSON output.