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

# Quickstart

> From first search to a Walmart order.

You need an organization API key. These steps use MCP names. The same calls are on [REST](https://agentmall.mintlify.site/api/rest.md).

## 1. Connect

MCP is streamable HTTP at `https://mcp.getagentmall.com` with `Authorization: Bearer <key>`.

Claude Code:

```bash theme={null}
claude mcp add --transport http agentmall https://mcp.getagentmall.com \
  --header "Authorization: Bearer YOUR_KEY"
```

Cursor (`~/.cursor/mcp.json`):

```json theme={null}
{
  "mcpServers": {
    "agentmall": {
      "url": "https://mcp.getagentmall.com",
      "headers": { "Authorization": "Bearer YOUR_KEY" }
    }
  }
}
```

Other clients use the same URL and header. REST is `https://api.getagentmall.com`.

## 2. Create a cart

```json theme={null}
{ "shopper_id": "shp_demo", "merchant_id": "mrc_walmart", "account": "platform" }
```

`create_cart` returns an empty cart. Its `id` is the id for later calls. `account: "platform"` is already signed in and clears the shared cart. Omit `account` for a guest browser, then `sign_in` with `cart_id` or pass an address on checkout.

## 3. Search

```json theme={null}
{ "merchant_id": "mrc_walmart", "query": "AA batteries" }
```

`search_catalog` returns `products` with `price` in cents and a `url`. Check titles. For one page, `get_product` with that `url` and a `session_id`. If results are off, retry with `source: "merchant"` and `session_id`.

## 4. Update the cart

```json theme={null}
{
  "id": "ses_…",
  "line_items": [{ "item": { "id": "<id>", "url": "<url>" }, "quantity": 1 }]
}
```

`update_cart` replaces the cart. The url must already be the chosen size or colour. `get_cart` reads it again. Pass the cart id as `session_id`.

## 5. Checkout

`create_checkout` with `cart_id` returns the checkout: `review_hash`, totals in cents, `status`, `fulfillment.methods`.

`update_checkout` accepts `payment.instruments` with `{ type: "ciphertext", value }` (Evervault `ev:…` from the console `/vault` Card Collection). No raw card number.

Write the address first (no card) to show estimated tax and total in `totals`, then ask for a card. Those totals are estimates until `complete_checkout`.

Show the review to the user. `complete_checkout` with `id`, `review_hash`, and `total_minor` places it and returns `status: "completed"` and `order.id`. The session ends.

If the review changed, you get `review_changed`, `review_mismatch`, or `total_mismatch`. Read the checkout again. On `commit_unknown`, call `get_order` and do not retry.

`cancel_checkout` leaves without placing and keeps the cart. `cancel_cart` closes the cart.

## 6. Order

```json theme={null}
{ "id": "ord_…" }
```

`get_order` needs no session. Totals are cents.

Inputs and errors: [MCP tools](https://agentmall.mintlify.site/mcp/tools.md). Keys: [Auth and keys](https://agentmall.mintlify.site/auth-and-keys.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.