Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ServiceControl/HostApplicationBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace Particular.ServiceControl
using global::ServiceControl.Infrastructure.Metrics;
using global::ServiceControl.Infrastructure.SignalR;
using global::ServiceControl.Infrastructure.WebApi;
using global::ServiceControl.Mcp;
using global::ServiceControl.Notifications.Email;
using global::ServiceControl.Persistence;
using global::ServiceControl.Transports;
Expand Down Expand Up @@ -56,6 +57,7 @@ public static void AddServiceControl(this IHostApplicationBuilder hostBuilder, S
services.AddSingleton<MessageStreamerHub>();
services.AddSingleton(settings);
services.AddEnvironmentDataProvider<ServiceControlErrorInstanceEnvironmentDataProvider>();
services.AddEnvironmentDataProvider<McpEnvironmentDataProvider>();

services.AddHttpLogging(options =>
{
Expand Down
14 changes: 14 additions & 0 deletions src/ServiceControl/Mcp/McpEnvironmentDataProvider.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace ServiceControl.Mcp;

using System.Collections.Generic;
using Particular.LicensingComponent.Contracts;
using ServiceBus.Management.Infrastructure.Settings;

class McpEnvironmentDataProvider(Settings settings) : IEnvironmentDataProvider
{
public IEnumerable<(string key, string value)> GetData()
{
yield return ("Features.Mcp", settings.EnableMcpServer ? "Enabled" : "Disabled");
yield return ("Features.Mcp.WriteMode", settings.EnableMcpServerWriteMode ? "Enabled" : "Disabled");
}
}
Loading