McpServer catalog tools for Sitecore Ordercloud

How Catalog Tools Work: Making E-Commerce Catalogs Accessible to AI

A deep dive into the catalog management system that enables AI assistants to manage Sitecore OrderCloud catalogs through natural language

Published on November 20, 2025 | Technical Deep Dive | E-Commerce, API Integration, AI Tools

Introduction: What Are Catalogs in E-Commerce?

In e-commerce, a catalog is a collection of products organized for a specific purpose. Think of it as a curated storefront. In Sitecore OrderCloud, catalogs are powerful organizational structures that:

  • Group products into logical collections
  • Control visibility by assigning catalogs to buyers, user groups, or individual users
  • Enable multi-tenant commerce where different buyers see different product offerings
  • Support B2B scenarios where different customer segments get different catalogs

For example, a company might have:

  • A “Retail Catalog” for end consumers
  • A “Wholesale Catalog” for business customers
  • A “VIP Catalog” for premium customers

The Challenge: Making Catalogs AI-Accessible

The OrderCloud API provides comprehensive catalog management, but using it requires understanding REST API endpoints, knowing exact field names and data structures, handling authentication and error cases, and managing complex relationships.

Traditional API usage looks like this:

Traditional API Call (TypeScript)
const catalog = {
  Name: "Electronics Catalog",
  Description: "Consumer electronics products",
  Active: true
}
await axios.post('https://api.ordercloud.io/v1/catalogs', catalog, {
  headers: { Authorization: `Bearer ${token}` }
})

Our goal was to make this accessible through natural language:

Natural Language Request:
“Create a catalog called ‘Electronics Catalog’ with description ‘Consumer electronics products’ and make it active.”

The AI assistant handles everything automatically—no code required.

Architecture: Three-Layer Design

The catalog tools system follows a clean three-layer architecture:

Layer 1: Tool Registration – The AI Interface

The catalog-tools.ts file defines what AI assistants can do with catalogs. It’s the bridge between natural language and API calls.

How Tools Are Registered

Each tool follows this pattern:

Tool Registration Pattern (TypeScript)
server.registerTool(
  "tool_name",                    // Unique identifier
  {
    title: "Human-Readable Title",
    description: "What this tool does",
    inputSchema: {                // Zod schema for validation
      // Parameter definitions
    }
  },
  async (input) => {              // Handler function
    // Execute the operation
    // Return formatted response
  }
)

Example: The Create Catalog Tool

Let’s examine the complete implementation of the create_catalog tool:

