---
title: "Marketplace SDK packages"
slug: "marketplace-sdk-packages"
abstract: "Understand the modular structure of the SDK and which packages you need depending on your application requirements."
---
# Marketplace SDK packages

The Marketplace SDK is modular, allowing you to build robust and maintainable apps with optimized bundle sizes. You can install only the packages you need for the functionalities you want to develop. This topic describes the purpose of every required and optional SDK package so you can choose the ones you need for your application.

Here's an overview of all the SDK packages:

```plaintext
.
└── @sitecore/marketplace-sdk/client      (required)
    ├── @sitecore/marketplace-sdk/xmc     (optional package for SitecoreAI APIs)
    ├── @sitecore/marketplace-sdk/ai      (optional package for AI skills APIs)
    └── @sitecore/marketplace-sdk/...     (optional future packages)
```

## Required packages

### client

```bash
npm install @sitecore-marketplace-sdk/client
```

The [`client`](https://www.npmjs.com/package/@sitecore-marketplace-sdk/client) package is required for all Marketplace apps. It connects your app to Sitecore, allowing the two to securely communicate. The SDK connects your app by loading it in Sitecore inside a sandboxed [iframe](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe). The iframe and its parent window securely communicate using the web browser's [PostMessage API](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage).

After [initializing `client`](https://doc.sitecore.com/mp/en/developers/sdk/0/sitecore-marketplace-sdk/quick-start--manual-.html "Quick start (manual)"), you can start making [queries](https://doc.sitecore.com/mp/en/developers/sdk/0/sitecore-marketplace-sdk/understanding-queries.html "Understanding queries") and [mutations](https://doc.sitecore.com/mp/en/developers/sdk/0/sitecore-marketplace-sdk/understanding-mutations.html "Understanding mutations") that do not require access to product-specific APIs.

## Optional packages

> [!important]
> All optional packages require the `client` package.

Optional packages give your app [API access](https://doc.sitecore.com/mp/en/developers/marketplace/api-access.html) to specific Sitecore products or capabilities and are only required when your app is [configured](https://doc.sitecore.com/mp/en/developers/marketplace/configure-and-activate-a-custom-app.html) to use those APIs. Each optional package corresponds to a Sitecore product or capability that the Marketplace is [compatible](https://doc.sitecore.com/mp/en/developers/marketplace/compatibility-and-requirements.html) with.

Note the following about API requests:

- When using the Marketplace SDK built-in authorization[^UUID-9f3af1b0-4e64-fc35-eb7d-0b2a8bdb572c_mp-builtinauth], the SDK automatically authorizes your requests to all the Sitecore APIs your Marketplace app has access to, with no manual authorization required.
- All requests to Sitecore APIs must contain the Context ID of your SitecoreAI environment, which you can retrieve from the [application context](https://doc.sitecore.com/mp/en/developers/sdk/0/sitecore-marketplace-sdk/query-the-application-context.html "Query the application context").
- Requests to Sitecore APIs only work in the SitecoreAI environments where your app is [installed](https://doc.sitecore.com/mp/en/developers/marketplace/install-an-activated-custom-app.html).

### xmc

```bash
npm install @sitecore-marketplace-sdk/xmc
```

The [`xmc`](https://www.npmjs.com/package/@sitecore-marketplace-sdk/xmc) package provides type-safe interfaces for interacting with SitecoreAI APIs. You only need this package if you select **SitecoreAI APIs** during [app configuration](https://doc.sitecore.com/mp/en/developers/marketplace/configure-and-activate-a-custom-app.html). Use it to integrate SitecoreAI functionalities into your app. The module supports the following APIs:

- Authoring and Management GraphQL API - manage SitecoreAI content using GraphQL.
- [Sites REST API](https://api-docs.sitecore.com/xmc/sites-api) - manage SitecoreAI sites, site collections, jobs, languages, and more.
- [Pages REST API](https://api-docs.sitecore.com/xmc/pages-api) - manage SitecoreAI pages and page data.
- [Agent REST API](https://api-docs.sitecore.com/ai-capabilities/agent-api) - connect AI clients or enterprise systems to perform business-level actions in Sitecore, such as building pages, adding components, or uploading assets. The Agent API powers the [Marketer MCP](https://doc.sitecore.com/mp/en/developers/sdk/0/sitecore-marketplace-sdk/adding-the-sitecore-marketer-mcp-to-marketplace-apps.html "Adding the Sitecore Marketer MCP to Marketplace apps").
- Search Configuration REST API - retrieve the configuration for your SitecoreAI [search sources](https://doc.sitecore.com/xmc/en/users/xm-cloud/en/manage-content-sources.html). The search configuration defines how content items are indexed and made searchable. For example, which fields you can search against, which fields you can use for filtering, and what data will be returned in search results.

    > [!important]
    > Feature availability for the Search Configuration REST API is part of a phased rollout. Your organization may not have access to this functionality yet. It will become available when your environment is included in the rollout.

After [initializing `xmc`](https://doc.sitecore.com/mp/en/developers/sdk/0/sitecore-marketplace-sdk/initialize-the-xmc-package.html "Initialize the xmc package"), you can make API requests in the following ways:

- *From the client side* - start making [queries](https://doc.sitecore.com/mp/en/developers/sdk/0/sitecore-marketplace-sdk/understanding-queries.html "Understanding queries") and [mutations](https://doc.sitecore.com/mp/en/developers/sdk/0/sitecore-marketplace-sdk/understanding-mutations.html "Understanding mutations") that require access to SitecoreAI APIs.
- *From the server side* - if your [app architecture](https://doc.sitecore.com/mp/en/developers/marketplace/app-architecture-and-authorization-options.html) supports server-side API calls to SitecoreAI APIs, you can use the [experimental functions](https://github.com/Sitecore/marketplace-sdk/blob/main/docs/experimental-xmc.md) to access SitecoreAI APIs directly from the server.

### ai

```bash
npm install @sitecore-marketplace-sdk/ai
```

The [`ai`](https://www.npmjs.com/package/@sitecore-marketplace-sdk/ai) package provides type-safe interfaces for interacting with AI skills APIs. AI skills APIs provide LLM-powered capabilities grounded in SitecoreAI data. You only need this package if you select **AI skills APIs** during [app configuration](https://doc.sitecore.com/mp/en/developers/marketplace/configure-and-activate-a-custom-app.html). Use it to integrate AI functionalities into your app. The module supports the following APIs:

- [Brand Review API](https://api-docs.sitecore.com/ai-capabilities/ai-brand-review-admin-rest-api) - using AI-powered analysis, evaluate whether input content and assets comply with the guidelines defined in a [brand kit](https://doc.sitecore.com/xmc/en/users/xm-cloud/en/brand-kits.html). The API analyzes input content provided in the request, such as text, images, and metadata, by comparing it against brand kit sections to ensure alignment with tone of voice, visual identity, legal requirements, and accessibility standards.

After [initializing `ai`](https://doc.sitecore.com/mp/en/developers/sdk/0/sitecore-marketplace-sdk/initialize-the-ai-package.html "Initialize the ai package"), you can make API requests in the following ways:

- *From the client side* - start making [mutations](https://doc.sitecore.com/mp/en/developers/sdk/0/sitecore-marketplace-sdk/understanding-mutations.html "Understanding mutations") that require access to AI skills APIs.
- *From the server side* \- if your [app architecture](https://doc.sitecore.com/mp/en/developers/marketplace/app-architecture-and-authorization-options.html) supports server-side API calls to AI skills APIs, you can use the [experimental functions](https://github.com/Sitecore/marketplace-sdk/blob/main/docs/experimental-ai.md) to access AI skills APIs directly from the server.

[^UUID-9f3af1b0-4e64-fc35-eb7d-0b2a8bdb572c_mp-builtinauth]: An authorization flow for Marketplace applications that is managed entirely by the Marketplace SDK, abstracting it away from the developer.
