Kentico组件注册表的Xperience
| 程序包 | NuGet |
|---|---|
| 肯蒂科。Xperience。组件注册表 | ](https://www.nuget.org/packages/Kentico.Xperience.ComponentRegistry) |
| 肯蒂科。Xperience。组件注册表。管理员 | ](https://www.nuget.org/packages/Kentico.Xperience.ComponentRegistry.Admin) |
| 肯蒂科。Xperience。组件注册表。MCP | ](https://www.nuget.org/packages/Kentico.Xperience.ComponentRegistry.MCP) |
描述
此项目使管理员能够查看Xperience by Kentico应用程序中所有已注册的自定义组件,如页面生成器小部件,并通过Xperience管理中的友好用户界面探索哪些频道和网页使用这些组件。
它可以选择在应用程序内托管的MCP服务器上公开整个组件注册表,使代理能够识别跨通道使用组件的位置,甚至可以使用组件访问页面生成器页面,以直观地验证其配置和设计。
对这个库是如何以及为什么创建的感兴趣?阅读博客文章 梦想与实验:用AI构建组件注册表仪表板.
截图
需求
库版本矩阵
| Xperience版本 | 库版本 |
|---|---|
| >= 31.2.1 | 1.0.0 |
依赖项
软件包安装
使用将这些包添加到您的应用程序中。NET CLI。
核心包添加了集成的注册表服务。
dotnet add package Kentico.Xperience.ComponentRegistry管理包将组件注册表管理UI应用程序添加到项目中。
dotnet add package Kentico.Xperience.ComponentRegistry.AdminMCP项目添加了组件注册表MCP工具,您可以在应用程序的MCP服务器上注册这些工具。
dotnet add package Kentico.Xperience.ComponentRegistry.MCP快速开始
- 通过Kentico ASP将Admin和MCP NuGet包添加到您的Xperience中。NET核心应用程序。
- 注册集成的服务、MCP支持服务、MCP服务器和集成的MCP工具:
// ...
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
}
// ...- 在中间件管道中启用MCP服务器:
// ...
app.Kentico().MapRoutes();
if (env.IsDevelopment())
{
app.MapMcp("/mcp"); // Host application is responsible for adding the endpoint
}
// ...- 为支持AI的开发工具配置MCP服务器
{
"servers": {
"kentico.docs.mcp": {
"type": "http",
"url": "https://docs.kentico.com/mcp"
},
"your-app": {
"type": "http",
"url": "http://localhost:18319/mcp"
}
}
}\[!警告\] 如果在生产环境中使用,MCP服务器会在没有任何身份验证的情况下公开草稿内容数据。MCP服务器功能是 仅适用于开发环境. 使用 环境识别扩展 或 环境特定设置 禁用MCP服务器进行非本地部署。
完整说明
查看 使用指南 有关权限管理和自定义场景的更详细说明。
贡献
为以下内容做出贡献的说明和技术细节 这 项目可以在 贡献设置.
许可证
根据MIT许可证分发。看 LICENSE.md 了解更多信息。
支持

该项目已 Kentico Labs有限支持.
看 SUPPORT.md 了解更多信息。
有关任何安全问题,请参阅 SECURITY.md.
