> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mcpjam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Command Reference

> Complete flag reference for every mcpjam CLI command

Complete flag tables for every `mcpjam` command. For guides and recipes, see the individual command pages.

## Global flags

| Flag                | Default                           | Description                                               |
| ------------------- | --------------------------------- | --------------------------------------------------------- |
| `--timeout <ms>`    | `30000`                           | Request timeout in milliseconds                           |
| `--rpc`             | off                               | Include raw JSON-RPC logs in JSON output under `_rpcLogs` |
| `--quiet`           | off                               | Suppress non-result progress output on stderr             |
| `--no-telemetry`    | off                               | Disable anonymous telemetry for this invocation           |
| `--format <format>` | `human` on TTY, `json` when piped | Raw output format (`json` or `human`)                     |
| `-v, --version`     |                                   | Print the CLI version                                     |

***

## `server` commands

All server commands accept the shared connection flags below, plus command-specific options.

### Shared connection flags

| Flag                           | Description                                                                                                            |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| `--transport <transport>`      | Explicit transport type (`http` or `stdio`)                                                                            |
| `--url <url>`                  | HTTP MCP server URL                                                                                                    |
| `--access-token <token>`       | Bearer access token                                                                                                    |
| `--oauth-access-token <token>` | OAuth bearer access token                                                                                              |
| `--refresh-token <token>`      | OAuth refresh token                                                                                                    |
| `--client-id <id>`             | OAuth client ID (with `--refresh-token`)                                                                               |
| `--client-secret <secret>`     | OAuth client secret (with `--refresh-token`)                                                                           |
| `--credentials-file <path>`    | Load OAuth credentials from a file created by `oauth login --credentials-out` or `oauth conformance --credentials-out` |
| `--header <header>`            | HTTP header `Key: Value` (repeatable)                                                                                  |
| `--client-capabilities <json>` | Client capabilities as inline JSON, `@path`, or `-` for stdin                                                          |
| `--command <command>`          | Stdio server command                                                                                                   |
| `--args <arg...>`              | Preferred stdio command arguments                                                                                      |
| `--command-args <arg>`         | Legacy stdio command argument (repeatable)                                                                             |
| `-e, --env <env...>`           | Stdio environment `KEY=VALUE` values                                                                                   |
| `--cwd <path>`                 | Working directory for the stdio child process                                                                          |

Transport selection is inferred from `--url` vs `--command` when
`--transport` is omitted. Use `--transport http|stdio` when you want an
explicit validation step.

For stdio targets, child processes inherit the parent shell environment by
default. `-e/--env` adds or overrides child env values, and structured debug
artifacts only record the explicit env keys you passed on the command line.

`--credentials-file` cannot be combined with individual token flags
(`--access-token`, `--oauth-access-token`, `--refresh-token`, `--client-id`,
`--client-secret`). The CLI rejects conflicting auth sources upfront.

### `server probe`

No additional flags beyond shared connection flags.

### `server doctor`

| Flag           | Description                              |
| -------------- | ---------------------------------------- |
| `--out <path>` | Write the doctor JSON artifact to a file |

### `server info`

No additional flags.

### `server validate`

No additional flags.

### `server ping`

No additional flags.

### `server capabilities`

No additional flags.

### `server export`

No additional flags.

***

## `tools` commands

### `tools list`

Uses shared connection flags, plus:

| Flag                 | Description                                                                                                                                                                                                                                    |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--host <id>`        | Connect as this host (e.g. `claude`, `chatgpt`, `cursor`) — sends its `clientInfo`, `clientCapabilities`, and protocol version in `initialize`, and hides app-only tools its model can't see. Mutually exclusive with `--client-capabilities`. |
| `--cursor <cursor>`  | Pagination cursor                                                                                                                                                                                                                              |
| `--model-id <model>` | Model ID used for token counting                                                                                                                                                                                                               |

When `--host` is set, the output includes a `host` field and a `toolsDroppedVisibility` count. Hosts that opt out of visibility filtering (e.g. `cursor`) keep all tools.

### `tools call`

| Flag                    | Description                                                                                                                                                                                                     |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--host <id>`           | Connect as this host — sends its identity/capabilities/protocol in `initialize`, and rejects app-only tools the host's model can't call. Mutually exclusive with `--client-capabilities`.                       |
| `--tool-name <name>`    | Name of the tool to call                                                                                                                                                                                        |
| `--name <name>`         | Legacy alias for `--tool-name`                                                                                                                                                                                  |
| `--interactive`         | Drive the `input_required` multi-round-trip loop: render embedded elicitations to the terminal and collect responses from stdin. Cannot be combined with `--tool-args -`, `--tool-args-stdin`, or `--params -`. |
| `--yes`                 | With `--interactive`, decline every embedded input request without prompting (non-interactive mode).                                                                                                            |
| `--tool-args <json>`    | Tool arguments as inline JSON, `@path`, or `-` for stdin                                                                                                                                                        |
| `--params <json>`       | Legacy alias for `--tool-args`                                                                                                                                                                                  |
| `--tool-args-stdin`     | Read tool arguments JSON from stdin                                                                                                                                                                             |
| `--validate-response`   | Validate the MCP tool-call envelope returned by the server                                                                                                                                                      |
| `--expect-success`      | Fail when the tool result reports `isError`                                                                                                                                                                     |
| `--reporter <reporter>` | `json-summary` or `junit-xml` validation report output                                                                                                                                                          |
| `--debug-out <path>`    | Write debug artifact to file                                                                                                                                                                                    |
| `--ui`                  | Attach to Inspector and render the completed tool result in App Builder; opens a browser by default in a TTY                                                                                                    |
| `--require-render`      | Treat skipped Inspector renders as errors (requires `--ui`)                                                                                                                                                     |
| `--open`                | Open Inspector in the system browser before rendering (default with `--ui` in a TTY)                                                                                                                            |
| `--no-open`             | Start/use Inspector without opening a system browser                                                                                                                                                            |
| `--attach-only`         | Require an already-running Inspector browser client; do not start or open Inspector                                                                                                                             |
| `--inspector-url <url>` | Local Inspector backend/API base URL                                                                                                                                                                            |
| `--frontend-url <url>`  | Inspector frontend/browser base URL; skips frontend discovery                                                                                                                                                   |
| `--server-name <name>`  | Server name to use inside Inspector                                                                                                                                                                             |
| `--protocol <protocol>` | Render protocol: `mcp-apps` or `openai-sdk`                                                                                                                                                                     |
| `--device <device>`     | Render device: `mobile`, `tablet`, `desktop`, or `custom`                                                                                                                                                       |
| `--theme <theme>`       | Render theme: `light` or `dark`                                                                                                                                                                                 |
| `--locale <locale>`     | Render locale                                                                                                                                                                                                   |
| `--time-zone <iana>`    | Render IANA timezone                                                                                                                                                                                            |

Plus shared connection flags.

