Skip to content
Documentation: open the docs menu

Mammoth for coding agents

Mammoth Analytics is a data platform: workspaces contain projects, projects contain datasets, and datasets carry one or more views, each a pipeline of transformation steps. The mammoth CLI is the agent interface—it describes itself at runtime, emits a stable JSON envelope, and declares how dangerous every operation is before it runs.

Install

curl -fsSL https://raw.githubusercontent.com/EdgeMetric/mammothsdk/main/mammoth-cli/installers/mammoth-install.sh | sh
mammoth skill list      # confirm the skill landed

The installer needs no Python tool manager of its own, checks that the CLI starts, and installs the bundled agent skill, which teaches your coding agent the CLI's authentication, discovery, input, and confirmation conventions.

Already using pipx or pip? Install the package, then add the skill yourself:

pipx install mammoth-cli    # or: pip install --no-cache-dir --upgrade mammoth-cli
mammoth skill install
mammoth --version           # check you got the newest release

--no-cache-dir matters right after a release: a cached package index can still hand out the previous version. Once installed, mammoth upgrade moves to the latest release, and an envelope carrying meta.update_available names the command to run. Auto-update installs only in an interactive terminal; set MAMMOTH_AUTO_UPGRADE=1 to force it in CI or an agent run.

mammoth skill install copies the skill into every agent it knows about at once. The default target is user scope for Claude Code, Codex and Cursor; see the agent skill for project-scoped installs and per-agent targeting.

Alternatively, if your tooling speaks the community skills convention:

npx skills add https://mammoth.io/docs

Authenticate

The CLI does not read credentials from environment variables or arguments; it takes the token only from its hidden prompt or an --input file. The credential is an API token (mm_..., from Workspace settings → API Tokens in the web app); the token names its own workspace. A person at their own terminal can sign in through the browser (mammoth auth login --method oauth) or with a device code (--method device) instead; see API authentication. It is stored once via mammoth auth login in the OS keyring (or an explicitly chosen 0600 file on headless POSIX systems), then reused by profile.

The bundled skill is explicit that an agent must never ask a person for the token in chat, and must never run mammoth auth login itself unless it has been handed a protected credentials file to use:

If no profile has credentials, tell the operator to run mammoth auth login in their own terminal (add --profile NAME only for a profile other than default; …) and wait; never ask for the token in chat, never read one from a file or environment variable, never run auth login yourself.

For CI or another fully unattended run, the human operator (not the agent) provisions an owner-only (0600) credentials file out of band, created with those permissions from the start rather than chmod-ed afterwards:

mammoth auth login --input creds.json --storage file --output json --no-input
mammoth doctor --output json --no-input

doctor is the precondition check: auth, endpoint, connectivity and version. Treat a doctor failure as a reason to stop, not a reason to try the next command anyway.

A prompt to give your agent

Follow https://mammoth.io/docs/agents/. Set up Mammoth in this project.
Tell me the command to run to sign in, and wait. Show me what changed.

Your agent will land on this page, read the Authenticate section above, and follow the CLI's real mechanism: mammoth auth login, run by you, not by it.

Discover the contract

mammoth schema find "merge two datasets" --output json --no-input   # find the command for a goal; the top matches carry their input fields and an example
mammoth schema list --output json --no-input        # every command, by family
mammoth schema get <command.id> --output json --no-input   # one command in full: input, mutation_class, confirmation
mammoth capability list --output json --no-input   # the Python SDK method and API operation behind each command

A write adds a verify verdict and a fresh state read-back to its result; read them before you report the change as done.

Every result is one JSON envelope on stdout:

{"schema_version": 1, "data": <result>, "meta": {"command": "…"}}

and every failure is one JSON envelope on stderr, with a stable error.code to branch on—never the message text:

{"schema_version": 1, "error": {"code": "…", "message": "…", "hint": "…", "retryable": false, "recovery_commands": ["…"]}}

Full envelope shape, the exit-code table and rate limits live on errors and exit codes, which owns them.

Where things are

  • /build/—the API, CLI and SDK reference, and the generated capability contract
  • /build/cli/—the CLI's command families, one at a time
  • Agent skill—what mammoth skill install puts on disk, and how to target it
  • Use Mammoth with Claude—Claude Code with the CLI, and the docs MCP server in Claude on the web, Claude Desktop, and Claude Code
  • Mammoth MCP server—the hosted server at https://mcp.mammoth.io/mcp for MCP clients that act on a workspace
  • Agents and CI—non-interactive operation: signing in without a terminal, structured input, job handling
  • Blast radius and safety—the mutation classes and confirmation policies every command declares
  • /llms.txt—the machine-readable index of this documentation

Docs for machines

Every page on this site has a machine-readable twin: append .md to a doc's URL, or send Accept: text/markdown on the request, to get the same content as plain Markdown instead of the rendered page. /llms.txt is the flat index of the whole site for a model to read before it fetches anything else; /llms-full.txt is the same index with every page's content concatenated inline, for a client that would rather read once than crawl. /.well-known/skills/index.json lists the skills this site publishes in the community skills discovery format, which is what npx skills add above reads.

Separately, a documentation-search MCP server runs at https://mammoth.io/docs/mcp/: three tools—search_docs, get_doc and list_docs—over streamable-HTTP, with no authentication required, so you can look up Mammoth documentation without a Mammoth account. It answers questions about Mammoth; it does not act on a Mammoth workspace. To act on a workspace, use the CLI above, or the Mammoth MCP server at https://mcp.mammoth.io/mcp. Use Mammoth with Claude has the setup for Claude on the web, Claude Desktop, and Claude Code.

Report an issue · support@mammoth.io