Cargo auth docs
The Cargo auth docs explain how to obtain the one credential that unlocks the REST API, the CLI, the CDK, the agent skills, and MCP.
There is one credential. Sign in once; nothing else needs configuring.
npm install -g @cargo-ai/cli
cargo-ai login --email you@company.com
A new account starts with 100 free credits and needs no card. --email mails a one-time code and creates the account and a workspace on first use.
Methods
| You are | Use | Browser |
|---|---|---|
| An agent, a sandbox, CI, any shell | cargo-ai login --email you@company.com | no |
| A person at a workstation | cargo-ai login --oauth | yes |
| CI with a token already issued | cargo-ai login --token <token> or CARGO_API_TOKEN | no |
In an agent or sandbox shell with no terminal to prompt at, the first --email call sends the code and exits. Re-run it with --code.
Calling the API
curl https://api.getcargo.io/v1/storage/models/list \
-H "Authorization: Bearer $CARGO_API_TOKEN"
OAuth
Authorization-server metadata (RFC 8414) is at https://auth.getcargo.io/.well-known/oauth-authorization-server. Device code, authorization code with PKCE (S256), registration, and revocation are advertised there.
The product MCP server at https://mcp.getcargo.io challenges with OAuth and publishes protected-resource metadata. See Cargo MCP server.
Machine-readable walkthrough
The step-by-step agent walkthrough — Discover, Pick a method, Register, Claim, Use, Revocation — is https://www.getcargo.ai/auth.md. Fetch that file when you need the WorkOS auth.md shape rather than this summary.
Related
- Cargo API docs
- Cargo OpenAPI spec
- Versioning and deprecation: https://docs.getcargo.ai/api-reference/versioning
Give your agents a runtime
Bring the agents you have.Start free, deploy in one command.