Without `--ui`, `tools call` returns the raw tool result. With `--ui`, it opens Inspector by default in a TTY and returns a compact envelope with `result`, `inspectorBrowserUrl`, and `inspectorRender` status. `inspectorRender.status` is `rendered` when Inspector accepted the render, `skipped` when the tool succeeded but Inspector had no active browser client, an unsatisfied render precondition, or a render timeout, and `error` for non-recoverable render command failures. `inspectorRender.remediation` is always present and is one of `open_browser`, `retry`, `reconnect_server`, or `none`. Skipped renders are emitted as a stable root `warning` plus `inspectorRender.warning`, both with the shape `{ code, message, remediation, browserUrl?, hasActiveClient?, inspectorStarted? }`. Stable skipped-render codes are `no_active_client`, `timeout`, `disconnected_server`, and `unsupported_in_mode`. Skipped renders keep the tool-call exit code unless `--require-render` is set; tool failures, validation failures, non-skippable render command errors, and `--require-render` skipped renders all exit nonzero. `--attach-only` is an exception to the skipped-render rule for `no_active_client`: by default a missing browser client yields `inspectorRender.status = "skipped"` with `inspectorRender.remediation = "open_browser"`, but when `--attach-only` is set, `no_active_client` is treated as non-skippable, surfaces as a root `error` (not a downgraded `warning`), and exits nonzero like other non-skippable render failures. `--inspector-url` points to the Inspector backend/API; pass `--frontend-url` when you already know the browser/client URL and want to skip health-advertised frontend checks and local dev port discovery. Use `--no-open` when browser automation already opened `inspectorBrowserUrl`; use `--attach-only` when startup, browser opening, and discovery should all be disallowed. Default non-TTY `--ui` runs do not open a browser unless `--open` is passed. When `--open` is in effect (default in TTYs, opt-in elsewhere), the App Builder URL and the initial browser-client wait progress are emitted to stderr unless `--quiet` is set, regardless of whether stderr is a TTY; only the elapsed-seconds heartbeat is gated on stderr being a TTY. The Inspector path injects the completed tool result through `renderToolResult`; it does not call the tool a second time. Fresh tabs do not hydrate the injected render state; use the active Inspector client that received the render. Use `--debug-out` for the full render envelope including params and command responses. `--ui` cannot be combined with `--reporter`.

### Reading `tools call --ui` output as an agent

Treat the tool result and the Inspector render as separate outcomes. An exit code of `0` means the tool call succeeded and no hard render error occurred; it does not, by itself, prove the UI rendered. Confirm UI delivery with `inspectorRender.status === "rendered"`. If `inspectorRender.status === "skipped"`, branch on `inspectorRender.remediation` or the stable root `warning.code`. If `--require-render` is set, the same skipped-render issue moves from root `warning` to root `error` and the command exits with code `1`.

```json theme={"theme":"css-variables"}
{
  "success": true,
  "command": "tools call",
  "inspectorUi": true,
  "inspectorBrowserUrl": "http://127.0.0.1:6274/#app-builder",
  "result": {
    "content": [{ "type": "text", "text": "view created" }]
  },
  "inspectorRender": {
    "status": "skipped",
    "remediation": "open_browser",
    "mode": "active-client",
    "urlHydratesRender": false,
    "browserUrl": "http://127.0.0.1:6274/#app-builder",
    "hasActiveClient": false,
    "inspectorStarted": false,
    "warning": {
      "code": "no_active_client",
      "message": "Inspector has no active browser client. Open the Inspector App Builder URL in your browser, then rerun `tools call --ui`; or pass `--open` to let the CLI open a system browser.",
      "remediation": "open_browser",
      "browserUrl": "http://127.0.0.1:6274/#app-builder",
      "hasActiveClient": false,
      "inspectorStarted": false
    }
  },
  "warning": {
    "code": "no_active_client",
    "message": "Inspector has no active browser client. Open the Inspector App Builder URL in your browser, then rerun `tools call --ui`; or pass `--open` to let the CLI open a system browser.",
    "remediation": "open_browser",
    "browserUrl": "http://127.0.0.1:6274/#app-builder",
    "hasActiveClient": false,
    "inspectorStarted": false
  }
}
```

***

## `resources` commands

### `resources list`

Uses shared connection flags, plus:

| Flag                | Description                                                                                                                       |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `--host <id>`       | Connect as this host — sends its identity/capabilities/protocol in `initialize`. Mutually exclusive with `--client-capabilities`. |
| `--cursor <cursor>` | Pagination cursor                                                                                                                 |

### `resources read`

| Flag                   | Description                                                                                                                       |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `--host <id>`          | Connect as this host — sends its identity/capabilities/protocol in `initialize`. Mutually exclusive with `--client-capabilities`. |
| `--resource-uri <uri>` | URI of the resource to read                                                                                                       |
| `--uri <uri>`          | Legacy alias for `--resource-uri`                                                                                                 |
| `--interactive`        | Drive the `input_required` multi-round-trip loop: render embedded elicitations to the terminal and collect responses from stdin.  |
| `--yes`                | With `--interactive`, decline every embedded input request without prompting (non-interactive mode).                              |

Plus shared connection flags.

### `resources templates`

Uses shared connection flags, plus:

| Flag                | Description                                                                                                                       |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `--host <id>`       | Connect as this host — sends its identity/capabilities/protocol in `initialize`. Mutually exclusive with `--client-capabilities`. |
| `--cursor <cursor>` | Pagination cursor                                                                                                                 |

***

## `prompts` commands

### `prompts list`

Uses shared connection flags, plus:

| Flag                | Description                                                                                                                       |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `--host <id>`       | Connect as this host — sends its identity/capabilities/protocol in `initialize`. Mutually exclusive with `--client-capabilities`. |
| `--cursor <cursor>` | Pagination cursor                                                                                                                 |

### `prompts get`

| Flag                   | Description                                                                                                                                                                 |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--host <id>`          | Connect as this host — sends its identity/capabilities/protocol in `initialize`. Mutually exclusive with `--client-capabilities`.                                           |
| `--prompt-name <name>` | Name of the prompt                                                                                                                                                          |
| `--name <name>`        | Legacy alias for `--prompt-name`                                                                                                                                            |
| `--interactive`        | Drive the `input_required` multi-round-trip loop: render embedded elicitations to the terminal and collect responses from stdin. Cannot be combined with `--prompt-args -`. |
| `--yes`                | With `--interactive`, decline every embedded input request without prompting (non-interactive mode).                                                                        |
| `--prompt-args <json>` | Prompt arguments as inline JSON, `@path`, or `-` for stdin                                                                                                                  |

Plus shared connection flags.

***

## `xaa` commands

### `xaa run`

Run the Cross-App Access (ID-JAG) debugger: self-issue an ID-JAG, redeem it at the target authorization server (RFC 7523), and call the MCP server with the resulting access token. See the [XAA Debugger guide](/cli/xaa) for the trust setup, registration strategies, and CI usage.

| Flag                                    | Required | Default                  | Description                                                                                                                                                                                      |
| --------------------------------------- | -------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--url <url>`                           | Yes      |                          | Target MCP server URL (the protected resource)                                                                                                                                                   |
| `--issuer-base-url <url>`               | Yes      |                          | Origin the local mock IdP issues from. It must publish the CLI's local signing key — typically a running [local inspector](/cli/xaa#before-you-run-make-the-issuer-reachable), not your real IdP |
| `--sub <subject>`                       | Yes      |                          | Simulated end-user subject identifier                                                                                                                                                            |
| `--client-id <id>`                      | No       |                          | OAuth client ID. Required for `preregistered`; rejected for `dcr`/`cimd`                                                                                                                         |
| `--registration <method>`               | No       | `preregistered`          | `preregistered`, `dcr`, or `cimd`                                                                                                                                                                |
| `--client-metadata-url <url>`           | No       |                          | CIMD only: the Client ID Metadata Document URL to present as the `client_id`                                                                                                                     |
| `--client-auth <method>`                | No       | `none`                   | CIMD only: `none` (public) or `private-key-jwt` (confidential — generates a local EC P-256 key, publishes it via the hosted reflector, and signs a `client_assertion`)                           |
| `--cimd-metadata-origin <url>`          | No       | `https://app.mcpjam.com` | Confidential CIMD only: bare origin hosting the metadata-document reflector. An `http://` loopback origin is a dev-only opt-in; rejected when `--https-only` is set                              |
| `--authz-server-issuer <issuer>`        | No       |                          | Target AS issuer. When set, protected-resource metadata discovery is skipped                                                                                                                     |
| `--token-endpoint <url>`                | No       |                          | AS token endpoint. When set, AS-metadata discovery is skipped. Not valid with `dcr` or `cimd`                                                                                                    |
| `--email <email>`                       | No       |                          | Simulated end-user email claim                                                                                                                                                                   |
| `--client-secret <secret>`              | No       |                          | OAuth client secret presented at redemption                                                                                                                                                      |
| `--token-endpoint-auth-method <method>` | No       |                          | `client_secret_basic`, `client_secret_post`, or `none`. Not valid with `dcr` or `cimd`                                                                                                           |
| `--assertion-format <format>`           | No       | `oidc`                   | Identity assertion format: `oidc` (ID token) or `saml` (SAML 2.0 assertion)                                                                                                                      |
| `--scopes <scopes>`                     | No       |                          | Space-separated scope string                                                                                                                                                                     |
| `--https-only`                          | No       |                          | Reject non-HTTPS / private targets                                                                                                                                                               |

