Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,14 @@ private static (List<object> updatedServers, int addedCount, int updatedCount) U
var audience = catalogEntry.TryGetProperty("audience", out var audienceElement) ? audienceElement.GetString() : null;
var publisher = catalogEntry.TryGetProperty("publisher", out var publisherElement) ? publisherElement.GetString() : null;

// Override catalog scope/audience with static mapping when available.
var (mappedScope, mappedAudience) = McpConstants.ServerScopeMappings.GetScopeAndAudience(existingServerName);
if (!string.IsNullOrWhiteSpace(mappedScope))
{
scope = mappedScope;
audience = McpConstants.WorkIQToolsProdAppId;
}
Comment on lines +830 to +836

var updatedServerObject = ManifestHelper.CreateCompleteServerObject(existingServerName, existingServerName, url, scope, audience, publisher);
updatedServers.Add(updatedServerObject);
updatedCount++;
Expand Down Expand Up @@ -897,6 +905,16 @@ private static (List<object> updatedServers, int addedCount, int updatedCount) U
var audience = catalogEntry.TryGetProperty("audience", out var audienceElement) ? audienceElement.GetString() : null;
var publisher = catalogEntry.TryGetProperty("publisher", out var publisherElement) ? publisherElement.GetString() : null;

// Override catalog scope/audience with static mapping when available.
// This protects against stale catalog data where the catalog advertises V2
// scope/audience but the server still enforces a V1 scope.
var (mappedScope, mappedAudience) = McpConstants.ServerScopeMappings.GetScopeAndAudience(serverName);
if (!string.IsNullOrWhiteSpace(mappedScope))
Comment on lines +908 to +912
{
scope = mappedScope;
audience = McpConstants.WorkIQToolsProdAppId;
}
Comment on lines +908 to +916

var serverObject = ManifestHelper.CreateCompleteServerObject(serverName, serverName, url, scope, audience, publisher);
updatedServers.Add(serverObject);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ public static class ServerScopeMappings
["MeMCPServer"] = ("McpServers.Me.All", "api://mcp-meserver"),

// Admin servers
["mcp_Admin365_GraphTools"] = ("McpServers.Admin365.All", "api://mcp-admin365graphtools")
["mcp_Admin365_GraphTools"] = ("McpServers.Admin365.All", "api://mcp-admin365graphtools"),

// Copilot servers
["mcp_M365Copilot"] = ("McpServers.CopilotMCP.All", "api://mcp-m365copilot")
};

/// <summary>
Expand Down
Loading