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
12 changes: 10 additions & 2 deletions src/System Application/App/MCP/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,20 @@
"help": "https://go.microsoft.com/fwlink/?linkid=2103698",
"url": "https://go.microsoft.com/fwlink/?linkid=724011",
"logo": "",
"dependencies": [{
"dependencies": [
{
"id": "2673d810-273e-402f-9093-2eaef7e03b83",
"name": "Environment Information",
"publisher": "Microsoft",
"version": "28.0.0.0"
}],
},
{
"id": "ae59aed1-040c-453c-9585-fe9da2f8211e",
"name": "Feature Key",
"publisher": "Microsoft",
"version": "28.0.0.0"
}
],
"internalsVisibleTo": [{
"id": "ef6e70f1-8b0c-4759-b15e-d83e6ad33e45",
"name": "MCP Test Library",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
namespace System.MCP;

using System.Environment;
#if not CLEAN28
using System.Environment.Configuration;
#endif
using System.Reflection;

codeunit 8351 "MCP Config Implementation"
Expand Down Expand Up @@ -337,4 +340,14 @@ codeunit 8351 "MCP Config Implementation"
if not MCPConfiguration.AllowProdChanges then
Error(ProdChangesNotAllowedErr);
end;

#if not CLEAN28
internal procedure IsFeatureEnabled(): Boolean
var
FeatureManagementFacade: Codeunit "Feature Management Facade";
EnableMcpAccessTok: Label 'EnableMcpAccess', Locked = true;
begin
exit(FeatureManagementFacade.IsEnabled(EnableMcpAccessTok));
end;
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ page 8351 "MCP Config Card"
}
field(EnableDynamicToolMode; Rec.EnableDynamicToolMode)
{
ToolTip = 'Specifies whether to enable dynamic tool mode for this MCP configuration. When enabled, clients can search for tools dynamically.';
ToolTip = 'Specifies whether to enable dynamic tool mode for this MCP configuration. When enabled, clients can search for tools within the configuration dynamically.';
}
field(AllowProdChanges; Rec.AllowProdChanges)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

namespace System.MCP;

#if not CLEAN28
using System.Environment.Configuration;
#endif

page 8350 "MCP Config List"
{
PageType = List;
Expand Down Expand Up @@ -39,4 +43,24 @@ page 8350 "MCP Config List"
}
}
}

#if not CLEAN28
trigger OnOpenPage()
var
MCPConfigImplementation: Codeunit "MCP Config Implementation";
FeatureNotEnabledErrorInfo: ErrorInfo;
begin
if MCPConfigImplementation.IsFeatureEnabled() then
exit;

FeatureNotEnabledErrorInfo.Message := FeatureNotEnabledErr;
FeatureNotEnabledErrorInfo.AddNavigationAction(GoToFeatureManagementLbl);
FeatureNotEnabledErrorInfo.PageNo := Page::"Feature Management";
Error(FeatureNotEnabledErrorInfo);
end;

var
FeatureNotEnabledErr: Label 'MCP server feature is not enabled. Please contact your system administrator to enable the feature.';
GoToFeatureManagementLbl: Label 'Go to Feature Management';
#endif
}
Loading