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

# API and MCP

> Create an Appfox API key in your Shopify admin and use it with the bundles REST API or an MCP client such as Claude or Cursor to manage bundles.

Use an API key to read and manage your bundles outside the app. One key works for the [REST API](https://bundles-docs.getappfox.com/product-bundles/docs/api/bundles-api.md) and for the MCP server, so AI assistants such as Claude and Cursor can work with your bundles directly.

You can also get here from setup: on the first step of the onboarding wizard, click **Set up with MCP** to skip the wizard and open this page.

## Create a key

**1. Open the API settings**

In Product Bundles, open **Settings** → **API & MCP**.

**2. Create the key**

Enter a **Name**, choose the **Access** level, and select **Save** in the save bar.
**Read only** can view bundles, orders and analytics. **Read and write** can also create, edit, publish and delete bundles.

**3. Copy it**

Copy the key right away. It is shown once and can't be retrieved later. If you lose it, revoke it and create a new one.

You can have up to 10 active keys. Click **Revoke** next to a key to stop it working immediately. All keys stop working if you uninstall the app.

## Connect an AI assistant (MCP)

On the **API & MCP** page, click **Create a key for my AI agent**. The page then shows ready-to-use snippets that already contain your key: a command for Claude Code, an **Add to Cursor** button, a config for Claude Desktop, and a JSON config for other clients. Copy one into your client, then ask your agent to set up your bundles. It can pick the right bundle type, find your products, create the bundle and tell you how to add the widget to your theme.

### Claude Desktop

**1. Open the config file**

In Claude Desktop, open **Settings** → **Developer** → **Edit Config**. A folder opens with a file named `claude_desktop_config.json`. If you don't see **Edit Config**, the file is in `~/Library/Application Support/Claude/` on Mac or `%APPDATA%\Claude\` on Windows. Create it if it's missing.

**2. Edit it**

Open the file in any text editor, such as TextEdit, Notepad or VS Code. If the file is empty, paste the **Claude Desktop** snippet from the **API & MCP** page as the whole file. If it already contains `"mcpServers"`, add only the `"appfox-bundles"` entry inside it and put a comma after the entry before it.

**3. Restart Claude Desktop**

Save the file, then quit and reopen Claude Desktop. Appfox Bundles appears under the tools icon in a new chat.

The snippet connects through the `mcp-remote` helper, so Node.js must be installed. Claude Desktop's **Connectors** screen can't send an API key, so don't add the server there.

You can also add the MCP server URL shown on the **API & MCP** page to any client that supports HTTP MCP servers, and send your key as a bearer token:

```json theme={null}
{
  "mcpServers": {
    "appfox-bundles": {
      "type": "http",
      "url": "https://<your-app-url>/mcp",
      "headers": { "Authorization": "Bearer <your-api-key>" }
    }
  }
}
```

These tools are available to every key:

| Tool | What it does |
| - | - |
| `list_bundles` | List your bundles, optionally by status. |
| `get_bundle` | Get one bundle with its products and offers. |
| `list_orders` | List orders that contained a bundle. |
| `get_analytics` | Revenue, orders, views and conversion per bundle. |
| `get_setup_guide` | Which bundle type fits, what each needs, and an example to start from. |
| `search_products` | Find your products and their IDs. |
| `get_widget_status` | Check whether the widget is on your product page and get the theme editor link to add it. |

The agent can't add the widget to your theme for you: it gives you a link that opens the theme editor, and you click **Save**.

Read and write keys also get `create_bundle`, `update_bundle`, `set_bundle_status` and `delete_bundle`. Read-only keys don't see these tools.

> [!NOTE]
>
> Treat an API key like a password. Anyone with a read and write key can change or delete your bundles. Use a read-only key whenever you can.

> [!TIP]
>
> Building your own integration? See the [REST API reference](https://bundles-docs.getappfox.com/product-bundles/docs/api/bundles-api.md). Need help? Contact us at [support@getappfox.com](mailto:support@getappfox.com).


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