组件注册表

组件注册表是面向 Xperience by Kentico 管理员的组件可视化管理工具,可统一查看 Page Builder、Email Builder、Form Builder 和 Automation Builder 中注册的自定义组件及其在渠道、页面、表单、邮件和自动化流程中的使用情况,并通过内置 MCP 服务器为 AI 代理提供组件定位与页面验证能力。

  • by Kentico
  • C#
  • 本地部署
  • 3 星标
  • 更新于
在 GitHub 查看 Kentico/xperience-by-kentico-component-registry

使用说明

Xperience by Kentico Labs: Component Registry

Package NuGet
Kentico.Xperience.Labs.ComponentRegistry
Kentico.Xperience.Labs.ComponentRegistry.Admin
Kentico.Xperience.Labs.ComponentRegistry.MCP

[!NOTE] Migrating from Kentico.Xperience.ComponentRegistry*? These packages were renamed to Kentico.Xperience.Labs.ComponentRegistry* (final release under the old IDs: 2.0.0). Version 3.0.0 adds the Automation Builder registry (custom automation triggers, actions, and conditions) and includes breaking API changes. Swap your package references and update using statements to Kentico.Xperience.Labs.ComponentRegistry.

Description

This project enables administrators to view all registered custom components in an Xperience by Kentico application, like Page Builder widgets or custom automation steps, and explore which channels, web pages, forms, emails, and automation processes use those components all through a friendly user interface in the Xperience administration.

A Structure (Labs) tab on web pages and Email Builder emails visualizes the Page Builder or Email Builder configuration (template, editable areas, sections, zones, widgets, and personalized variants) and flags components that are no longer registered.

It optionally exposes the entire component registry over an in-application hosted MCP server, giving agents the ability to identify where components are used across channels, and even visit Page Builder pages using components to visually validate their configuration and design.

Interested in how and why this library was created? Read the blog post Dream and Experiment: Building a Component Registry Dashboard with AI.

Screenshots

Requirements

Library Version Matrix

Xperience Version Library Version Package ID
>= 31.9.2 >= 3.0.0 Kentico.Xperience.Labs.ComponentRegistry*
>= 31.9.2 2.0.0 (final) Kentico.Xperience.ComponentRegistry*
>= 31.2.1 1.0.0 - 1.0.1 Kentico.Xperience.ComponentRegistry*

Dependencies

Package Installation

Add these package to your application using the .NET CLI.

The core package adds the integration's registry services.

dotnet add package Kentico.Xperience.Labs.ComponentRegistry

The admin package adds the component registry administration UI application to the project.

dotnet add package Kentico.Xperience.Labs.ComponentRegistry.Admin

The MCP project adds Component Registry MCP tools that you can register on your application's MCP server.

dotnet add package Kentico.Xperience.Labs.ComponentRegistry.MCP

Quick Start

  1. Add the Admin and MCP NuGet packages to your Xperience by Kentico ASP.NET Core application.

  2. Register the integration's services, MCP support services, an MCP server and the integration's MCP tools:

    // ...
    builder.Services.AddComponentRegistry(); // Adds this library's services
    if (env.IsDevelopment())
    {
       builder.Services
         .AddComponentRegistryMcpServices() // Adds MCP support services for URL generation
         .AddMcpServer() // Host application is responsible for adding the McpServer
         .WithHttpTransport()
         .WithComponentRegistryTools(); // Adds this library's MCP tools
    }
    // ...
    
  3. Enable the MCP server in the middleware pipeline:

    // ...
    app.Kentico().MapRoutes();
    
    if (env.IsDevelopment())
    {
       app.MapMcp("/mcp"); // Host application is responsible for adding the endpoint
    }
    // ...
    
  4. Configure your MCP server for your AI enabled development tool

    {
      "servers": {
        "kentico.docs.mcp": {
          "type": "http",
          "url": "https://docs.kentico.com/mcp"
        },
        "your-app": {
          "type": "http",
          "url": "http://localhost:18319/mcp"
        }
      }
    }
    

[!WARNING] If used in a production environment, the MCP server exposes draft content data without any authentication. The MCP server feature is intended for development-environments only.

Use environment identification extensions or environment specific settings to disable the MCP server for non-local deployments.

Full Instructions

View the Usage Guide for more detailed instructions on permission management and custom scenarios.

Contributing

To see the guidelines for Contributing to Kentico open source software, please see Kentico's CONTRIBUTING.md for more information and follow the Kentico's CODE_OF_CONDUCT.

Instructions and technical details for contributing to this project can be found in Contributing Setup.

License

Distributed under the MIT License. See LICENSE.md for more information.

Support

This project has Kentico Labs limited support.

See SUPPORT.md for more information.

For any security issues see SECURITY.md.