#### Registration strategies

| Strategy        | Description                                                                             |
| --------------- | --------------------------------------------------------------------------------------- |
| `preregistered` | Supply a pre-registered `--client-id` (and optional `--client-secret`)                  |
| `dcr`           | Dynamic Client Registration (RFC 7591) — the CLI registers a client at the RAS each run |
| `cimd`          | Client ID Metadata Document — the client publishes its identity at a URL                |

#### Confidential CIMD (`--client-auth private-key-jwt`)

When `--registration cimd --client-auth private-key-jwt` is used, the CLI loads or generates a local EC P-256 key pair (stored in `~/.mcpjam`). The public key is encoded into a reflector URL on `app.mcpjam.com`, which becomes the `client_id`. The CLI signs a `client_assertion` with the private key at token-redemption time; the private key never leaves the machine.

```bash theme={"theme":"css-variables"}
mcpjam inspector start   # serves the issuer at http://localhost:6274/api/mcp/xaa

mcpjam xaa run \
  --url http://localhost:8080/mcp \
  --issuer-base-url http://localhost:6274/api/mcp \
  --sub user@example.com \
  --registration cimd \
  --client-auth private-key-jwt
```

For a cloud authorization server, expose the inspector origin through a tunnel and pass the public origin as `--issuer-base-url` — see [making the issuer reachable](/cli/xaa#before-you-run-make-the-issuer-reachable).

**Key rotation:** the key is the identity. Deleting `~/.mcpjam/xaa-client-private.pem` or changing the `XAA_CLIENT_PRIVATE_KEY` environment variable generates a new `client_id`; any RAS-side allowlisting must be updated after rotation.

***

## `oauth` commands

### `oauth login`

| Flag                          | Required | Default        | Description                                                              |
| ----------------------------- | -------- | -------------- | ------------------------------------------------------------------------ |
| `--url <url>`                 | Yes      |                | MCP server URL                                                           |
| `--protocol-version <v>`      | Yes      |                | `2025-03-26`, `2025-06-18`, or `2025-11-25`                              |
| `--registration <s>`          | Yes      |                | `cimd`, `dcr`, or `preregistered`                                        |
| `--auth-mode <m>`             | No       | `interactive`  | `headless`, `interactive`, or `client_credentials`                       |
| `--client-id <id>`            | No       |                | OAuth client ID                                                          |
| `--client-secret <s>`         | No       |                | OAuth client secret                                                      |
| `--client-metadata-url <url>` | No       |                | CIMD metadata document URL                                               |
| `--redirect-url <url>`        | No       | Auto-generated | OAuth redirect URL                                                       |
| `--scopes <scopes>`           | No       |                | Space-separated scope string                                             |
| `--header <header>`           | No       |                | HTTP header `Key: Value` (repeatable)                                    |
| `--step-timeout <ms>`         | No       | `30000`        | Per-step timeout                                                         |
| `--verify-tools`              | No       |                | After login, list tools                                                  |
| `--verify-call-tool <name>`   | No       |                | Also call the named tool                                                 |
| `--credentials-out <path>`    | No       |                | Write OAuth credentials to file (mode 0600); stdout has secrets redacted |
| `--debug-out <path>`          | No       |                | Write debug artifact to file                                             |

### `oauth conformance`

| Flag                          | Required | Default        | Description                                                                                          |
| ----------------------------- | -------- | -------------- | ---------------------------------------------------------------------------------------------------- |
| `--url <url>`                 | Yes      |                | MCP server URL                                                                                       |
| `--protocol-version <v>`      | Yes      |                | `2025-03-26`, `2025-06-18`, or `2025-11-25`                                                          |
| `--registration <s>`          | Yes      |                | `cimd`, `dcr`, or `preregistered`                                                                    |
| `--auth-mode <m>`             | No       | `interactive`  | `headless`, `interactive`, or `client_credentials`                                                   |
| `--client-id <id>`            | No       |                | OAuth client ID                                                                                      |
| `--client-secret <s>`         | No       |                | OAuth client secret                                                                                  |
| `--client-metadata-url <url>` | No       |                | CIMD metadata document URL                                                                           |
| `--redirect-url <url>`        | No       | Auto-generated | OAuth redirect URL                                                                                   |
| `--scopes <scopes>`           | No       |                | Space-separated scope string                                                                         |
| `--header <header>`           | No       |                | HTTP header `Key: Value` (repeatable)                                                                |
| `--step-timeout <ms>`         | No       | `30000`        | Per-step timeout                                                                                     |
| `--verify-tools`              | No       |                | After OAuth, list tools                                                                              |
| `--verify-call-tool <name>`   | No       |                | Also call the named tool                                                                             |
| `--conformance-checks`        | No       |                | Run additional negative OAuth checks, including DCR redirect URI policy and redirect-mismatch probes |
| `--credentials-out <path>`    | No       |                | Write OAuth credentials to file (mode 0600); stdout has secrets redacted                             |
| `--print-url`                 | No       |                | Print consent URL to stderr (interactive only)                                                       |
| `--reporter <reporter>`       | No       |                | `json-summary` or `junit-xml` CI report output                                                       |

### `oauth conformance-suite`

| Flag                        | Required | Default | Description                                                                              |
| --------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------- |
| `--config <path>`           | Yes      |         | Path to JSON config file                                                                 |
| `--verify-tools`            | No       |         | Enable tool listing on all flows                                                         |
| `--verify-call-tool <name>` | No       |         | Call the named tool after listing                                                        |
| `--credentials-out <path>`  | No       |         | Write OAuth credentials from the first flow that returns credentials to file (mode 0600) |
| `--reporter <reporter>`     | No       |         | `json-summary` or `junit-xml` CI report output                                           |

### `oauth metadata`

| Flag          | Required | Description                 |
| ------------- | -------- | --------------------------- |
| `--url <url>` | Yes      | OAuth metadata URL to fetch |

### `oauth proxy` / `oauth debug-proxy`

| Flag                | Required | Default | Description                                                 |
| ------------------- | -------- | ------- | ----------------------------------------------------------- |
| `--url <url>`       | Yes      |         | OAuth request URL                                           |
| `--method <method>` | No       | `GET`   | HTTP method                                                 |
| `--header <header>` | No       |         | HTTP header `Key: Value` (repeatable)                       |
| `--body <value>`    | No       |         | Request body as JSON, raw string, `@path`, or `-` for stdin |

***

## `protocol` commands

### `protocol conformance`

| Flag                        | Required | Default | Description                                                                                                            |
| --------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------- |
| `--url <url>`               | Yes      |         | MCP server URL                                                                                                         |
| `--access-token <token>`    | No       |         | Bearer access token                                                                                                    |
| `--credentials-file <path>` | No       |         | Load OAuth credentials from a file created by `oauth login --credentials-out` or `oauth conformance --credentials-out` |
| `--header <header>`         | No       |         | HTTP header `Key: Value` (repeatable)                                                                                  |
| `--check-timeout <ms>`      | No       | `15000` | Per-check timeout in milliseconds                                                                                      |
| `--category <category>`     | No       | all     | Restrict checks to one or more categories                                                                              |
| `--check-id <id>`           | No       | all     | Restrict checks to one or more check IDs                                                                               |
| `--reporter <reporter>`     | No       |         | `json-summary` or `junit-xml` CI report output                                                                         |

Use `--format json|human` for raw output and `--reporter json-summary|junit-xml` for CI reports.

### `protocol conformance-suite`

| Flag                    | Required | Default | Description                                    |
| ----------------------- | -------- | ------- | ---------------------------------------------- |
| `--config <path>`       | Yes      |         | Path to JSON config file                       |
| `--reporter <reporter>` | No       |         | `json-summary` or `junit-xml` CI report output |

***

## `apps` commands

### Shared connection flags

| Flag                           | Description                                                                                                            |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| `--transport <transport>`      | Explicit transport type (`http` or `stdio`)                                                                            |
| `--url <url>`                  | HTTP MCP server URL                                                                                                    |
| `--access-token <token>`       | Bearer access token                                                                                                    |
| `--oauth-access-token <token>` | OAuth bearer access token                                                                                              |
| `--refresh-token <token>`      | OAuth refresh token                                                                                                    |
| `--client-id <id>`             | OAuth client ID (with `--refresh-token`)                                                                               |
| `--client-secret <secret>`     | OAuth client secret (with `--refresh-token`)                                                                           |
| `--credentials-file <path>`    | Load OAuth credentials from a file created by `oauth login --credentials-out` or `oauth conformance --credentials-out` |
| `--header <header>`            | HTTP header `Key: Value` (repeatable)                                                                                  |
| `--client-capabilities <json>` | Client capabilities as inline JSON, `@path`, or `-` for stdin                                                          |
| `--command <command>`          | Stdio server command                                                                                                   |
| `--args <arg...>`              | Preferred stdio command arguments                                                                                      |
| `--command-args <arg>`         | Legacy stdio command argument (repeatable)                                                                             |
| `-e, --env <env...>`           | Stdio environment `KEY=VALUE` values                                                                                   |
| `--cwd <path>`                 | Working directory for the stdio child process                                                                          |

Apps commands share the same transport inference rules as the rest of the CLI:
`--url` implies HTTP, `--command` implies stdio, and `--transport` is an
optional explicit override.

### `apps conformance`

MCP Apps server-side conformance checks. Uses shared connection flags plus:

| Flag                    | Description                                              |
| ----------------------- | -------------------------------------------------------- |
| `--category <category>` | Check category to run (`tools`, `resources`). Repeatable |
| `--check-id <id>`       | Specific check id to run. Repeatable                     |
| `--reporter <reporter>` | `json-summary` or `junit-xml` CI report output           |

Use `--format json|human` for raw output and `--reporter json-summary|junit-xml` for CI reports.

### `apps conformance-suite`

| Flag                    | Required | Default | Description                                    |
| ----------------------- | -------- | ------- | ---------------------------------------------- |
| `--config <path>`       | Yes      |         | Path to JSON config file                       |
| `--reporter <reporter>` | No       |         | `json-summary` or `junit-xml` CI report output |

***

## `compat` command

Check whether an MCP server's tools and widgets work on each AI host. Uses shared server connection flags (see [`server` commands](#server-commands)) plus:

| Flag          | Description                                                                                                                                    |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `--host <id>` | Only report this host ID. Repeat for several. Default: all. Valid IDs: `claude`, `chatgpt`, `cursor`, `copilot`, `codex`, `goose`, and others. |

```bash theme={"theme":"css-variables"}
mcpjam compat --url https://your-server.com/mcp
mcpjam compat --url https://your-server.com/mcp --host claude --host chatgpt
```

The result includes a per-host `verdict` (`works`, `degraded`, `blocked`, or `unknown`), a `findings` list explaining each verdict, and a top-level `summary` count. When the tool list is truncated (more than 50 pages), verdicts that would otherwise be `works` are downgraded to `unknown`.

***

## `hosts` commands

Manage the hosts saved in your hosted MCPJam projects. All `hosts` commands require an `sk_` API key (via `--api-key` or the `MCPJAM_API_KEY` environment variable) or a prior `mcpjam login`.

### Shared platform flags

| Flag              | Description                                                       |
| ----------------- | ----------------------------------------------------------------- |
| `--api-key <key>` | MCPJam `sk_` API key (overrides `MCPJAM_API_KEY`)                 |
| `--api-url <url>` | MCPJam API base URL (defaults to `https://app.mcpjam.com/api/v1`) |

### `hosts templates`

List the built-in host templates usable with `hosts create --template`. No additional flags.

### `hosts list`

| Flag                     | Description                                                        |
| ------------------------ | ------------------------------------------------------------------ |
| `--project <id-or-name>` | Project name or ID (defaults to the most recently updated project) |

### `hosts get`

| Flag                     | Required | Description        |
| ------------------------ | -------- | ------------------ |
| `--host <id-or-name>`    | Yes      | Host name or ID    |
| `--project <id-or-name>` | No       | Project name or ID |

### `hosts create`

| Flag                     | Required | Description                                                                      |
| ------------------------ | -------- | -------------------------------------------------------------------------------- |
| `--name <name>`          | Yes      | Display name for the new host                                                    |
| `--project <id-or-name>` | No       | Project name or ID                                                               |
| `--template <id>`        | No       | Built-in template ID (see `hosts templates`), e.g. `claude`, `chatgpt`, `cursor` |
| `--theme <theme>`        | No       | Theme for the seeded config: `light` or `dark` (template only)                   |
| `--file <path>`          | No       | Host config v2 JSON file (or `-` for stdin)                                      |
| `--json <json>`          | No       | Inline host config v2 JSON (or `@file`, or `-`)                                  |

Provide either `--template` or `--file`/`--json`, not both.

### `hosts update`

| Flag                     | Required | Description                                                 |
| ------------------------ | -------- | ----------------------------------------------------------- |
| `--host <id-or-name>`    | Yes      | Host name or ID                                             |
| `--project <id-or-name>` | No       | Project name or ID                                          |
| `--name <name>`          | No       | New display name                                            |
| `--file <path>`          | No       | Replacement host config v2 JSON (or `-` for stdin)          |
| `--json <json>`          | No       | Inline replacement host config v2 JSON (or `@file`, or `-`) |

### `hosts delete`

| Flag                     | Required | Description        |
| ------------------------ | -------- | ------------------ |
| `--host <id-or-name>`    | Yes      | Host name or ID    |
| `--project <id-or-name>` | No       | Project name or ID |

***

## `environments` commands

Manage **project environments** in your hosted MCPJam projects. A project environment is a named, live-editable execution bundle — one host, optionally a standalone server group, optionally a pinned skill selection and pinned plugin versions — that eval suites and journeys run against.

<Note>
  A project environment is not a Computer sandbox image (those are `mcpjam images`), and not the STDIO environment variables you pass with `--env`.
</Note>

All `environments` commands require an `sk_` API key (via `--api-key` or the `MCPJAM_API_KEY` environment variable) or a prior `mcpjam login`. Reading requires project membership; **creating, updating, archiving, and restoring require project admin** — a key bound to a non-admin gets a `FORBIDDEN` error on those.

### Shared platform flags

| Flag              | Description                                                       |
| ----------------- | ----------------------------------------------------------------- |
| `--api-key <key>` | MCPJam `sk_` API key (overrides `MCPJAM_API_KEY`)                 |
| `--api-url <url>` | MCPJam API base URL (defaults to `https://app.mcpjam.com/api/v1`) |

### The revision workflow

Environments use optimistic concurrency. Every write takes `--expected-revision`, the `revision` you last read:

```bash theme={"theme":"css-variables"}
mcpjam environments get --environment Staging          # note the "revision" field
mcpjam environments update --environment Staging --expected-revision 3 --name Prod
```

If someone else changed the environment in between, the write fails with a `CONFLICT` error (HTTP 409) instead of overwriting their edit — re-read it and retry. `CONFLICT` also covers a duplicate name and archive-state errors (archiving something already archived, editing something archived), so read the message.

### `environments list`

| Flag                     | Description                                                        |
| ------------------------ | ------------------------------------------------------------------ |
| `--project <id-or-name>` | Project name or ID (defaults to the most recently updated project) |
| `--include-archived`     | Include archived environments (needed to find one to restore)      |

### `environments get`

| Flag                         | Required | Description            |
| ---------------------------- | -------- | ---------------------- |
| `--environment <id-or-name>` | Yes      | Environment name or ID |
| `--project <id-or-name>`     | No       | Project name or ID     |

### `environments resolve`

Preview what the environment resolves to right now: the host's current config, the closed server set, and the pinned plugin versions. Fails with `CONFLICT` when the environment can't currently produce a runnable configuration (for example a pinned plugin was disabled); `details.code` carries the specific reason.

| Flag                         | Required | Description            |
| ---------------------------- | -------- | ---------------------- |
| `--environment <id-or-name>` | Yes      | Environment name or ID |
| `--project <id-or-name>`     | No       | Project name or ID     |

### `environments create`

| Flag                     | Required | Description                                                        |
| ------------------------ | -------- | ------------------------------------------------------------------ |
| `--name <name>`          | Yes\*    | Display name; must be unique among the project's live environments |
| `--host-id <id>`         | Yes\*    | ID of the host this environment runs against                       |
| `--project <id-or-name>` | No       | Project name or ID                                                 |
| `--description <text>`   | No       | Optional description                                               |
| `--file <path>`          | No       | Environment JSON file (or `-` for stdin)                           |
| `--json <json>`          | No       | Inline environment JSON (or `@file`, or `-`)                       |

\* `--name` and `--host-id` may instead be supplied inside `--file`/`--json`; explicit flags override the same key in the JSON body. Use the JSON body for the structured fields that have no flag — `serverAttachmentId`, `skillSelection`, and `pluginVersionIds`:

```bash theme={"theme":"css-variables"}
mcpjam environments create --project Acme --json '{
  "name": "Staging",
  "hostId": "h_123",
  "skillSelection": { "mode": "explicit", "skillIds": ["sk_1"] }
}'
```

### `environments update`

| Flag                         | Required | Description                                                   |
| ---------------------------- | -------- | ------------------------------------------------------------- |
| `--environment <id-or-name>` | Yes      | Environment name or ID                                        |
| `--expected-revision <n>`    | Yes      | The revision you last read (from `environments get`)          |
| `--project <id-or-name>`     | No       | Project name or ID                                            |
| `--name <name>`              | No       | New display name                                              |
| `--host-id <id>`             | No       | New host                                                      |
| `--description <text>`       | No       | New description (empty string clears it)                      |
| `--file <path>`              | No       | Environment JSON with the fields to change (or `-` for stdin) |
| `--json <json>`              | No       | Inline environment JSON (or `@file`, or `-`)                  |

Only the fields you pass change. To **clear** `serverAttachmentId`, `skillSelection`, or `pluginVersionIds`, send an explicit `null` in the JSON body — an empty array is rejected, it is not a way to clear:

```bash theme={"theme":"css-variables"}
mcpjam environments update --environment Staging --expected-revision 3 \
  --json '{ "pluginVersionIds": null }'
```

### `environments archive`

Archiving is reversible and frees the name for a new environment; the row is kept.

| Flag                         | Required | Description                |
| ---------------------------- | -------- | -------------------------- |
| `--environment <id-or-name>` | Yes      | Environment name or ID     |
| `--expected-revision <n>`    | Yes      | The revision you last read |
| `--project <id-or-name>`     | No       | Project name or ID         |

### `environments restore`

Fails with `CONFLICT` if another live environment took the name while this one was archived. Plugin pins whose version no longer exists at all are dropped on restore — compare the returned `pluginVersionIds` against what you archived.

| Flag                         | Required | Description                                                             |
| ---------------------------- | -------- | ----------------------------------------------------------------------- |
| `--environment <id-or-name>` | Yes      | Environment name or ID                                                  |
| `--expected-revision <n>`    | Yes      | The revision you last read (use `environments list --include-archived`) |
| `--project <id-or-name>`     | No       | Project name or ID                                                      |

### What can be pinned

Both pin fields are narrower than they look:

* **`skillSelection`** accepts project-shared skills only. Personal skills, skills with supporting files or extra frontmatter, and plugin-component skills are all rejected.
* **`pluginVersionIds`** accepts a plugin version only when its plugin is installed and enabled, the version is `ready`, at most one version per plugin is pinned, and none of the version's skills carry supporting files.

***

## `images` commands

Manage custom Computer sandbox images in your hosted MCPJam projects. An image is defined by a **blueprint** — YAML with a digest-pinned `base` image, `initialize` steps baked into the image at build time, and `maintenance` / `knowledge` text delivered to the agent at runtime (never executed automatically):

```yaml theme={"theme":"css-variables"}
base: debian:bookworm-slim@sha256:<64-hex-digest>
initialize:
  - name: Install tooling
    run: apt-get update && apt-get install -y git jq
maintenance:
  - name: Refresh deps
    run: cd ~/app && npm install
knowledge:
  - name: Test notes
    contents: Run `make test` before pushing.
```

All `images` commands require an `sk_` API key (via `--api-key` or the `MCPJAM_API_KEY` environment variable) or a prior `mcpjam login`.

### Shared platform flags

| Flag              | Description                                                       |
| ----------------- | ----------------------------------------------------------------- |
| `--api-key <key>` | MCPJam `sk_` API key (overrides `MCPJAM_API_KEY`)                 |
| `--api-url <url>` | MCPJam API base URL (defaults to `https://app.mcpjam.com/api/v1`) |

### `images list`

| Flag                     | Description                                                        |
| ------------------------ | ------------------------------------------------------------------ |
| `--project <id-or-name>` | Project name or ID (defaults to the most recently updated project) |

### `images get`

| Flag                     | Required | Description              |
| ------------------------ | -------- | ------------------------ |
| `--image <id-or-name>`   | Yes      | Sandbox image name or ID |
| `--project <id-or-name>` | No       | Project name or ID       |

### `images validate`

Lint a blueprint without saving it. Prints `ok` plus the resolved base digest, or structured errors with the YAML path of each violation.

| Flag                     | Required | Description                                    |
| ------------------------ | -------- | ---------------------------------------------- |
| `--file <path>`          | Yes      | Blueprint YAML path, or `-` to read from stdin |
| `--project <id-or-name>` | No       | Project name or ID                             |

### `images create`

| Flag                     | Required | Description                                    |
| ------------------------ | -------- | ---------------------------------------------- |
| `--name <name>`          | Yes      | Display name for the new sandbox image         |
| `--file <path>`          | Yes      | Blueprint YAML path, or `-` to read from stdin |
| `--project <id-or-name>` | No       | Project name or ID                             |

### `images edit`

| Flag                     | Required | Description                                        |
| ------------------------ | -------- | -------------------------------------------------- |
| `--image <id-or-name>`   | Yes      | Sandbox image name or ID                           |
| `--project <id-or-name>` | No       | Project name or ID                                 |
| `--name <name>`          | No       | New display name                                   |
| `--file <path>`          | No       | Replacement blueprint YAML path (or `-` for stdin) |

### `images build`

Trigger an image build for the sandbox image (async). Poll `images logs` to check build status.

| Flag                     | Required | Description              |
| ------------------------ | -------- | ------------------------ |
| `--image <id-or-name>`   | Yes      | Sandbox image name or ID |
| `--project <id-or-name>` | No       | Project name or ID       |

### `images logs`

Show a sandbox image's builds (newest first) with their log preview.

| Flag                     | Required | Description              |
| ------------------------ | -------- | ------------------------ |
| `--image <id-or-name>`   | Yes      | Sandbox image name or ID |
| `--project <id-or-name>` | No       | Project name or ID       |

### `images use`

Boot your computer from this sandbox image. This rebuilds the computer — installed files are wiped.

| Flag                     | Required | Description              |
| ------------------------ | -------- | ------------------------ |
| `--image <id-or-name>`   | Yes      | Sandbox image name or ID |
| `--project <id-or-name>` | No       | Project name or ID       |

### `images reset`

Reset your computer to its current image, wiping mutable state.

| Flag                     | Required | Description        |
| ------------------------ | -------- | ------------------ |
| `--project <id-or-name>` | No       | Project name or ID |

### `images promote`

Share a personal-draft sandbox image with the whole project. Requires project admin permissions.

| Flag                     | Required | Description              |
| ------------------------ | -------- | ------------------------ |
| `--image <id-or-name>`   | Yes      | Sandbox image name or ID |
| `--project <id-or-name>` | No       | Project name or ID       |

### `images delete`

Permanently delete a sandbox image from a project.

| Flag                     | Required | Description              |
| ------------------------ | -------- | ------------------------ |
| `--image <id-or-name>`   | Yes      | Sandbox image name or ID |
| `--project <id-or-name>` | No       | Project name or ID       |

***

## `inspector` commands

### `inspector open`

Start or attach to the local Inspector and open the UI.

| Flag                    | Required | Description                      |
| ----------------------- | -------- | -------------------------------- |
| `--inspector-url <url>` | No       | Local Inspector base URL         |
| `--tab <tab>`           | No       | Open Inspector on a specific tab |

### `inspector start`

Start the local Inspector in the background without opening a browser.

| Flag                    | Required | Description              |
| ----------------------- | -------- | ------------------------ |
| `--inspector-url <url>` | No       | Local Inspector base URL |

### `inspector stop`

Stop the local Inspector if it is running.

| Flag                    | Required | Description              |
| ----------------------- | -------- | ------------------------ |
| `--inspector-url <url>` | No       | Local Inspector base URL |

***

## `eval` commands

Author and run eval suites in your hosted MCPJam projects. All `eval` subcommands require an MCPJam API key (`--api-key` or `MCPJAM_API_KEY`).

### Shared platform flags

| Flag              | Description                                                       |
| ----------------- | ----------------------------------------------------------------- |
| `--api-key <key>` | MCPJam `sk_` API key (overrides `MCPJAM_API_KEY`)                 |
| `--api-url <url>` | MCPJam API base URL (defaults to `https://app.mcpjam.com/api/v1`) |

### `eval create`

Create a runnable eval suite from authored test cases. The suite is persisted and returned with a `suiteId`; it is **not** run. Execute it afterward with `eval run`.

| Flag                     | Description                                                                            |
| ------------------------ | -------------------------------------------------------------------------------------- |
| `--project <id-or-name>` | Project name or ID (defaults to the most recently updated project)                     |
| `--file <path>`          | Path to a suite definition JSON file (or `-` for stdin)                                |
| `--json <json>`          | Inline suite definition JSON (or `@file`, or `-` for stdin)                            |
| `--name <name>`          | Suite name (overrides the file)                                                        |
| `--model <model>`        | Suite-level default model, e.g. `anthropic/claude-haiku-4.5` (overrides the file)      |
| `--provider <provider>`  | Suite-level default provider (overrides the file; needed for bare or custom model ids) |
| `--server <name...>`     | Project HTTP server names or IDs (overrides the file; repeatable)                      |

Provide the suite definition via `--file` or `--json` (not both). The definition is a JSON object with at minimum `name`, `model`, `servers`, and `cases`. Servers must be HTTP; stdio servers are rejected before any write.

```bash theme={"theme":"css-variables"}
mcpjam eval create \
  --json '{"name":"smoke","model":"anthropic/claude-haiku-4.5","servers":["My Server"],"cases":[{"title":"echo works","query":"Use the echo tool to say hi","expectedToolCalls":["echo"]}]}' \
  --api-key $MCPJAM_API_KEY
```

### `eval list`

List the eval suites saved in a project.

| Flag                     | Description                                                        |
| ------------------------ | ------------------------------------------------------------------ |
| `--project <id-or-name>` | Project name or ID (defaults to the most recently updated project) |

### `eval run`

Start an asynchronous eval run of an existing suite. Responds immediately with a `runId`; poll status with `eval status`.

| Flag                         | Required | Description                                                                 |
| ---------------------------- | -------- | --------------------------------------------------------------------------- |
| `--suite <id-or-name>`       | Yes      | Eval suite name or ID                                                       |
| `--project <id-or-name>`     | No       | Project name or ID (defaults to the most recently updated project)          |
| `--server <id-or-name...>`   | No       | Override the suite's saved server selection (HTTP servers only; repeatable) |
| `--environment <id-or-name>` | No       | Project environment to run against (see below)                              |

### `eval status`

Get the status and summary of an eval run.

| Flag                     | Required | Description                   |
| ------------------------ | -------- | ----------------------------- |
| `--run <id>`             | Yes      | Eval run ID (from `eval run`) |
| `--project <id-or-name>` | Yes      | Project name or ID            |

***

## `tunnel`

Expose a local MCP server through an MCPJam relay tunnel and register it as a server in your hosted project, so evals and chatboxes can target it. Requires an `sk_` API key or a prior `mcpjam login`. The tunnel stays up until Ctrl-C; the server record outlives the session (calls fail fast at the edge until you re-run, which revives the same URL slug with a fresh secret).

```bash theme={"theme":"css-variables"}
# HTTP target
mcpjam tunnel http://localhost:9090/mcp --id my-server --project acme

# stdio target (command goes after --)
mcpjam tunnel --id everything --project acme -- npx -y @modelcontextprotocol/server-everything
```

| Flag                     | Required | Description                                                                                                                                                          |
| ------------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--id <name>`            | Yes      | Server name to register in the project. An existing server with this name is pointed at the tunnel: its URL is overwritten, and stdio records are converted to HTTP. |
| `--project <id-or-name>` | No       | Project name or ID (defaults to the most recently updated project)                                                                                                   |
| `--api-key <key>`        | No       | MCPJam `sk_` API key (overrides `MCPJAM_API_KEY`)                                                                                                                    |
| `--api-url <url>`        | No       | MCPJam API base URL (defaults to `https://app.mcpjam.com/api/v1`)                                                                                                    |
| `-e, --env <env...>`     | No       | Stdio environment assignment in `KEY=VALUE` format (stdio targets only)                                                                                              |
| `--cwd <path>`           | No       | Working directory for the stdio MCP server process (stdio targets only)                                                                                              |

With `--format json`, a single machine-readable startup object (public URL, server ID, slug, project) is written to stdout; ongoing status goes to stderr in both formats.

<Warning>
  The public tunnel URL embeds a bearer secret and is stored on the project
  server record so the platform can call it. Every re-run rotates the secret
  and disconnects any previous tunnel session for the same server.
</Warning>

***

## `eval` commands

All `eval` commands accept the shared platform flags below.

### Shared platform flags

| Flag              | Description                                                       |
| ----------------- | ----------------------------------------------------------------- |
| `--api-key <key>` | MCPJam `sk_` API key (overrides `MCPJAM_API_KEY`)                 |
| `--api-url <url>` | MCPJam API base URL (defaults to `https://app.mcpjam.com/api/v1`) |

### `eval create`

Create a runnable eval suite from authored test cases (does not run it).

| Flag                     | Required | Description                                                        |
| ------------------------ | -------- | ------------------------------------------------------------------ |
| `--project <id-or-name>` | No       | Project name or ID (defaults to the most recently updated project) |
| `--file <path>`          | No       | Path to a suite definition JSON file (or `-` for stdin)            |
| `--json <json>`          | No       | Inline suite definition JSON (or `@file`, or `-` for stdin)        |
| `--name <name>`          | No       | Suite name (overrides the file)                                    |
| `--model <model>`        | No       | Suite-level default model (overrides the file)                     |
| `--provider <provider>`  | No       | Suite-level default provider (overrides the file)                  |
| `--server <name...>`     | No       | Project HTTP server names or IDs (overrides the file)              |

### `eval list`

List the eval suites saved in a project.

| Flag                     | Required | Description                                                        |
| ------------------------ | -------- | ------------------------------------------------------------------ |
| `--project <id-or-name>` | No       | Project name or ID (defaults to the most recently updated project) |

### `eval run`

Start an eval run of an existing suite (asynchronous).

| Flag                         | Required | Description                                                        |
| ---------------------------- | -------- | ------------------------------------------------------------------ |
| `--suite <id-or-name>`       | Yes      | Eval suite name or ID                                              |
| `--project <id-or-name>`     | No       | Project name or ID (defaults to the most recently updated project) |
| `--server <id-or-name...>`   | No       | Override the suite's saved server selection (HTTP servers only)    |
| `--environment <id-or-name>` | No       | Project environment to run against (see below)                     |

If the suite has **attached project environments** (`eval environments set`), the run
executes against one of them — its resolved host config, closed server set, and pinned
plugin versions — instead of the suite's saved server selection:

* exactly one attached → that one is used, and `eval status` reports it;
* several attached → `--environment` is required, and the error names the candidates;
* `--environment` and `--server` are mutually exclusive: an environment supplies a closed
  server set that an override cannot change.

Every run records the environment and the exact revision it used, so `eval status` can
answer "which configuration did this run actually execute against?" long after the
environment has been edited.

### `eval status`

Get the status and summary of an eval run.

| Flag                     | Required | Description                   |
| ------------------------ | -------- | ----------------------------- |
| `--run <id>`             | Yes      | Eval run ID (from `eval run`) |
| `--project <id-or-name>` | Yes      | Project name or ID            |

### `eval iterations`

List per-iteration results for an eval run (pass/fail, tool calls, tokens, latency). Results are paginated.

| Flag                     | Required | Description                                |
| ------------------------ | -------- | ------------------------------------------ |
| `--run <id>`             | Yes      | Eval run ID (from `eval run`)              |
| `--project <id-or-name>` | Yes      | Project the run belongs to (name or ID)    |
| `--cursor <cursor>`      | No       | Pagination cursor from a previous response |
| `--limit <n>`            | No       | Max iterations per page (1–200)            |

### `eval trace`

Fetch the full trace for one eval iteration (complete message history and spans). Can be large.

| Flag                     | Required | Description                             |
| ------------------------ | -------- | --------------------------------------- |
| `--run <id>`             | Yes      | Eval run ID (from `eval run`)           |
| `--iteration <id>`       | Yes      | Iteration ID (from `eval iterations`)   |
| `--project <id-or-name>` | Yes      | Project the run belongs to (name or ID) |

### `eval get`

Show an eval suite's full settings.

| Flag                     | Required | Description                                                        |
| ------------------------ | -------- | ------------------------------------------------------------------ |
| `--suite <id-or-name>`   | Yes      | Eval suite name or ID                                              |
| `--project <id-or-name>` | No       | Project name or ID (defaults to the most recently updated project) |

### `eval update`

Edit an eval suite's settings (only the flags you pass change).

| Flag                                       | Required | Description                                                        |
| ------------------------------------------ | -------- | ------------------------------------------------------------------ |
| `--suite <id-or-name>`                     | Yes      | Eval suite name or ID                                              |
| `--project <id-or-name>`                   | No       | Project name or ID (defaults to the most recently updated project) |
| `--file <path>`                            | No       | Suite-update JSON body (or `-` for stdin)                          |
| `--json <json>`                            | No       | Inline suite-update JSON (or `@file`, or `-`)                      |
| `--name <name>`                            | No       | Rename the suite                                                   |
| `--description <text>`                     | No       | Suite description                                                  |
| `--server <name...>`                       | No       | Replace the suite's server selection (project server names)        |
| `--host <name...>`                         | No       | Replace host attachments (by name/ID)                              |
| `--model <id>`                             | No       | Execution model ID                                                 |
| `--system-prompt <text>`                   | No       | Execution system prompt                                            |
| `--temperature <n>`                        | No       | Execution temperature                                              |
| `--min-accuracy <pct>`                     | No       | Minimum accuracy, 0–100                                            |
| `--tool-call-order <any\|in-order\|exact>` | No       | Tool call order                                                    |
| `--arguments <ignore\|partial\|exact>`     | No       | Argument matching                                                  |
| `--extra-tool-calls <unlimited\|N>`        | No       | Allowed extra tool calls                                           |
| `--judge <on\|off>`                        | No       | Enable/disable LLM-as-judge grading                                |
| `--judge-model <id>`                       | No       | Judge model ID                                                     |

### `eval delete`

Permanently delete an eval suite (and its cases and runs).

| Flag                     | Required | Description                                                        |
| ------------------------ | -------- | ------------------------------------------------------------------ |
| `--suite <id-or-name>`   | Yes      | Eval suite name or ID                                              |
| `--project <id-or-name>` | No       | Project name or ID (defaults to the most recently updated project) |

### `eval schedule`

Enable or disable scheduled runs for a suite.

| Flag                         | Required | Description                                                          |
| ---------------------------- | -------- | -------------------------------------------------------------------- |
| `--suite <id-or-name>`       | Yes      | Eval suite name or ID                                                |
| `--project <id-or-name>`     | No       | Project name or ID (defaults to the most recently updated project)   |
| `--enable`                   | No       | Enable scheduled runs                                                |
| `--disable`                  | No       | Disable scheduled runs                                               |
| `--interval <minutes>`       | No       | Run interval in minutes (5–10080)                                    |
| `--environment <id-or-name>` | No       | Project environment the scheduled runs launch (only with `--enable`) |

Pass either `--enable` or `--disable` (not both).

A scheduled run launches exactly one run, so a suite with several attached environments
must pin one with `--environment`; a suite with exactly one defaults to it. `--environment`
is rejected with `--disable`: disabling preserves the existing pin, so accepting one there
would silently do nothing.

### `eval environments` subcommands

Attach or detach the project environments an eval suite runs against. Attaching is what
makes `eval run --environment` available for the suite.

#### `eval environments set`

Replace the suite's attached environments (this sets the whole list, in order).

| Flag                            | Required | Description                                                        |
| ------------------------------- | -------- | ------------------------------------------------------------------ |
| `--suite <id-or-name>`          | Yes      | Eval suite name or ID                                              |
| `--environment <id-or-name...>` | Yes      | Project environments to attach, in order                           |
| `--project <id-or-name>`        | No       | Project name or ID (defaults to the most recently updated project) |

```bash theme={"theme":"css-variables"}
mcpjam eval environments set --suite "Checkout smoke" --environment Staging Prod
```

Rejected if it would strand an enabled schedule pinned to an environment being removed —
repoint the schedule (`eval schedule --enable --environment ...`) or disable it first.

#### `eval environments clear`

Detach every environment, reverting the suite to its saved server selection.

| Flag                     | Required | Description                                                        |
| ------------------------ | -------- | ------------------------------------------------------------------ |
| `--suite <id-or-name>`   | Yes      | Eval suite name or ID                                              |
| `--project <id-or-name>` | No       | Project name or ID (defaults to the most recently updated project) |

Subject to the same schedule guard as `set`: rejected if the suite has an
enabled schedule pinned to one of the environments being removed. Repoint the
schedule or disable it first.

### `eval cases` subcommands

#### `eval cases list`

List a suite's test cases.

| Flag                     | Required | Description                                                        |
| ------------------------ | -------- | ------------------------------------------------------------------ |
| `--suite <id-or-name>`   | Yes      | Eval suite name or ID                                              |
| `--project <id-or-name>` | No       | Project name or ID (defaults to the most recently updated project) |

#### `eval cases get`

Show one test case.

| Flag                     | Required | Description                                                        |
| ------------------------ | -------- | ------------------------------------------------------------------ |
| `--suite <id-or-name>`   | Yes      | Eval suite name or ID                                              |
| `--case <id-or-title>`   | Yes      | Eval case title or ID                                              |
| `--project <id-or-name>` | No       | Project name or ID (defaults to the most recently updated project) |

#### `eval cases run`

Run a single case as a persisted, fully-queryable run — inspect it with `eval iterations` /
`eval steps` like any other run.

| Flag                         | Required | Description                                                        |
| ---------------------------- | -------- | ------------------------------------------------------------------ |
| `--suite <id-or-name>`       | Yes      | Eval suite name or ID                                              |
| `--case <id-or-title>`       | Yes      | Eval case title or ID                                              |
| `--project <id-or-name>`     | No       | Project name or ID (defaults to the most recently updated project) |
| `--server <id-or-name...>`   | No       | Override the suite's saved servers for this run                    |
| `--environment <id-or-name>` | No       | Project environment to run against (must be attached to the suite) |

Environment selection works exactly as it does for [`eval run`](#eval-run).

#### `eval cases create`

Add a test case to a suite (definition via `--file`/`--json`).

| Flag                     | Required | Description                                                        |
| ------------------------ | -------- | ------------------------------------------------------------------ |
| `--suite <id-or-name>`   | Yes      | Eval suite name or ID                                              |
| `--project <id-or-name>` | No       | Project name or ID (defaults to the most recently updated project) |
| `--file <path>`          | No       | Case JSON body (or `-` for stdin)                                  |
| `--json <json>`          | No       | Inline case JSON (or `@file`, or `-`)                              |
| `--title <title>`        | No       | Case title (overrides the body)                                    |

#### `eval cases update`

Edit a test case (definition via `--file`/`--json`).

| Flag                     | Required | Description                                                        |
| ------------------------ | -------- | ------------------------------------------------------------------ |
| `--suite <id-or-name>`   | Yes      | Eval suite name or ID                                              |
| `--case <id-or-title>`   | Yes      | Eval case title or ID                                              |
| `--project <id-or-name>` | No       | Project name or ID (defaults to the most recently updated project) |
| `--file <path>`          | No       | Case JSON body (or `-` for stdin)                                  |
| `--json <json>`          | No       | Inline case JSON (or `@file`, or `-`)                              |
| `--title <title>`        | No       | Rename the case                                                    |

#### `eval cases delete`

Permanently delete a test case.

| Flag                     | Required | Description                                                        |
| ------------------------ | -------- | ------------------------------------------------------------------ |
| `--suite <id-or-name>`   | Yes      | Eval suite name or ID                                              |
| `--case <id-or-title>`   | Yes      | Eval case title or ID                                              |
| `--project <id-or-name>` | No       | Project name or ID (defaults to the most recently updated project) |

#### `eval cases generate`

AI-generate test cases from the suite's tools (spends credits).

| Flag                         | Required | Description                                                        |
| ---------------------------- | -------- | ------------------------------------------------------------------ |
| `--suite <id-or-name>`       | Yes      | Eval suite name or ID                                              |
| `--project <id-or-name>`     | No       | Project name or ID (defaults to the most recently updated project) |
| `--mode <normal\|negative>`  | No       | Generation mode (default `normal`)                                 |
| `--server <id-or-name...>`   | No       | Servers to discover tools from (default: suite's)                  |
| `--environment <id-or-name>` | No       | Discover tools from this attached environment's server set         |
| `--case-model <id...>`       | No       | Execution model(s) for the generated cases                         |
| `--simple <n>`               | No       | How many easy, single-tool cases                                   |
| `--multi-tool <n>`           | No       | How many medium, 2+ tool cases                                     |
| `--multi-turn <n>`           | No       | How many multi-turn follow-up cases                                |
| `--complex <n>`              | No       | How many hard / cross-server cases                                 |
| `--negative <n>`             | No       | How many negative (no-tool) cases                                  |
| `--vary-user-styles`         | No       | Vary query phrasing across a realistic range of user styles        |

***

## `mcp` command

### `mcp`

Run MCPJam as an MCP server over stdio so MCP clients (Claude Desktop, Claude Code, Cursor, ...) can connect to, exercise, and debug other MCP servers. See [MCPJam as an MCP server](/cli/mcp-server) for the exposed tools and client setup.

```bash theme={"theme":"css-variables"}
npx -y @mcpjam/cli@latest mcp
```

The command takes no flags of its own. The global `--timeout <ms>` flag sets the default per-request timeout against target servers, and `--quiet` suppresses the startup notice on stderr. Stdout carries only JSON-RPC; never pipe other output into it.

***

## `telemetry` commands

Telemetry commands inspect and configure anonymous CLI telemetry. They never emit telemetry events themselves.

### `telemetry status`

Shows the effective telemetry state, install ID state, state file path, debug mode, and disable reason when disabled. This command does not create an install ID.

### `telemetry disable`

Persistently disables anonymous CLI telemetry by writing `enabled: false` to the telemetry state file. If no install ID exists yet, this command does not create one.

### `telemetry enable`

Persistently enables anonymous CLI telemetry. If no install ID exists yet, this command creates a random install UUID.

***

## `login` / `logout` / `whoami` commands

These commands manage your MCPJam platform session. `login` opens a browser for OAuth and stores the session locally; `logout` removes it; `whoami` shows the account behind the current credentials.

### `login`

| Flag              | Default                         | Description                                                                                                                                                                                                                                           |
| ----------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--api-url <url>` | `https://app.mcpjam.com/api/v1` | MCPJam API base URL. The value is persisted with the session so subsequent cloud commands target the same deployment without needing `--api-url` again. Must be a valid `http(s)` URL — an invalid value exits with code `2` before any network call. |
| `--no-browser`    |                                 | Print the login URL to stderr instead of opening a browser.                                                                                                                                                                                           |

The `MCPJAM_API_URL` environment variable is equivalent to `--api-url`. An invalid value in either source is a hard error (exit 2).

**URL resolution order for cloud commands after login:**

1. Explicit `--api-url` flag
2. `MCPJAM_API_URL` environment variable
3. The `apiUrl` stored with the OAuth session (only when the stored login is the credential; `sk_` API keys do not inherit the stored URL)
4. Production default (`https://app.mcpjam.com/api/v1`)

### `logout`

No additional flags. Removes the stored MCPJam session.

### `whoami`

| Flag              | Default                         | Description                                        |
| ----------------- | ------------------------------- | -------------------------------------------------- |
| `--api-key <key>` |                                 | MCPJam `sk_` API key (overrides `MCPJAM_API_KEY`). |
| `--api-url <url>` | `https://app.mcpjam.com/api/v1` | MCPJam API base URL.                               |

***

## Exit codes

| Code  | Meaning                                                                                                                                    |
| ----- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `0`   | Success / all checks passed                                                                                                                |
| `1`   | Command ran but reported a failure                                                                                                         |
| `2`   | Invalid arguments or configuration                                                                                                         |
| `3`   | `tasks conformance` only: the run was incomplete — its task-dependent checks never ran, so it is neither a pass nor a spec violation       |
| `6`   | `tasks watch` only: the task needs input this run could not answer. Answer it with `tasks update`, or re-run with `--interactive` in a TTY |
| `7`   | `tasks watch` only: `--duration-ms` elapsed before the task reached a terminal status                                                      |
| `130` | Interrupted by a signal (`tasks watch` aborted, or a second Ctrl-C during `tunnel` shutdown)                                               |

Codes above `2` are reserved for outcomes a script should act on *differently* — not merely for naming a failure. See [MCP Tasks](/cli/tasks#watch-exit-codes) for the full `tasks watch` mapping.