catalog-tools.ts – Create Catalog Tool
server.registerTool(
  "create_catalog",
  {
    title: "Create Catalog",
    description: "Create a new catalog in OrderCloud",
    inputSchema: {
      id: z.string().optional(),           // Optional custom ID
      name: z.string(),                    // Required name
      description: z.string().optional(),  // Optional description
      active: z.boolean().optional().default(true),  // Defaults to active
      xp: z.record(z.any()).optional(),    // Extended properties
    },
  },
  async (input) => {
    try {
      // Transform input to OrderCloud format
      const catalog = {
        ...(input.id && { ID: input.id }),
        Name: input.name,
        ...(input.description && { Description: input.description }),
        Active: input.active,
        ...(input.xp && { xp: input.xp }),
      }
      
      // Call the client
      const result = await orderCloudClient.catalogs.saveCatalogAssignment(assignment)

// Client Method
async saveCatalogAssignment(assignment: CatalogAssignment) {
  this.ensureAuthenticated()
  
  const response = await this.client.post<CatalogAssignment>(
    "v1/catalogs/assignments", 
    assignment
  )
  return response.data
}

// API Call
POST https://sandboxapi.ordercloud.io/v1/catalogs/assignments
Body: {
  "CatalogID": "summer-collection-001",
  "BuyerID": "retail-buyer"
}

Step 5: Response to User

AI formats the response:

✅ Created catalog “Summer Collection” (ID: summer-collection-001)
✅ Assigned catalog to Retail buyer

Advanced Features

1. Advanced Filtering and Search

The list_catalogs tool supports powerful query capabilities:

Advanced Search Example
// Search by name
{
  search: "Electronics",
  searchOn: ["Name"]
}

// Multiple sort fields
{
  sortBy: ["Name", "!ID"]  // Sort by Name ascending, then ID descending
}

// Complex filters
{
  filters: {
    Active: true,
    "CategoryCount": ">10"  // More than 10 categories
  }
}

The client transforms these into OrderCloud query parameters:

Resulting API Call
GET /v1/catalogs?search=Electronics&searchOn=Name&sortBy=Name,!ID&filters[Active]=true

2. Extended Properties (XP)

OrderCloud supports custom extended properties for storing additional metadata:

Using Extended Properties
{
  name: "Electronics Catalog",
  xp: {
    season: "Summer 2024",
    region: "North America",
    customField: "value",
    promotions: {
      enabled: true,
      discountPercent: 15
    }
  }
}

These are preserved and passed through to the API, enabling custom metadata without schema changes.

3. Comprehensive Error Handling

The system implements error handling at multiple levels:

Tool Level Error Handling
catch (error) {
  return {
    content: [{
      type: "text",
      text: `Error creating catalog: ${error.message}`
    }],
    isError: true
  }
}
Client Level Error Handling
catch (error) {
  const errorDetails = {
    message: error.message,
    response: {
      status: error.response?.status,
      data: error.response?.data
    }
  }
  DebugLogger.log("createCatalog_error", { catalog, errorDetails }, undefined, error)
  throw error
}

This provides:

  • User-friendly error messages for the AI to communicate
  • Detailed debugging information in logs
  • HTTP status codes for troubleshooting
  • Full API error responses

Real-World Use Cases

Use Case 1: Multi-Tenant Catalog Setup

Setting up catalogs for different customer segments:

Scenario: Creating Multiple Catalogs
// AI receives request:
// "Create three catalogs: 'Retail Catalog', 'Wholesale Catalog', 
//  and 'VIP Catalog'. Make them all active."

// AI executes three create_catalog calls:

await orderCloudClient.catalogs.create({
  Name: "Retail Catalog",
  Active: true
})

await orderCloudClient.catalogs.create({
  Name: "Wholesale Catalog",
  Active: true
})

await orderCloudClient.catalogs.create({
  Name: "VIP Catalog",
  Active: true
})

Use Case 2: Catalog Assignment Management

Assigning catalogs to multiple buyers:

Scenario: Multiple Assignments
// AI receives request:
// "Assign the 'Electronics Catalog' to the 'Retail Buyer' and 
//  the 'Wholesale Buyer'."

// AI executes two save_catalog_assignment calls:

await orderCloudClient.catalogs.saveCatalogAssignment({
  CatalogID: "electronics-catalog",
  BuyerID: "retail-buyer"
})

await orderCloudClient.catalogs.saveCatalogAssignment({
  CatalogID: "electronics-catalog",
  BuyerID: "wholesale-buyer"
})

Use Case 3: Bulk Catalog Operations

Updating multiple catalogs based on criteria:

Scenario: Bulk Updates
// AI receives request:
// "Find all catalogs with 'Summer' in the name and set them to inactive."

// Step 1: List catalogs with filter
const catalogs = await orderCloudClient.catalogs.listCatalogs({
  search: "Summer",
  searchOn: ["Name"]
})

// Step 2: Patch each catalog
for (const catalog of catalogs.Items) {
  await orderCloudClient.catalogs.patch(catalog.ID, {
    Active: false
  })
}

Use Case 4: Catalog Discovery with Complex Filtering

Scenario: Advanced Search
// AI receives request:
// "Show me all active catalogs that have more than 50 products."

const catalogs = await orderCloudClient.catalogs.listCatalogs({
  filters: {
    Active: true,
    "CategoryCount": ">50"
  },
  sortBy: ["CategoryCount"],
  pageSize: 100
})

// Returns structured data for AI to format

Design Patterns and Best Practices

1. Separation of Concerns

Each layer has a single, well-defined responsibility:

  • Tools Layer – AI interface, validation, response formatting
  • Client Layer – HTTP communication, data transformation
  • API Layer – Data persistence

This separation makes the code:

  • Easier to understand and maintain
  • Simple to test in isolation
  • Flexible to modify without ripple effects

2. Type Safety with TypeScript and Zod

Full TypeScript typing combined with Zod runtime validation ensures correctness:

Type Definitions
interface Catalog {
  ID?: string
  Name: string
  Description?: string
  Active?: boolean
  CategoryCount?: number
  xp?: Record<string, any>
}

interface ListResponse<T> {
  Items: T[]
  Meta: {
    Page: number
    PageSize: number
    TotalCount: number
    TotalPages: number
  }
}
Zod Schema Validation
const catalogSchema = {
  id: z.string().optional(),
  name: z.string().min(1, "Name is required"),
  description: z.string().optional(),
  active: z.boolean().optional().default(true),
  xp: z.record(z.any()).optional()
}

This provides:

  • Compile-time error checking
  • IDE autocomplete and IntelliSense
  • Self-documenting code
  • Runtime validation to catch invalid data

3. Graceful Error Recovery

Errors are handled at multiple levels with context-appropriate responses:

Multi-Level Error Handling
// Level 1: Validation errors (caught early)
if (!input.name) {
  throw new Error("Catalog name is required")
}

// Level 2: Client errors (network, auth)
try {
  const response = await this.client.post(...)
} catch (error) {
  if (error.response?.status === 401) {
    throw new Error("Authentication failed. Please check credentials.")
  }
  throw error
}

// Level 3: API errors (business logic)
if (response.data.Errors) {
  throw new Error(`API Error: ${response.data.Errors[0].Message}`)
}

4. Extensibility

The architecture makes it easy to add new capabilities:

Adding a New Tool
// 1. Add client method
async getCatalogStats(id: string): Promise<CatalogStats> {
  this.ensureAuthenticated()
  const response = await this.client.get(`v1/catalogs/${id}/stats`)
  return response.data
}

// 2. Register tool
server.registerTool(
  "get_catalog_stats",
  {
    title: "Get Catalog Statistics",
    description: "Get detailed statistics for a catalog",
    inputSchema: {
      catalogId: z.string()
    }
  },
  async (input) => {
    const stats = await orderCloudClient.catalogs.getCatalogStats(input.catalogId)
    return {
      content: [{ type: "text", text: JSON.stringify(stats, null, 2) }]
    }
  }
)

Testing and Debugging

Debug Tools

The system includes dedicated debug tools:

Debug Tool Implementation
server.registerTool(
  "get_debug_logs",
  {
    title: "Get Debug Logs",
    description: "Retrieve debug logs for troubleshooting",
    inputSchema: {
      includeParams: z.boolean().optional(),
      includeResults: z.boolean().optional(),
      maxLogs: z.number().optional().default(20)
    }
  },
  async (input) => {
    const logs = DebugLogger.getLogs({
      limit: input.maxLogs,
      includeParams: input.includeParams,
      includeResults: input.includeResults
    })
    
    return {
      content: [{ 
        type: "text", 
        text: JSON.stringify(logs, null, 2) 
      }]
    }
  }
)

server.registerTool(
  "test_api_connection",
  {
    title: "Test API Connection",
    description: "Test the connection to OrderCloud API",
    inputSchema: {}
  },
  async () => {
    try {
      await orderCloudClient.catalogs.listCatalogs({ pageSize: 1 })
      return {
        content: [{ 
          type: "text", 
          text: "✅ API connection successful" 
        }]
      }
    } catch (error) {
      return {
        content: [{ 
          type: "text", 
          text: `❌ API connection failed: ${error.message}` 
        }],
        isError: true
      }
    }
  }
)

Common Issues and Solutions

Issue Symptom Solution
Authentication Errors “Not authenticated” errors Ensure credentials are set in environment variables. Use test_api_connection tool.
Validation Errors Zod validation failures Check input schema requirements. Review error messages for missing/invalid fields.
API Errors 400/404/500 errors Check error response details in logs. Verify API endpoint and data format.
Network Errors Connection timeouts Check network connectivity. Verify API base URL is correct.

Performance Considerations

Pagination

All list operations support pagination to prevent loading excessive data:

Pagination Implementation
const catalogs = await orderCloudClient.catalogs.listCatalogs({
  page: 1,
  pageSize: 20  // Load 20 catalogs at a time
})

// Response includes metadata for pagination
console.log(catalogs.Meta)
// {
//   Page: 1,
//   PageSize: 20,
//   TotalCount: 157,
//   TotalPages: 8
// }

Request Optimization

The client uses efficient HTTP patterns:

  • Request Interceptors – Automatic token injection eliminates redundant auth code
  • Conditional Requests – Only send necessary parameters
  • Type-Safe Responses – No runtime parsing overhead
Efficient Parameter Building
const params: Record<string, any> = {}

// Only add parameters that have values
if (options?.search) params.search = options.search
if (options?.searchOn) params.searchOn = options.searchOn.join(",")
if (options?.sortBy) params.sortBy = options.sortBy.join(",")

// This prevents sending empty/undefined parameters

Future Enhancements

Potential improvements to the system:

1. Bulk Operations

Proposed Bulk API
// Create multiple catalogs in one call
async bulkCreate(catalogs: Catalog[]): Promise<Catalog[]> {
  const results = await Promise.all(
    catalogs.map(catalog => this.create(catalog))
  )
  return results
}

// Usage
const catalogs = await orderCloudClient.catalogs.bulkCreate([
  { Name: "Catalog 1", Active: true },
  { Name: "Catalog 2", Active: true },
  { Name: "Catalog 3", Active: true }
])

2. Catalog Templates

Template System Concept
// Pre-configured catalog structures
const templates = {
  retail: {
    Name: "Retail Catalog",
    Active: true,
    xp: {
      type: "retail",
      allowsPublicAccess: true
    }
  },
  wholesale: {
    Name: "Wholesale Catalog",
    Active: true,
    xp: {
      type: "wholesale",
      requiresApproval: true,
      minimumOrder: 1000
    }
  }
}

// Create from template
async createFromTemplate(
  templateName: string, 
  overrides?: Partial<Catalog>
): Promise<Catalog> {
  const template = templates[templateName]
  return this.create({ ...template, ...overrides })
}

3. Catalog Cloning

Cloning Implementation
async cloneCatalog(
  sourceId: string, 
  newName: string, 
  includeAssignments: boolean = true
): Promise<Catalog> {
  // Get source catalog
  const source = await this.get(sourceId)
  
  // Create new catalog
  const newCatalog = await this.create({
    Name: newName,
    Description: source.Description,
    Active: source.Active,
    xp: source.xp
  })
  
  // Clone assignments if requested
  if (includeAssignments) {
    const assignments = await this.listCatalogAssignments({
      catalogId: sourceId
    })
    
    for (const assignment of assignments.Items) {
      await this.saveCatalogAssignment({
        ...assignment,
        CatalogID: newCatalog.ID
      })
    }
  }
  
  return newCatalog
}

4. Catalog Analytics

Analytics Queries
interface CatalogAnalytics {
  totalCatalogs: number
  activeCatalogs: number
  inactiveCatalogs: number
  avgProductsPerCatalog: number
  topCatalogsByProducts: Catalog[]
  assignmentStats: {
    totalAssignments: number
    buyerAssignments: number
    userGroupAssignments: number
    userAssignments: number
  }
}

async getCatalogAnalytics(): Promise<CatalogAnalytics> {
  // Implementation would aggregate data across catalogs
}

Conclusion

The catalog tools system demonstrates a robust architecture for making complex e-commerce APIs accessible through AI. By implementing a clean three-layer design with proper separation of concerns, we’ve created a system that is:

  • Type-Safe – Full TypeScript coverage with Zod validation
  • Maintainable – Clear separation between AI interface, business logic, and API communication
  • Debuggable – Comprehensive logging at every level
  • Extensible – Easy to add new tools and capabilities
  • User-Friendly – Natural language interface eliminates the learning curve

The system scales from simple single-catalog operations to complex multi-tenant scenarios, all while maintaining code quality and developer experience.

Key Takeaway: By carefully architecting the system with proper abstractions, validation, error handling, and logging, we’ve transformed a developer-focused REST API into something anyone can use through conversation with an AI assistant.

Quick Reference

Complete Tool List

Available Tools Summary
// Basic CRUD Operations
list_catalogs(options)     - List with filtering, search, sort
get_catalog(id)            - Get by ID
create_catalog(catalog)    - Create new
update_catalog(id, catalog) - Full update (PUT)
patch_catalog(id, catalog)  - Partial update (PATCH)
delete_catalog(id)         - Delete

// Catalog Assignments
list_catalog_assignments(options)     - List assignments
save_catalog_assignment(assignment)   - Create/update assignment
delete_catalog_assignment(catalogId)  - Delete assignment

// Bundle Assignments
list_catalog_bundle_assignments(options)
save_catalog_bundle_assignment(assignment)
delete_catalog_bundle_assignment(catalogId, bundleId)

// Product Assignments
list_catalog_product_assignments(options)
save_catalog_product_assignment(assignment)
delete_catalog_product_assignment(catalogId, productId)

Example Code Snippets

Common Operations
// Create catalog with extended properties
await orderCloudClient.catalogs.create({
  Name: "Electronics",
  Description: "Consumer electronics",
  Active: true,
  xp: {
    region: "North America",
    season: "2024"
  }
})

// Search with multiple criteria
await orderCloudClient.catalogs.listCatalogs({
  search: "Electronics",
  searchOn: ["Name"],
  sortBy: ["Name"],
  filters: { Active: true },
  page: 1,
  pageSize: 20
})

// Assign to buyer
await orderCloudClient.catalogs.saveCatalogAssignment({
  CatalogID: "electronics-catalog",
  BuyerID: "retail-buyer"
})

This technical documentation provides a comprehensive guide to understanding and implementing the catalog tools system. For source code, see src/tools/catalogs/catalog-tools.ts and src/tools/clients/catalog-client.ts.

MCP Server for Sitecore OrderCloud

Bridging AI and E-Commerce Through Natural Language

Imagine managing your entire e-commerce platform by simply talking to an AI assistant. No complex API calls, no extensive documentation diving, just natural conversations that get work done. That’s exactly what the Sitecore OrderCloud MCP Server makes possible.

The Big Picture: This project transforms Sitecore OrderCloud’s powerful REST API into a set of AI-accessible tools, enabling intelligent agents like Claude to manage products, catalogs, promotions, and more through natural language interactions.

What Problem Does This Solve?

Traditional e-commerce management requires developers to understand complex APIs, write integration code, and handle authentication, error handling, and data formatting. Business users often need to wait for developers to build custom tools or learn complicated interfaces.

The OrderCloud MCP Server eliminates this friction by creating a bridge between AI assistants and the OrderCloud API. Now, anyone can interact with their e-commerce platform using plain English.

Understanding the Technology

What is Model Context Protocol (MCP)?

Model Context Protocol is an open standard developed by Anthropic that allows AI assistants to securely connect to external data sources and tools. Think of it as a universal translator that enables AI models to interact with any API or service in a standardized way.

MCP servers act as intermediaries, exposing capabilities as discoverable tools that AI assistants can use. This project implements an MCP server specifically for Sitecore OrderCloud.

What is Sitecore OrderCloud?

Sitecore OrderCloud is a headless, cloud-based e-commerce platform designed for complex B2B and B2C scenarios. It provides comprehensive APIs for managing products, catalogs, pricing, promotions, orders, buyers, suppliers, and more.

Key Capabilities

📦 Product Management

Create, update, search, and manage products with variants, specifications, and supplier relationships

📚 Catalog Management

Build and organize catalogs with product assignments and buyer visibility controls

🎯 Promotions

Design complex promotional campaigns with eligibility rules and automatic application

💰 Pricing

Configure volume-based pricing with tiered price breaks and quantity rules

🏢 Buyers & Suppliers

Manage multi-tenant B2B relationships and organization hierarchies

🔐 Smart Authentication

Automatic token management with refresh and secure credential handling

How It Works

The architecture is elegantly simple yet powerful. Here’s the flow when you interact with the system:

Behind the scenes, the server consists of several layers:

  • Tool Layer: 100+ registered tools that the AI can discover and use
  • Client Layer: Specialized clients for each domain (products, catalogs, promotions, etc.)
  • Authentication Layer: Automatic OAuth 2.0 token management with refresh
  • HTTP Layer: Axios-based communication with the OrderCloud API

Real-World Use Cases

🛍️ AI-Powered Product Management

You say: “Create a new product called ‘Premium Wireless Headphones’ with a description about high-quality audio, set it to active, and enable inventory tracking.”

AI executes: create_product tool
✅ Product created with ID: PROD-12345

🔍 Intelligent Product Discovery

You say: “Show me all active products in the Electronics catalog priced under $100 that have wireless in the name.”

AI executes: list_products with complex filters
📋 Found 15 products matching your criteria

🎉 Dynamic Promotion Creation

You say: “Create a promotion that gives 20% off all orders over $50, make it auto-apply, and set it to run for the next 30 days.”

AI executes: create_promotion_no_code tool
🎉 Promotion created and activated

📊 Bulk Operations

You say: “Update all products in the Summer Collection category to be returnable.”

AI executes: Multiple tool calls in sequence
✅ Updated 47 products successfully

Technical Highlights

80+ AI-Accessible Tools
50+ API Endpoints
5,000+ Lines of TypeScript

Automatic Authentication: The server handles OAuth 2.0 token management automatically, including refresh logic with safety windows to prevent race conditions. You never have to think about authentication.

Comprehensive Error Handling: Every operation includes detailed error context, making debugging straightforward. The system captures HTTP status codes, response bodies, and request details.

Advanced Query Support: Leverage OrderCloud’s powerful query capabilities through natural language, including complex filtering, full-text search, multi-field sorting, and pagination.

Debug Tools: Built-in debugging utilities that don’t interfere with the MCP protocol. Track operation parameters, results, errors, and performance metrics.

Getting Started

Setting up the server is straightforward. You’ll need Node.js 18+, a Sitecore OrderCloud account, and API credentials.

# Clone and install
git clone git clone https://github.com/vlad-iobagiu/sitecore-ordecloud-mcp.git
cd sitecore-ordercloud-mcp
npm install# Configure environment variables
ORDERCLOUD_USERNAME=your-username
ORDERCLOUD_PASSWORD=your-password
ORDERCLOUD_CLIENT_ID=your-client-id
ORDERCLOUD_SCOPE=FullAccess# Build and run
npm run build

Then configure your MCP client (like Visual Studio Code, Claude Desktop or Cursor) to connect to the server, and you’re ready to start managing your e-commerce platform through AI.

Example to run it on vs code :

Benefits for Different Stakeholders

For Developers

  • Rapid prototyping and testing of OrderCloud integrations
  • Automated complex workflows through AI scripting
  • Built-in debugging and logging tools
  • Clean, modular, well-documented codebase to learn from

For Business Users

  • Natural language interface requires no API knowledge
  • Faster execution of routine tasks
  • Immediate feedback and error prevention
  • Learn about platform capabilities through exploration

For Organizations

  • Enable AI integration in commerce workflows
  • Scale operations with programmatic access
  • Standardize API interactions across teams
  • Explore innovative AI-powered use cases

The Future of AI-Powered Commerce

This project represents just the beginning of what’s possible when you combine AI assistants with powerful e-commerce APIs. Future enhancements could include order management, user administration, webhook configuration, analytics querying, and complex workflow automation.

The Model Context Protocol opens up exciting possibilities for making complex systems accessible through natural language. As more platforms adopt MCP, we’ll see a new generation of AI-powered tools that democratize access to sophisticated software systems.

Ready to Transform Your E-Commerce Management?

Explore the code, contribute to the project, or deploy your own instance to start managing Sitecore OrderCloud through AI.

View on GitHub

The Sitecore OrderCloud MCP Server demonstrates how the gap between natural language and complex APIs can be bridged elegantly. By exposing OrderCloud’s capabilities as AI-accessible tools, it enables new possibilities for automated commerce operations, intelligent product management, dynamic pricing strategies, and AI-powered customer service.

Whether you’re a developer looking to streamline integrations, a business user seeking easier platform access, or an organization exploring AI innovation, this project showcases the transformative potential of combining AI assistants with e-commerce platforms.

On the next blogposts I will explain Categories, Catalogs and products tools.

Introducing the Sitecore Agent API: Empowering AI-Driven Digital Experiences

The digital experience landscape is evolving quickly. What once required manual configuration, content entry, and developer support can now be automated and orchestrated through intelligent agent-based workflows. Artificial intelligence is no longer just assisting content creators—it’s taking meaningful action.

Enter the Sitecore Agent API: a secure, auditable, and deeply integrated REST API that allows AI agents and connected systems to interact directly with Sitecore XM Cloud. It represents a major step in Sitecore’s interoperability strategy, enabling natural-language-driven automation across your websites, assets, and personalization.

What Is the Agent API?

At its core, the Agent API acts as a bridge between agentic platforms and your digital experience platform. When an AI agent receives a request like:

“Create a new summer campaign landing page and add a hero banner.”

The agent can translate that request into API calls that:

  • Create a page
  • Add components
  • Associate datasources
  • Upload or reference assets
  • Even apply personalization variants

And critically, every action is governed by Sitecore’s built-in security rules and logged with a job ID so you can review or revert changes when needed.

This is automation you can trust.

Key Capabilities of the Agent API

The Agent API exposes clear operations across several core functional areas:

1. Sites

Retrieve and manage sites, list pages, and determine which site content belongs to.

2. Pages

Create pages, add components, add language versions, inspect page structure, retrieve HTML or screenshots, and more.

3. Content

Perform full CRUD operations on content items while respecting templates and content hierarchies.

4. Components

Retrieve components, read component configuration, and create or search datasources for component-driven content.

5. Assets

Upload digital assets and manage metadata like alt text, tags, and descriptions.

6. Personalization

Programmatically define audience-based content variations using condition templates and page variants.

7. Environment Details

Retrieve available languages and configuration details to ensure multi-language content workflows work smoothly.

8. Jobs

Every AI-driven change is traceable. View job history or revert a job to restore the previous state.

This structure enables a full range of automated content operations—while maintaining the transparency and safety required by enterprise organizations.

Safe, Secure, and Auditable by Design

One of the most valuable features of the Agent API is the job-based auditing and rollback mechanism. If an automated process or AI agent makes an unintended change, you can simply revert the job—restoring the system to its previous state.

This ensures:

  • Full operational traceability
  • Accountability of automated actions
  • Confidence when enabling AI-driven workflows

In other words: AI gets to move fast — you keep control.

Authentication and Access Control

The Agent API uses OAuth 2.0 and JWT-based authentication. To get started, an Organization Admin can generate automation client credentials directly in Sitecore Cloud Portal. Once generated, your system requests a temporary JWT token and includes it in the header of each API call.

For external integrations or UI-based applications, you can also register OAuth apps with the required scopes (for example: xmcloud.cm:admin or personalization management scopes).

Authentication is flexible, secure, and aligns with modern enterprise identity patterns.

Real-World Use Cases

The Agent API unlocks powerful automation scenarios, such as:

AI-Driven Page Creation

Marketing teams describe page requirements in natural language, and an AI agent builds it—components, layout, content, and metadata included.

Bulk Localization

Automatically create language versions across multiple sites.

Personalization at Scale

Let AI generate variants targeted to different audiences or behavioral segments.

Asset Ingestion and Tagging

Upload assets and apply consistent metadata automatically.

Content Restructuring and Migration

Move or transform large content structures safely and programmatically.

The Marketer MCP Connection

The Agent API also powers Sitecore’s Marketer MCP, enabling conversational assistants (including those in platforms like Claude) to interact directly with Sitecore. This means marketers can ask for updates, and the system executes them through secure agentic operations.

This is the future of CMS workflows: natural language → secure automated action.

Looking Ahead

The Agent API signals a shift in how organizations will build and manage digital experiences. CMS platforms are no longer passive tools—they are collaborative systems, where humans guide strategy and AI executes structured workflows.

With built-in governance, deep integration with XM Cloud, and extensive operational APIs, the Agent API provides a foundation for the next generation of intelligent digital experience delivery.

Get Started Today

The Agent API is available now to Sitecore XM Cloud customers. To learn more, explore the full API reference and begin building your first agent-driven workflows:

👉 Documentation: https://api-docs.sitecore.com/ai-capabilities/agent-api

👉 Marketer MCP: https://doc.sitecore.com/xmc/en/users/xm-cloud/marketer-mcp.html

The future of digital experience starts here.