> ## 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.

# The MCP Server

> Streamable HTTP endpoint for AI agents to search, cart, and check out.

![Agent connects to AgentMall server via MCP over streamable HTTP](https://mintcdn.com/agentmall/ZuoglRqW4CDsIaRs/images/mcp-server.svg?fit=max\&auto=format\&n=ZuoglRqW4CDsIaRs\&q=85\&s=052bf3a6de7b5686797dd4abbcfc58ab)

The MCP server is a streamable HTTP endpoint at `mcp.getagentmall.com`. AI agents connect here to search, cart, and check out.

## Protocol

MCP over streamable HTTP. Any client that speaks the [Model Context Protocol](https://modelcontextprotocol.io) can connect.

## URL

```
https://mcp.getagentmall.com
```

## Authentication

Every tool call needs an organization API key.

```http theme={null}
Authorization: Bearer <key>
```

The URL also accepts `?key=<key>` as a query parameter. Prefer the header so the key stays out of logs and shared configs.

## Connecting

### Claude Code

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

### Cursor

Add to `~/.cursor/mcp.json`:

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

### Other MCP clients

Point a streamable HTTP transport at `https://mcp.getagentmall.com` with an `Authorization: Bearer <key>` header. Or use the URL with the key inline:

```
https://mcp.getagentmall.com?key=YOUR_KEY
```

## Tools

All inputs are `snake_case`. Prices and totals are integer minor units of the merchant's currency (cents for USD, pence for GBP). Call `list_merchants` for the nine live merchant ids.

### Catalog

| Tool | What it does |
| - | - |
| `list_merchants` | Lists the live merchants and their ids. |
| `search_catalog` | Keyword search. Returns up to 10 products with price, stock, and URL. |
| `get_product` | Reads one product page. Returns reviews, options, and variants when available. |
| `lookup_catalog` | Reads up to 10 product pages in one call. |

### Cart

| Tool | What it does |
| - | - |
| `create_cart` | Starts an empty cart. Returns the cart `id` used by all later calls. |
| `get_cart` | Reads the live merchant cart. |
| `update_cart` | Replaces the cart: clears, then adds each line. |
| `cancel_cart` | Closes the cart and releases the browser. |

### Sign-in

| Tool | What it does |
| - | - |
| `sign_in` | Signs in to the merchant account with Evervault-encrypted credentials. |
| `submit_sign_in_otp` | Submits an SMS code after a sign-in challenge. |
| `sign_out` | Signs the merchant account out. |

### Checkout

| Tool | What it does |
| - | - |
| `create_checkout` | Opens checkout. Returns totals, fulfillment methods, and `review_hash`. |
| `get_checkout` | Re-reads the open checkout without changing it. |
| `update_checkout` | Writes an address, selects a shipping method, or adds a vaulted card. |
| `cancel_checkout` | Leaves checkout without placing. The cart stays open. |
| `complete_checkout` | Places the order when `review_hash` and `total_minor` match. |

### Order

| Tool | What it does |
| - | - |
| `get_order` | Reads an order by its platform `id`. No session required. |

## Errors

Every error is a JSON object with `error.code` and `error.message`:

```json theme={null}
{
  "error": {
    "code": "session_not_found",
    "message": "No cart with that id."
  }
}
```

Error codes are the same on MCP and REST. See [Error codes](https://agentmall.mintlify.site/reference/errors.md) for the full list.

## Full tool reference

Input schemas, return shapes, and per-tool error codes are on [MCP tools](https://agentmall.mintlify.site/mcp/tools.md).


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