From a3b8bf29c71944d48c248cb2b370729fc78fde5d Mon Sep 17 00:00:00 2001 From: alzimmermsft <48699787+alzimmermsft@users.noreply.github.com> Date: Thu, 19 Feb 2026 10:39:40 -0500 Subject: [PATCH 1/6] Fix Server.Commands.Discovery and Runtime namespaces --- .../Discovery/BaseDiscoveryStrategyTests.cs | 2 +- .../CommandGroupDiscoveryStrategyTests.cs | 1 + .../CommandGroupServerProviderTests.cs | 2 +- .../CompositeDiscoveryStrategyTests.cs | 36 +++++++++---------- .../ConsolidatedToolDiscoveryStrategyTests.cs | 1 - .../RegistryDiscoveryStrategyTests.cs | 3 +- .../Discovery/RegistryServerProviderTests.cs | 2 +- .../Commands/Runtime/McpRuntimeTests.cs | 4 +-- .../ServiceCollectionExtensionsTests.cs | 4 +-- .../ToolLoading/NamespaceToolLoaderTests.cs | 3 +- .../ToolLoading/RegistryToolLoaderTests.cs | 2 +- .../ToolLoading/ServerToolLoaderTests.cs | 3 +- .../ToolLoading/SingleProxyToolLoaderTests.cs | 4 +-- .../MockMcpDiscoveryStrategyBuilder.cs | 4 +-- .../RegistryDiscoveryStrategyHelper.cs | 2 +- .../Discovery/BaseDiscoveryStrategy.cs | 2 +- .../CommandGroupDiscoveryStrategy.cs | 2 +- .../Discovery/CommandGroupServerProvider.cs | 2 +- .../Discovery/CompositeDiscoveryStrategy.cs | 2 +- .../ConsolidatedToolDiscoveryStrategy.cs | 13 ++++--- .../ConsolidatedToolServerProvider.cs | 2 +- .../Commands/Discovery/DiscoveryConstants.cs | 2 +- .../Commands/Discovery/IDiscoveryStrategy.cs | 2 +- .../Commands/Discovery/IMcpServerProvider.cs | 28 +++++++++++++++ .../Commands/Discovery/McpServerMetadata.cs | 25 +------------ .../Discovery/RegistryDiscoveryStrategy.cs | 2 +- .../Discovery/RegistryServerProvider.cs | 2 +- .../Server/Commands/Runtime/IMcpRuntime.cs | 2 +- .../Server/Commands/Runtime/McpRuntime.cs | 2 +- .../Commands/ServiceCollectionExtensions.cs | 4 +-- .../ToolLoading/NamespaceToolLoader.cs | 2 +- .../ToolLoading/RegistryToolLoader.cs | 2 +- .../Commands/ToolLoading/ServerToolLoader.cs | 2 +- .../ToolLoading/SingleProxyToolLoader.cs | 2 +- .../src/Helpers/RegistryServerHelper.cs | 2 +- .../ToolLoading/ToolLoaderTelemetryTests.cs | 2 +- 36 files changed, 93 insertions(+), 84 deletions(-) create mode 100644 core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/IMcpServerProvider.cs diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/BaseDiscoveryStrategyTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/BaseDiscoveryStrategyTests.cs index 280142c1a5..59ef378927 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/BaseDiscoveryStrategyTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/BaseDiscoveryStrategyTests.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using ModelContextProtocol.Client; using NSubstitute; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategyTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategyTests.cs index a7ccc23cd3..0ff32c14e5 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategyTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategyTests.cs @@ -5,6 +5,7 @@ using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Azure.Mcp.Tests.Client.Helpers; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Xunit; namespace Azure.Mcp.Core.UnitTests.Areas.Server.Commands.Discovery; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CommandGroupServerProviderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CommandGroupServerProviderTests.cs index 6b5ac5a2f7..b030f47ca3 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CommandGroupServerProviderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CommandGroupServerProviderTests.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; using Azure.Mcp.Core.Commands; using Azure.Mcp.Tests.Client.Helpers; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Commands; using ModelContextProtocol.Client; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CompositeDiscoveryStrategyTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CompositeDiscoveryStrategyTests.cs index b3eb1de9e6..703d15dbb9 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CompositeDiscoveryStrategyTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CompositeDiscoveryStrategyTests.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using NSubstitute; using Xunit; @@ -42,7 +42,7 @@ public void Constructor_WithValidStrategies_InitializesCorrectly() var strategy2 = Substitute.For(); // Act - var composite = CreateCompositeStrategy(new[] { strategy1, strategy2 }); + var composite = CreateCompositeStrategy([strategy1, strategy2]); // Assert Assert.NotNull(composite); @@ -89,7 +89,7 @@ public async Task DiscoverServersAsync_WithSingleStrategy_ReturnsProvidersFromTh var provider1 = CreateMockProvider("test1"); var provider2 = CreateMockProvider("test2"); var strategy = CreateMockStrategy(provider1, provider2); - var composite = CreateCompositeStrategy(new[] { strategy }); + var composite = CreateCompositeStrategy([strategy]); // Act var result = (await composite.DiscoverServersAsync(TestContext.Current.CancellationToken)).ToList(); @@ -111,7 +111,7 @@ public async Task DiscoverServersAsync_WithMultipleStrategies_AggregatesAllResul var strategy1 = CreateMockStrategy(provider1, provider2); var strategy2 = CreateMockStrategy(provider3, provider4); - var composite = CreateCompositeStrategy(new[] { strategy1, strategy2 }); + var composite = CreateCompositeStrategy([strategy1, strategy2]); // Act var result = (await composite.DiscoverServersAsync(TestContext.Current.CancellationToken)).ToList(); @@ -133,7 +133,7 @@ public async Task DiscoverServersAsync_WithStrategiesReturningEmpty_HandlesGrace var emptyStrategy1 = CreateMockStrategy(); // No providers var emptyStrategy2 = CreateMockStrategy(); // No providers - var composite = CreateCompositeStrategy(new[] { activeStrategy, emptyStrategy1, emptyStrategy2 }); + var composite = CreateCompositeStrategy([activeStrategy, emptyStrategy1, emptyStrategy2]); // Act var result = (await composite.DiscoverServersAsync(TestContext.Current.CancellationToken)).ToList(); @@ -149,7 +149,7 @@ public async Task DiscoverServersAsync_WithAllEmptyStrategies_ReturnsEmptyCollec // Arrange var emptyStrategy1 = CreateMockStrategy(); var emptyStrategy2 = CreateMockStrategy(); - var composite = CreateCompositeStrategy(new[] { emptyStrategy1, emptyStrategy2 }); + var composite = CreateCompositeStrategy([emptyStrategy1, emptyStrategy2]); // Act var result = await composite.DiscoverServersAsync(TestContext.Current.CancellationToken); @@ -171,7 +171,7 @@ public async Task DiscoverServersAsync_ExecutesAllStrategiesInParallel() var strategy2 = CreateMockStrategy(provider2); var strategy3 = CreateMockStrategy(provider3); - var composite = CreateCompositeStrategy(new[] { strategy1, strategy2, strategy3 }); + var composite = CreateCompositeStrategy([strategy1, strategy2, strategy3]); // Act var result = (await composite.DiscoverServersAsync(TestContext.Current.CancellationToken)).ToList(); @@ -200,7 +200,7 @@ public async Task DiscoverServersAsync_PreservesOrderFromStrategies() var strategy1 = CreateMockStrategy(provider1, provider2); var strategy2 = CreateMockStrategy(provider3, provider4); - var composite = CreateCompositeStrategy(new[] { strategy1, strategy2 }); + var composite = CreateCompositeStrategy([strategy1, strategy2]); // Act var result = (await composite.DiscoverServersAsync(TestContext.Current.CancellationToken)).ToList(); @@ -221,7 +221,7 @@ public async Task DiscoverServersAsync_CanBeCalledMultipleTimes() var provider1 = CreateMockProvider("provider1"); var provider2 = CreateMockProvider("provider2"); var strategy = CreateMockStrategy(provider1, provider2); - var composite = CreateCompositeStrategy(new[] { strategy }); + var composite = CreateCompositeStrategy([strategy]); // Act var result1 = (await composite.DiscoverServersAsync(TestContext.Current.CancellationToken)).ToList(); @@ -246,7 +246,7 @@ public async Task DiscoverServersAsync_WithDuplicateProviders_IncludesAllProvide var strategy1 = CreateMockStrategy(provider1); var strategy2 = CreateMockStrategy(provider2); - var composite = CreateCompositeStrategy(new[] { strategy1, strategy2 }); + var composite = CreateCompositeStrategy([strategy1, strategy2]); // Act var result = (await composite.DiscoverServersAsync(TestContext.Current.CancellationToken)).ToList(); @@ -263,7 +263,7 @@ public async Task DiscoverServersAsync_InheritsFromBaseDiscoveryStrategy() { // Arrange var strategy = CreateMockStrategy(); - var composite = CreateCompositeStrategy(new[] { strategy }); + var composite = CreateCompositeStrategy([strategy]); // Act & Assert Assert.IsAssignableFrom(composite); @@ -281,9 +281,9 @@ public async Task ShouldAggregateResults() var mockStrategy2 = Substitute.For(); var provider1 = Substitute.For(); var provider2 = Substitute.For(); - mockStrategy1.DiscoverServersAsync(TestContext.Current.CancellationToken).Returns(Task.FromResult>(new[] { provider1 })); - mockStrategy2.DiscoverServersAsync(TestContext.Current.CancellationToken).Returns(Task.FromResult>(new[] { provider2 })); - var composite = CreateCompositeStrategy(new[] { mockStrategy1, mockStrategy2 }); + mockStrategy1.DiscoverServersAsync(TestContext.Current.CancellationToken).Returns(Task.FromResult>([provider1])); + mockStrategy2.DiscoverServersAsync(TestContext.Current.CancellationToken).Returns(Task.FromResult>([provider2])); + var composite = CreateCompositeStrategy([mockStrategy1, mockStrategy2]); var result = await composite.DiscoverServersAsync(TestContext.Current.CancellationToken); Assert.Contains(provider1, result); Assert.Contains(provider2, result); @@ -298,9 +298,9 @@ public async Task ShouldAggregateResults_ReturnsAllProviders() var provider2 = Substitute.For(); provider1.CreateMetadata().Returns(new McpServerMetadata { Id = "one", Name = "one", Description = "desc1" }); provider2.CreateMetadata().Returns(new McpServerMetadata { Id = "two", Name = "two", Description = "desc2" }); - mockStrategy1.DiscoverServersAsync(TestContext.Current.CancellationToken).Returns(Task.FromResult>(new[] { provider1 })); - mockStrategy2.DiscoverServersAsync(TestContext.Current.CancellationToken).Returns(Task.FromResult>(new[] { provider2 })); - var composite = CreateCompositeStrategy(new[] { mockStrategy1, mockStrategy2 }); + mockStrategy1.DiscoverServersAsync(TestContext.Current.CancellationToken).Returns(Task.FromResult>([provider1])); + mockStrategy2.DiscoverServersAsync(TestContext.Current.CancellationToken).Returns(Task.FromResult>([provider2])); + var composite = CreateCompositeStrategy([mockStrategy1, mockStrategy2]); var result = (await composite.DiscoverServersAsync(TestContext.Current.CancellationToken)).ToList(); Assert.Equal(2, result.Count); Assert.Contains(result, p => p.CreateMetadata().Id == "one"); @@ -312,7 +312,7 @@ public async Task DiscoverServersAsync_WithSingleEmptyStrategy_ReturnsEmptyColle { // Arrange var emptyStrategy = CreateMockStrategy(); // No providers - var composite = CreateCompositeStrategy(new[] { emptyStrategy }); + var composite = CreateCompositeStrategy([emptyStrategy]); // Act var result = await composite.DiscoverServersAsync(TestContext.Current.CancellationToken); diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategyTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategyTests.cs index a580cce99d..c9739371d7 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategyTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategyTests.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.DependencyInjection; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategyTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategyTests.cs index 579a8e84ca..5ff365d6b2 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategyTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategyTests.cs @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; using Azure.Mcp.Core.Areas.Server.Options; -using Azure.Mcp.Core.Helpers; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Xunit; namespace Azure.Mcp.Core.UnitTests.Areas.Server.Commands.Discovery; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryServerProviderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryServerProviderTests.cs index 27b68ee830..dab2771cee 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryServerProviderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryServerProviderTests.cs @@ -3,8 +3,8 @@ using System.Net; using System.Net.Sockets; -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; using Azure.Mcp.Core.Areas.Server.Models; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using ModelContextProtocol.Client; using NSubstitute; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs index ed7f78ae5f..d3dcc093b0 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs @@ -3,13 +3,13 @@ using System.Diagnostics; using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands.Runtime; using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Models.Option; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Services.Telemetry; using ModelContextProtocol.Protocol; @@ -91,7 +91,7 @@ public void Constructor_WithValidParameters_InitializesCorrectly() // Assert Assert.NotNull(runtime); Assert.IsType(runtime); - Assert.IsAssignableFrom(runtime); + Assert.IsType(runtime, exactMatch: false); } [Fact] diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs index 6b24c90b4f..04c93cd844 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs @@ -3,13 +3,13 @@ using Azure.Mcp.Core.Areas.Server; using Azure.Mcp.Core.Areas.Server.Commands; -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; -using Azure.Mcp.Core.Areas.Server.Commands.Runtime; using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Services.Azure.Authentication; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; +using Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; using ModelContextProtocol.Server; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/NamespaceToolLoaderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/NamespaceToolLoaderTests.cs index 36d7e14bef..681b43b135 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/NamespaceToolLoaderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/NamespaceToolLoaderTests.cs @@ -8,6 +8,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using ModelContextProtocol.Protocol; using NSubstitute; using Xunit; @@ -561,7 +562,7 @@ await Assert.ThrowsAsync(async () => private string GetFirstAvailableNamespace() { var namespaces = _commandFactory.RootGroup.SubGroup - .Where(g => !Azure.Mcp.Core.Areas.Server.Commands.Discovery.DiscoveryConstants.IgnoredCommandGroups.Contains(g.Name, StringComparer.OrdinalIgnoreCase)) + .Where(g => !DiscoveryConstants.IgnoredCommandGroups.Contains(g.Name, StringComparer.OrdinalIgnoreCase)) .Select(g => g.Name) .ToList(); diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/RegistryToolLoaderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/RegistryToolLoaderTests.cs index 1227917caf..8ec8d86821 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/RegistryToolLoaderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/RegistryToolLoaderTests.cs @@ -2,11 +2,11 @@ // Licensed under the MIT License. using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.UnitTests.Areas.Server.Helpers; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using ModelContextProtocol.Client; using ModelContextProtocol.Protocol; using NSubstitute; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ServerToolLoaderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ServerToolLoaderTests.cs index 4aa1ac52ff..fd8d72b077 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ServerToolLoaderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ServerToolLoaderTests.cs @@ -2,12 +2,11 @@ // Licensed under the MIT License. using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Areas.Server.Options; -using Azure.Mcp.Core.Helpers; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using ModelContextProtocol.Protocol; using NSubstitute; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/SingleProxyToolLoaderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/SingleProxyToolLoaderTests.cs index f5281320f6..cbb3ad2a08 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/SingleProxyToolLoaderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/SingleProxyToolLoaderTests.cs @@ -2,12 +2,12 @@ // Licensed under the MIT License. using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Helpers; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using ModelContextProtocol.Protocol; using NSubstitute; using Xunit; @@ -76,7 +76,7 @@ private static ModelContextProtocol.Server.RequestContext Params = new CallToolRequestParams { Name = toolName, - Arguments = arguments ?? new Dictionary() + Arguments = arguments ?? [] } }; } diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Helpers/MockMcpDiscoveryStrategyBuilder.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Helpers/MockMcpDiscoveryStrategyBuilder.cs index bf173d996e..6da8042cb5 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Helpers/MockMcpDiscoveryStrategyBuilder.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Helpers/MockMcpDiscoveryStrategyBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using ModelContextProtocol.Client; using NSubstitute; using Xunit; @@ -14,7 +14,7 @@ namespace Azure.Mcp.Core.UnitTests.Areas.Server.Helpers; /// public sealed class MockMcpDiscoveryStrategyBuilder { - private readonly List _providers = new(); + private readonly List _providers = []; /// /// Initializes a new instance of the MockMcpDiscoveryStrategyBuilder. diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/RegistryDiscoveryStrategyHelper.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/RegistryDiscoveryStrategyHelper.cs index 28a91ff843..a1c9fd0f3e 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/RegistryDiscoveryStrategyHelper.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/RegistryDiscoveryStrategyHelper.cs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Helpers; using Microsoft.Extensions.Logging; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; namespace Azure.Mcp.Core.UnitTests; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/BaseDiscoveryStrategy.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/BaseDiscoveryStrategy.cs index 0e37556ffa..5e31c77724 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/BaseDiscoveryStrategy.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/BaseDiscoveryStrategy.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.Logging; using ModelContextProtocol.Client; -namespace Azure.Mcp.Core.Areas.Server.Commands.Discovery; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; /// /// Base class for MCP server discovery strategies that provides common functionality. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategy.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategy.cs index 6e8ac34f40..b21c31cef4 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategy.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategy.cs @@ -6,7 +6,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -namespace Azure.Mcp.Core.Areas.Server.Commands.Discovery; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; /// /// Discovery strategy that exposes command groups as MCP servers. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupServerProvider.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupServerProvider.cs index b0d517391c..6276def66c 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupServerProvider.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupServerProvider.cs @@ -5,7 +5,7 @@ using Microsoft.Mcp.Core.Commands; using ModelContextProtocol.Client; -namespace Azure.Mcp.Core.Areas.Server.Commands.Discovery; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; /// /// Represents a command group that provides metadata and MCP client creation. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CompositeDiscoveryStrategy.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CompositeDiscoveryStrategy.cs index 3b63315bc3..3084433cf5 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CompositeDiscoveryStrategy.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CompositeDiscoveryStrategy.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Logging; -namespace Azure.Mcp.Core.Areas.Server.Commands.Discovery; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; /// /// A discovery strategy that combines multiple discovery strategies into one. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategy.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategy.cs index 86343deb41..0b2f3ec22e 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategy.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategy.cs @@ -2,18 +2,18 @@ // Licensed under the MIT License. using System.Reflection; +using Azure.Mcp.Core.Areas.Server; using Azure.Mcp.Core.Areas.Server.Models; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Microsoft.Mcp.Core.Areas; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Configuration; using Microsoft.Mcp.Core.Services.Telemetry; -namespace Azure.Mcp.Core.Areas.Server.Commands.Discovery; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; /// /// Discovery strategy that exposes command groups as MCP servers. @@ -23,7 +23,12 @@ namespace Azure.Mcp.Core.Areas.Server.Commands.Discovery; /// Options for configuring the service behavior. /// Configuration options for the Azure MCP server. /// Logger instance for this discovery strategy. -public sealed class ConsolidatedToolDiscoveryStrategy(ICommandFactory commandFactory, IServiceProvider serviceProvider, IOptions options, IOptions configurationOptions, ILogger logger) : BaseDiscoveryStrategy(logger) +public sealed class ConsolidatedToolDiscoveryStrategy( + ICommandFactory commandFactory, + IServiceProvider serviceProvider, + IOptions options, + IOptions configurationOptions, + ILogger logger) : BaseDiscoveryStrategy(logger) { private readonly ICommandFactory _commandFactory = commandFactory; private readonly IServiceProvider _serviceProvider = serviceProvider; @@ -222,7 +227,7 @@ private Dictionary FilterCommands(IReadOnlyDictionary public override Task> DiscoverServersAsync(CancellationToken cancellationToken) { - return Task.FromResult>(new List()); + return Task.FromResult>([]); } /// diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolServerProvider.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolServerProvider.cs index a7b377134b..1542e202a7 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolServerProvider.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolServerProvider.cs @@ -5,7 +5,7 @@ using Microsoft.Mcp.Core.Commands; using ModelContextProtocol.Client; -namespace Azure.Mcp.Core.Areas.Server.Commands.Discovery; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; /// /// Server provider that starts the azmcp server in "all" mode while explicitly diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/DiscoveryConstants.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/DiscoveryConstants.cs index 1d9a77fedf..b6d38ed072 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/DiscoveryConstants.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/DiscoveryConstants.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -namespace Azure.Mcp.Core.Areas.Server.Commands.Discovery; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; /// /// Constants used by discovery strategies and tool loaders. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/IDiscoveryStrategy.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/IDiscoveryStrategy.cs index 6d8b1e67d1..3c5a32f904 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/IDiscoveryStrategy.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/IDiscoveryStrategy.cs @@ -3,7 +3,7 @@ using ModelContextProtocol.Client; -namespace Azure.Mcp.Core.Areas.Server.Commands.Discovery; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; public interface IMcpDiscoveryStrategy : IAsyncDisposable { diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/IMcpServerProvider.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/IMcpServerProvider.cs new file mode 100644 index 0000000000..6fe6dcfaae --- /dev/null +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/IMcpServerProvider.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using ModelContextProtocol.Client; + +namespace Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; + +/// +/// Defines an interface for MCP server providers that can create server metadata and clients. +/// +public interface IMcpServerProvider +{ + /// + /// Creates metadata that describes this server provider. + /// + /// A metadata object containing the server's identity and description. + McpServerMetadata CreateMetadata(); + + /// + /// Creates an MCP client that can communicate with this server. + /// + /// Options to configure the client behavior. + /// A token to cancel the operation. + /// A configured MCP client ready for use. + /// Thrown when the server configuration doesn't specify a valid transport type (missing URL or stdio configuration). + /// Thrown when the server configuration is valid but client creation fails (e.g., missing command for stdio transport, dependency issues, or external process failures). + Task CreateClientAsync(McpClientOptions clientOptions, CancellationToken cancellationToken); +} diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/McpServerMetadata.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/McpServerMetadata.cs index 2c1cf3a3f0..cc1e2e8c6f 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/McpServerMetadata.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/McpServerMetadata.cs @@ -2,9 +2,8 @@ // Licensed under the MIT License. using Microsoft.Mcp.Core.Commands; -using ModelContextProtocol.Client; -namespace Azure.Mcp.Core.Areas.Server.Commands.Discovery; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; /// /// Represents metadata for an MCP server, including identification and descriptive information. @@ -39,25 +38,3 @@ public sealed class McpServerMetadata(string id = "", string name = "", string d /// public ToolMetadata? ToolMetadata { get; set; } } - -/// -/// Defines an interface for MCP server providers that can create server metadata and clients. -/// -public interface IMcpServerProvider -{ - /// - /// Creates metadata that describes this server provider. - /// - /// A metadata object containing the server's identity and description. - McpServerMetadata CreateMetadata(); - - /// - /// Creates an MCP client that can communicate with this server. - /// - /// Options to configure the client behavior. - /// A token to cancel the operation. - /// A configured MCP client ready for use. - /// Thrown when the server configuration doesn't specify a valid transport type (missing URL or stdio configuration). - /// Thrown when the server configuration is valid but client creation fails (e.g., missing command for stdio transport, dependency issues, or external process failures). - Task CreateClientAsync(McpClientOptions clientOptions, CancellationToken cancellationToken); -} diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategy.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategy.cs index 926193e93e..c7c0aa1a48 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategy.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategy.cs @@ -6,7 +6,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -namespace Azure.Mcp.Core.Areas.Server.Commands.Discovery; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; /// /// Discovers MCP servers from an embedded registry.json resource file. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryServerProvider.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryServerProvider.cs index 4047c34c28..9aaef5ac9a 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryServerProvider.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryServerProvider.cs @@ -5,7 +5,7 @@ using Azure.Mcp.Core.Helpers; using ModelContextProtocol.Client; -namespace Azure.Mcp.Core.Areas.Server.Commands.Discovery; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; /// /// Provides an MCP server implementation based on registry configuration. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/IMcpRuntime.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/IMcpRuntime.cs index 0b49e357d0..c0320adbe2 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/IMcpRuntime.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/IMcpRuntime.cs @@ -3,7 +3,7 @@ using ModelContextProtocol.Protocol; -namespace Azure.Mcp.Core.Areas.Server.Commands.Runtime; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; /// /// Defines the core functionality for a Model Context Protocol (MCP) runtime. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs index 57fc8c7122..e9fdc07b46 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs @@ -13,7 +13,7 @@ using Microsoft.Mcp.Core.Services.Telemetry; using ModelContextProtocol.Protocol; -namespace Azure.Mcp.Core.Areas.Server.Commands.Runtime; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; /// /// Implementation of the MCP runtime that delegates tool discovery and invocation to a tool loader. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs index 216da4eb00..9a56e14356 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs @@ -3,8 +3,6 @@ using System.Reflection; using System.Text; -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; -using Azure.Mcp.Core.Areas.Server.Commands.Runtime; using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; @@ -13,6 +11,8 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; +using Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; using Microsoft.Mcp.Core.Configuration; using ModelContextProtocol.Protocol; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs index 75ca5290f8..7091e8f7a9 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs @@ -4,12 +4,12 @@ using System.Diagnostics; using System.Net; using System.Text.Json.Nodes; -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; using Azure.Mcp.Core.Areas.Server.Models; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Helpers; using Microsoft.Mcp.Core.Models.Command; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/RegistryToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/RegistryToolLoader.cs index 09d7e88604..49178daeb8 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/RegistryToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/RegistryToolLoader.cs @@ -2,9 +2,9 @@ // Licensed under the MIT License. using System.Diagnostics; -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Commands; using ModelContextProtocol.Client; using ModelContextProtocol.Protocol; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs index 01d8b01c2c..6400e20a40 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs @@ -2,9 +2,9 @@ // Licensed under the MIT License. using System.Diagnostics; -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Commands; using ModelContextProtocol; using ModelContextProtocol.Client; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs index b752e88701..66d2ae564e 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs @@ -2,9 +2,9 @@ // Licensed under the MIT License. using System.Diagnostics; -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Extensions.Logging; using Microsoft.Mcp.Core.Areas; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Commands; using ModelContextProtocol; using ModelContextProtocol.Client; diff --git a/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs b/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs index d1dbd8f674..66cd159032 100644 --- a/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs +++ b/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs @@ -3,8 +3,8 @@ using System.Reflection; using Azure.Mcp.Core.Areas.Server; -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; using Azure.Mcp.Core.Areas.Server.Models; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; namespace Azure.Mcp.Core.Helpers; diff --git a/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ToolLoaderTelemetryTests.cs b/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ToolLoaderTelemetryTests.cs index 30d50d053c..d4d2396b7a 100644 --- a/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ToolLoaderTelemetryTests.cs +++ b/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ToolLoaderTelemetryTests.cs @@ -4,12 +4,12 @@ using System.CommandLine; using System.Diagnostics; using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands.Runtime; using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Models.Command; using Microsoft.Mcp.Core.Services.Telemetry; From f768dc207072d594ee799da5caa66e255f8c8f29 Mon Sep 17 00:00:00 2001 From: alzimmermsft <48699787+alzimmermsft@users.noreply.github.com> Date: Thu, 19 Feb 2026 10:53:03 -0500 Subject: [PATCH 2/6] Fix Server.Commands.ToolLoading namespaces --- .../Areas/Server/Commands/Runtime/McpRuntimeTests.cs | 2 +- .../Server/Commands/ServiceCollectionExtensionsTests.cs | 2 +- .../Server/Commands/ToolLoading/BaseToolLoaderTests.cs | 2 +- .../Commands/ToolLoading/CommandFactoryToolLoaderTests.cs | 2 +- .../Commands/ToolLoading/CompositeToolLoaderTests.cs | 2 +- .../Commands/ToolLoading/NamespaceToolLoaderTests.cs | 2 +- .../Commands/ToolLoading/RegistryToolLoaderTests.cs | 2 +- .../Server/Commands/ToolLoading/ServerToolLoaderTests.cs | 2 +- .../Commands/ToolLoading/SingleProxyToolLoaderTests.cs | 2 +- .../src/Areas/Server/Commands/Runtime/McpRuntime.cs | 2 +- .../Areas/Server/Commands/ServiceCollectionExtensions.cs | 2 +- .../Areas/Server/Commands/ToolLoading/BaseToolLoader.cs | 2 +- .../Commands/ToolLoading/CommandFactoryToolLoader.cs | 4 +++- .../Server/Commands/ToolLoading/CompositeToolLoader.cs | 4 ++-- .../src/Areas/Server/Commands/ToolLoading/IToolLoader.cs | 2 +- .../Server/Commands/ToolLoading/NamespaceToolLoader.cs | 6 ++++-- .../Server/Commands/ToolLoading/RegistryToolLoader.cs | 2 +- .../Areas/Server/Commands/ToolLoading/ServerToolLoader.cs | 3 ++- .../Server/Commands/ToolLoading/SingleProxyToolLoader.cs | 8 ++++---- .../Server/Commands/ToolLoading/ToolLoaderOptions.cs | 2 +- .../Commands/ToolLoading/ToolLoaderTelemetryTests.cs | 2 +- .../src/Options/Architecture/DiagramGenerateOptions.cs | 2 +- .../src/Options/DeployOptionDefinitions.cs | 2 +- 23 files changed, 33 insertions(+), 28 deletions(-) diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs index d3dcc093b0..e152a791ed 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs @@ -3,13 +3,13 @@ using System.Diagnostics; using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Models.Option; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; +using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Services.Telemetry; using ModelContextProtocol.Protocol; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs index 04c93cd844..517d4bc230 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs @@ -3,13 +3,13 @@ using Azure.Mcp.Core.Areas.Server; using Azure.Mcp.Core.Areas.Server.Commands; -using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Services.Azure.Authentication; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; +using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; using ModelContextProtocol.Server; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/BaseToolLoaderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/BaseToolLoaderTests.cs index 2750fcf84d..a80aa39a48 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/BaseToolLoaderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/BaseToolLoaderTests.cs @@ -2,9 +2,9 @@ // Licensed under the MIT License. using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; using ModelContextProtocol.Client; using ModelContextProtocol.Protocol; using ModelContextProtocol.Server; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoaderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoaderTests.cs index f99f65915f..8e93ac0591 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoaderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoaderTests.cs @@ -4,10 +4,10 @@ using System.CommandLine; using System.Net; using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; +using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Models.Command; using ModelContextProtocol.Protocol; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/CompositeToolLoaderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/CompositeToolLoaderTests.cs index 559994b4e7..971780bff8 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/CompositeToolLoaderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/CompositeToolLoaderTests.cs @@ -2,9 +2,9 @@ // Licensed under the MIT License. using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; +using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; using ModelContextProtocol.Protocol; using ModelContextProtocol.Server; using NSubstitute; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/NamespaceToolLoaderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/NamespaceToolLoaderTests.cs index 681b43b135..ed3be451e1 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/NamespaceToolLoaderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/NamespaceToolLoaderTests.cs @@ -2,13 +2,13 @@ // Licensed under the MIT License. using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; +using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; using ModelContextProtocol.Protocol; using NSubstitute; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/RegistryToolLoaderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/RegistryToolLoaderTests.cs index 8ec8d86821..bb6b8f5f3f 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/RegistryToolLoaderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/RegistryToolLoaderTests.cs @@ -2,11 +2,11 @@ // Licensed under the MIT License. using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.UnitTests.Areas.Server.Helpers; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; +using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; using ModelContextProtocol.Client; using ModelContextProtocol.Protocol; using NSubstitute; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ServerToolLoaderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ServerToolLoaderTests.cs index fd8d72b077..53751e58a6 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ServerToolLoaderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ServerToolLoaderTests.cs @@ -2,11 +2,11 @@ // Licensed under the MIT License. using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Areas.Server.Options; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; +using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; using ModelContextProtocol.Protocol; using NSubstitute; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/SingleProxyToolLoaderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/SingleProxyToolLoaderTests.cs index cbb3ad2a08..2922d6392c 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/SingleProxyToolLoaderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/SingleProxyToolLoaderTests.cs @@ -2,12 +2,12 @@ // Licensed under the MIT License. using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Helpers; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; +using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; using ModelContextProtocol.Protocol; using NSubstitute; using Xunit; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs index e9fdc07b46..6676457d30 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs @@ -3,11 +3,11 @@ using System.Diagnostics; using System.Text.Json.Nodes; -using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Models.Option; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Helpers; using Microsoft.Mcp.Core.Services.Telemetry; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs index 9a56e14356..57a65c32b3 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs @@ -3,7 +3,6 @@ using System.Reflection; using System.Text; -using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Azure.Mcp.Core.Helpers; @@ -13,6 +12,7 @@ using Microsoft.Extensions.Options; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; +using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; using Microsoft.Mcp.Core.Configuration; using ModelContextProtocol.Protocol; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/BaseToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/BaseToolLoader.cs index 7f37db54b9..c6bff80209 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/BaseToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/BaseToolLoader.cs @@ -5,7 +5,7 @@ using ModelContextProtocol.Client; using ModelContextProtocol.Protocol; -namespace Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; /// /// Base class for tool loaders that provides common functionality including disposal patterns. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs index d833f71bd8..1964bc1c40 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs @@ -4,6 +4,8 @@ using System.Diagnostics; using System.Net; using System.Text.Json.Nodes; +using Azure.Mcp.Core.Areas.Server; +using Azure.Mcp.Core.Areas.Server.Commands; using Azure.Mcp.Core.Areas.Server.Models; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.Logging; @@ -13,7 +15,7 @@ using Microsoft.Mcp.Core.Models.Command; using ModelContextProtocol.Protocol; -namespace Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; /// /// A tool loader that creates MCP tools from the registered command factory. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CompositeToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CompositeToolLoader.cs index c6b00ac799..4c1de671af 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CompositeToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CompositeToolLoader.cs @@ -6,7 +6,7 @@ using Microsoft.Mcp.Core.Commands; using ModelContextProtocol.Protocol; -namespace Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; /// /// A tool loader that combines multiple tool loaders into one. @@ -17,7 +17,7 @@ namespace Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; public sealed class CompositeToolLoader(IEnumerable toolLoaders, ILogger logger) : BaseToolLoader(logger) { private readonly IEnumerable _toolLoaders = InitializeToolLoaders(toolLoaders); - private readonly Dictionary _toolLoaderMap = new(); + private readonly Dictionary _toolLoaderMap = []; private readonly SemaphoreSlim _initializationSemaphore = new(1, 1); private bool _isInitialized = false; private List? _cachedTools; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/IToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/IToolLoader.cs index b7bff4db6e..475ce8a80e 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/IToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/IToolLoader.cs @@ -3,7 +3,7 @@ using ModelContextProtocol.Protocol; -namespace Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; /// /// Defines the interface for tool loaders in the MCP server. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs index 7091e8f7a9..07ad532d56 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs @@ -4,6 +4,8 @@ using System.Diagnostics; using System.Net; using System.Text.Json.Nodes; +using Azure.Mcp.Core.Areas.Server; +using Azure.Mcp.Core.Areas.Server.Commands; using Azure.Mcp.Core.Areas.Server.Models; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; @@ -16,7 +18,7 @@ using ModelContextProtocol; using ModelContextProtocol.Protocol; -namespace Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; /// /// A tool loader that exposes Azure command groups as hierarchical namespace tools with direct in-process execution. @@ -47,7 +49,7 @@ public sealed class NamespaceToolLoader( options.Value.Namespace.Contains(group.Name, StringComparer.OrdinalIgnoreCase)); } - return allSubGroups.Select(group => group.Name).ToList(); + return [.. allSubGroups.Select(group => group.Name)]; }); private readonly Dictionary> _cachedToolLists = new(StringComparer.OrdinalIgnoreCase); diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/RegistryToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/RegistryToolLoader.cs index 49178daeb8..a1523a939c 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/RegistryToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/RegistryToolLoader.cs @@ -9,7 +9,7 @@ using ModelContextProtocol.Client; using ModelContextProtocol.Protocol; -namespace Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; /// /// RegistryToolLoader is a tool loader that retrieves tools from a registry. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs index 6400e20a40..cc14cafe0a 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System.Diagnostics; +using Azure.Mcp.Core.Areas.Server; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; @@ -10,7 +11,7 @@ using ModelContextProtocol.Client; using ModelContextProtocol.Protocol; -namespace Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; public sealed class ServerToolLoader(IMcpDiscoveryStrategy serverDiscoveryStrategy, IOptions options, ILogger logger) : BaseToolLoader(logger) { diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs index 66d2ae564e..cec19c4b2b 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs @@ -2,15 +2,15 @@ // Licensed under the MIT License. using System.Diagnostics; +using Azure.Mcp.Core.Areas.Server; using Microsoft.Extensions.Logging; -using Microsoft.Mcp.Core.Areas; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Commands; using ModelContextProtocol; using ModelContextProtocol.Client; using ModelContextProtocol.Protocol; -namespace Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; +namespace Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; public sealed class SingleProxyToolLoader(IMcpDiscoveryStrategy discoveryStrategy, ILogger logger) : BaseToolLoader(logger) { @@ -84,7 +84,7 @@ as well as all interactions with the Azure Developer CLI (azd). To execute an action, set the "tool", "command", and convert the users intent into the "parameters" based on the discovered schema. Always use this tool for any Azure or "azd" related operation requiring up-to-date, dynamic, and interactive capabilities. Always include the "intent" parameter to specify the operation you want to perform. - """, + """, Annotations = new ToolAnnotations(), InputSchema = ToolSchema, } @@ -157,7 +157,7 @@ public override async ValueTask CallToolHandler(RequestContext /// Configuration options for tool loaders. diff --git a/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ToolLoaderTelemetryTests.cs b/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ToolLoaderTelemetryTests.cs index d4d2396b7a..9be74f76bb 100644 --- a/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ToolLoaderTelemetryTests.cs +++ b/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ToolLoaderTelemetryTests.cs @@ -4,12 +4,12 @@ using System.CommandLine; using System.Diagnostics; using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; +using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Models.Command; using Microsoft.Mcp.Core.Services.Telemetry; diff --git a/tools/Azure.Mcp.Tools.Deploy/src/Options/Architecture/DiagramGenerateOptions.cs b/tools/Azure.Mcp.Tools.Deploy/src/Options/Architecture/DiagramGenerateOptions.cs index ca50dfae63..7f24be5817 100644 --- a/tools/Azure.Mcp.Tools.Deploy/src/Options/Architecture/DiagramGenerateOptions.cs +++ b/tools/Azure.Mcp.Tools.Deploy/src/Options/Architecture/DiagramGenerateOptions.cs @@ -2,8 +2,8 @@ // Licensed under the MIT License. using System.Text.Json.Serialization; -using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Options; +using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; namespace Azure.Mcp.Tools.Deploy.Options.Architecture; diff --git a/tools/Azure.Mcp.Tools.Deploy/src/Options/DeployOptionDefinitions.cs b/tools/Azure.Mcp.Tools.Deploy/src/Options/DeployOptionDefinitions.cs index df7c550a41..182305895d 100644 --- a/tools/Azure.Mcp.Tools.Deploy/src/Options/DeployOptionDefinitions.cs +++ b/tools/Azure.Mcp.Tools.Deploy/src/Options/DeployOptionDefinitions.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Commands.ToolLoading; using Azure.Mcp.Core.Options; using Azure.Mcp.Tools.Deploy.Services.Util; +using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; namespace Azure.Mcp.Tools.Deploy.Options; From 284a3e4274dc6c6b0322fcb0e8445523ae7f0a72 Mon Sep 17 00:00:00 2001 From: alzimmermsft <48699787+alzimmermsft@users.noreply.github.com> Date: Thu, 19 Feb 2026 11:03:54 -0500 Subject: [PATCH 3/6] Fix Server.Commands namespaces --- .../Areas/Server/ArrayOrCollectionElementTypeTests.cs | 2 +- .../Commands/ServiceCollectionExtensionsSerializedTests.cs | 2 +- .../Areas/Server/Commands/ServiceCollectionExtensionsTests.cs | 2 +- .../Areas/Server/Commands/ServiceInfoCommandTests.cs | 2 +- .../Azure.Mcp.Core.UnitTests/Areas/Server/OptionTypeTests.cs | 2 +- .../Areas/Server/ServiceStartCommandTests.cs | 3 +-- .../src/Areas/Server/Commands/ServiceCollectionExtensions.cs | 4 ++-- .../src/Areas/Server/Commands/ServiceInfoCommand.cs | 2 +- .../src/Areas/Server/Commands/ServiceInfoJsonContext.cs | 2 +- .../src/Areas/Server/Commands/ServiceStartCommand.cs | 2 +- .../Server/Commands/ToolLoading/CommandFactoryToolLoader.cs | 1 - .../Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs | 1 - .../src/Areas/Server/Commands/TypeToJsonTypeMapper.cs | 2 +- core/Microsoft.Mcp.Core/src/Areas/Server/ServerSetup.cs | 2 +- core/Microsoft.Mcp.Core/src/Commands/CommandFactory.cs | 3 ++- servers/Azure.Mcp.Server/src/Program.cs | 3 +-- servers/Fabric.Mcp.Server/src/Program.cs | 3 +-- servers/Template.Mcp.Server/src/Program.cs | 3 +-- 18 files changed, 18 insertions(+), 23 deletions(-) diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ArrayOrCollectionElementTypeTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ArrayOrCollectionElementTypeTests.cs index adc426ea49..928d394af0 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ArrayOrCollectionElementTypeTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ArrayOrCollectionElementTypeTests.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. using System.Collections; -using Azure.Mcp.Core.Areas.Server.Commands; +using Microsoft.Mcp.Core.Areas.Server.Commands; using Xunit; namespace Azure.Mcp.Core.UnitTests.Areas.Server; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsSerializedTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsSerializedTests.cs index e66d3b79c9..0056756088 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsSerializedTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsSerializedTests.cs @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Commands; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Helpers; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Commands; using Microsoft.Mcp.Core.Configuration; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs index 517d4bc230..1d62de3b1f 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs @@ -2,11 +2,11 @@ // Licensed under the MIT License. using Azure.Mcp.Core.Areas.Server; -using Azure.Mcp.Core.Areas.Server.Commands; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Services.Azure.Authentication; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Commands; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceInfoCommandTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceInfoCommandTests.cs index f234415c4e..5803f4fbe2 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceInfoCommandTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceInfoCommandTests.cs @@ -3,9 +3,9 @@ using System.CommandLine; using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; +using Microsoft.Mcp.Core.Areas.Server.Commands; using Microsoft.Mcp.Core.Configuration; using Microsoft.Mcp.Core.Models.Command; using NSubstitute; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/OptionTypeTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/OptionTypeTests.cs index 75cb52f261..16263e5f62 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/OptionTypeTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/OptionTypeTests.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. using System.CommandLine; -using Azure.Mcp.Core.Areas.Server.Commands; +using Microsoft.Mcp.Core.Areas.Server.Commands; using Xunit; namespace Azure.Mcp.Core.UnitTests.Areas.Server; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ServiceStartCommandTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ServiceStartCommandTests.cs index 91df3e8b75..7f353caad7 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ServiceStartCommandTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ServiceStartCommandTests.cs @@ -4,16 +4,15 @@ using System.CommandLine; using System.Diagnostics; using System.Net; -using Azure.Mcp.Core.Areas.Server.Commands; using Azure.Mcp.Core.Areas.Server.Options; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Mcp.Core.Areas.Server.Commands; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Models.Command; using Microsoft.Mcp.Core.Services.Telemetry; using NSubstitute; using Xunit; -using TransportTypes = Azure.Mcp.Core.Areas.Server.Options.TransportTypes; namespace Azure.Mcp.Core.UnitTests.Areas.Server; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs index 57a65c32b3..861a649acd 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs @@ -16,10 +16,10 @@ using Microsoft.Mcp.Core.Configuration; using ModelContextProtocol.Protocol; -namespace Azure.Mcp.Core.Areas.Server.Commands; +namespace Microsoft.Mcp.Core.Areas.Server.Commands; // This is intentionally placed after the namespace declaration to avoid -// conflicts with Azure.Mcp.Core.Areas.Server.Options +// conflicts with Microsoft.Mcp.Core.Areas.Server.Options using Options = Microsoft.Extensions.Options.Options; /// diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceInfoCommand.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceInfoCommand.cs index ab99778de5..ec22c0c02b 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceInfoCommand.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceInfoCommand.cs @@ -8,7 +8,7 @@ using Microsoft.Mcp.Core.Configuration; using Microsoft.Mcp.Core.Models.Command; -namespace Azure.Mcp.Core.Areas.Server.Commands; +namespace Microsoft.Mcp.Core.Areas.Server.Commands; /// /// Command that provides basic server information. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceInfoJsonContext.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceInfoJsonContext.cs index f4b296fa66..bdc8b17c42 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceInfoJsonContext.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceInfoJsonContext.cs @@ -3,7 +3,7 @@ using System.Text.Json.Serialization; -namespace Azure.Mcp.Core.Areas.Server.Commands; +namespace Microsoft.Mcp.Core.Areas.Server.Commands; [JsonSerializable(typeof(ServiceInfoCommand.ServiceInfoCommandResult))] [JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceStartCommand.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceStartCommand.cs index 678f89c6a8..c480918181 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceStartCommand.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceStartCommand.cs @@ -30,7 +30,7 @@ using OpenTelemetry.Metrics; using OpenTelemetry.Trace; -namespace Azure.Mcp.Core.Areas.Server.Commands; +namespace Microsoft.Mcp.Core.Areas.Server.Commands; /// /// Command to start the MCP server with specified configuration options. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs index 1964bc1c40..5371d0f8d8 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs @@ -5,7 +5,6 @@ using System.Net; using System.Text.Json.Nodes; using Azure.Mcp.Core.Areas.Server; -using Azure.Mcp.Core.Areas.Server.Commands; using Azure.Mcp.Core.Areas.Server.Models; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.Logging; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs index 07ad532d56..1db58b9d70 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs @@ -5,7 +5,6 @@ using System.Net; using System.Text.Json.Nodes; using Azure.Mcp.Core.Areas.Server; -using Azure.Mcp.Core.Areas.Server.Commands; using Azure.Mcp.Core.Areas.Server.Models; using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/TypeToJsonTypeMapper.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/TypeToJsonTypeMapper.cs index e1ef5cd86b..23f6cba043 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/TypeToJsonTypeMapper.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/TypeToJsonTypeMapper.cs @@ -5,7 +5,7 @@ using Azure.Mcp.Core.Areas.Server.Models; using Azure.Mcp.Core.Helpers; -namespace Azure.Mcp.Core.Areas.Server.Commands; +namespace Microsoft.Mcp.Core.Areas.Server.Commands; /// /// Gets the JSON object type based on its C# type. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/ServerSetup.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/ServerSetup.cs index eb9e5a8bea..034a36c927 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/ServerSetup.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/ServerSetup.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Commands; using Microsoft.Extensions.DependencyInjection; using Microsoft.Mcp.Core.Areas; +using Microsoft.Mcp.Core.Areas.Server.Commands; using Microsoft.Mcp.Core.Commands; namespace Azure.Mcp.Core.Areas.Server; diff --git a/core/Microsoft.Mcp.Core/src/Commands/CommandFactory.cs b/core/Microsoft.Mcp.Core/src/Commands/CommandFactory.cs index f57b0f24e4..a8e5a0e16c 100644 --- a/core/Microsoft.Mcp.Core/src/Commands/CommandFactory.cs +++ b/core/Microsoft.Mcp.Core/src/Commands/CommandFactory.cs @@ -10,6 +10,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Mcp.Core.Areas; +using Microsoft.Mcp.Core.Areas.Server.Commands; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Configuration; using Microsoft.Mcp.Core.Models.Command; @@ -211,7 +212,7 @@ private void ConfigureCommandHandler(Command command, IBaseCommand implementatio response.Results = ResponseResult.Create(new List(), JsonSourceGenerationContext.Default.ListString); } - var isServiceStartCommand = implementation is Areas.Server.Commands.ServiceStartCommand; + var isServiceStartCommand = implementation is ServiceStartCommand; if (!isServiceStartCommand) { Console.WriteLine(JsonSerializer.Serialize(response, _srcGenWithOptions.CommandResponse)); diff --git a/servers/Azure.Mcp.Server/src/Program.cs b/servers/Azure.Mcp.Server/src/Program.cs index b4019d1410..4ff5e95bca 100644 --- a/servers/Azure.Mcp.Server/src/Program.cs +++ b/servers/Azure.Mcp.Server/src/Program.cs @@ -3,7 +3,6 @@ using System.Net; using Azure.Mcp.Core.Areas.Server; -using Azure.Mcp.Core.Areas.Server.Commands; using Azure.Mcp.Core.Commands; using Azure.Mcp.Core.Helpers; using Azure.Mcp.Core.Services.Azure.ResourceGroup; @@ -15,10 +14,10 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Mcp.Core.Areas; +using Microsoft.Mcp.Core.Areas.Server.Commands; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Models.Command; using Microsoft.Mcp.Core.Services.Telemetry; -using ServiceStartCommand = Azure.Mcp.Core.Areas.Server.Commands.ServiceStartCommand; internal class Program { diff --git a/servers/Fabric.Mcp.Server/src/Program.cs b/servers/Fabric.Mcp.Server/src/Program.cs index 3d7698c195..6b67c4f2ae 100644 --- a/servers/Fabric.Mcp.Server/src/Program.cs +++ b/servers/Fabric.Mcp.Server/src/Program.cs @@ -4,7 +4,6 @@ using System.Net; using System.Text.Json; using Azure.Mcp.Core.Areas.Server; -using Azure.Mcp.Core.Areas.Server.Commands; using Azure.Mcp.Core.Commands; using Azure.Mcp.Core.Extensions; using Azure.Mcp.Core.Models; @@ -17,10 +16,10 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Mcp.Core.Areas; +using Microsoft.Mcp.Core.Areas.Server.Commands; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Models.Command; using Microsoft.Mcp.Core.Services.Telemetry; -using ServiceStartCommand = Azure.Mcp.Core.Areas.Server.Commands.ServiceStartCommand; internal class Program { diff --git a/servers/Template.Mcp.Server/src/Program.cs b/servers/Template.Mcp.Server/src/Program.cs index 085a191f3c..35aee4f701 100644 --- a/servers/Template.Mcp.Server/src/Program.cs +++ b/servers/Template.Mcp.Server/src/Program.cs @@ -3,7 +3,6 @@ using System.Net; using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Commands; using Azure.Mcp.Core.Commands; using Azure.Mcp.Core.Extensions; using Azure.Mcp.Core.Models; @@ -13,10 +12,10 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Mcp.Core.Areas; +using Microsoft.Mcp.Core.Areas.Server.Commands; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Models.Command; using Microsoft.Mcp.Core.Services.Telemetry; -using ServiceStartCommand = Azure.Mcp.Core.Areas.Server.Commands.ServiceStartCommand; internal class Program { From 50cd36b5b3faa268bacc41ecd16c686f572e9c73 Mon Sep 17 00:00:00 2001 From: alzimmermsft <48699787+alzimmermsft@users.noreply.github.com> Date: Thu, 19 Feb 2026 11:25:09 -0500 Subject: [PATCH 4/6] Fix Server.Models and Options namespaces --- .../Discovery/CommandGroupDiscoveryStrategyTests.cs | 3 +-- .../ConsolidatedToolDiscoveryStrategyTests.cs | 3 ++- .../Discovery/RegistryDiscoveryStrategyTests.cs | 2 +- .../Commands/Discovery/RegistryServerProviderTests.cs | 2 +- .../Areas/Server/Commands/Runtime/McpRuntimeTests.cs | 2 +- .../ServiceCollectionExtensionsSerializedTests.cs | 2 +- .../Commands/ServiceCollectionExtensionsTests.cs | 4 +--- .../Commands/ToolLoading/NamespaceToolLoaderTests.cs | 2 +- .../Commands/ToolLoading/ServerToolLoaderTests.cs | 2 +- .../Commands/ToolLoading/SingleProxyToolLoaderTests.cs | 2 +- .../Areas/Server/Models/RegistryRootTests.cs | 2 +- .../Areas/Server/ServiceStartCommandTests.cs | 2 +- .../RegistryDiscoveryStrategyHelper.cs | 2 +- .../Authentication/AzureCloudConfigurationTests.cs | 3 +-- .../Services/Azure/BaseAzureServiceTests.cs | 2 +- .../Helpers/TestHttpClientFactoryProvider.cs | 2 +- .../Discovery/CommandGroupDiscoveryStrategy.cs | 2 +- .../Commands/Discovery/CommandGroupServerProvider.cs | 2 +- .../Discovery/ConsolidatedToolDiscoveryStrategy.cs | 4 ++-- .../Discovery/ConsolidatedToolServerProvider.cs | 2 +- .../Commands/Discovery/RegistryDiscoveryStrategy.cs | 4 ++-- .../Commands/Discovery/RegistryServerProvider.cs | 2 +- .../src/Areas/Server/Commands/Runtime/McpRuntime.cs | 2 +- .../Server/Commands/ServiceCollectionExtensions.cs | 2 +- .../src/Areas/Server/Commands/ServiceStartCommand.cs | 4 ++-- .../Commands/ToolLoading/CommandFactoryToolLoader.cs | 2 +- .../Server/Commands/ToolLoading/NamespaceToolLoader.cs | 4 ++-- .../src/Areas/Server/Commands/TypeToJsonTypeMapper.cs | 2 +- .../Areas/Server/Models/ConsolidatedToolDefinition.cs | 6 +++--- .../src/Areas/Server/Models/IRegistryRoot.cs | 4 ++-- .../Server/Models/OAuthProtectedResourceMetadata.cs | 2 +- .../src/Areas/Server/Models/RegistryRoot.cs | 2 +- .../src/Areas/Server/Models/RegistryServerInfo.cs | 2 +- .../src/Areas/Server/Models/ToolInputSchema.cs | 2 +- .../src/Areas/Server/Models/ToolPropertySchema.cs | 2 +- .../src/Areas/Server/Options/ModeTypes.cs | 10 +++++----- .../src/Areas/Server/Options/OutgoingAuthStrategy.cs | 2 +- .../Areas/Server/Options/ServiceOptionDefinitions.cs | 8 ++++---- .../src/Areas/Server/Options/ServiceStartOptions.cs | 6 +++--- .../src/Areas/Server/Options/TransportTypes.cs | 4 ++-- .../RegistryServerServiceCollectionExtensions.cs | 2 +- .../src/Areas/Server/ServerJsonContext.cs | 2 +- .../src/Helpers/RegistryServerHelper.cs | 2 +- .../Azure/Authentication/AzureCloudConfiguration.cs | 2 +- .../src/Services/Http/HttpClientFactoryConfigurator.cs | 2 +- .../src/Services/Telemetry/TelemetryService.cs | 2 +- .../Commands/ToolLoading/ToolLoaderTelemetryTests.cs | 2 +- .../Services/Telemetry/TelemetryServiceTests.cs | 2 +- .../src/Commands/File/BlobGetCommand.cs | 7 +------ .../src/Commands/File/FileReadCommand.cs | 7 +------ .../tests/Commands/BlobGetCommandTests.cs | 8 +------- .../tests/Commands/FileReadCommandTests.cs | 6 +----- .../tests/Commands/Table/TableConfigGetCommandTests.cs | 4 +--- .../tests/Commands/Table/TableGetCommandTests.cs | 4 +--- .../tests/Commands/Table/TableListCommandTests.cs | 4 +--- .../Commands/Table/TableNamespaceGetCommandTests.cs | 4 +--- .../Commands/Table/TableNamespaceListCommandTests.cs | 4 +--- 57 files changed, 75 insertions(+), 108 deletions(-) diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategyTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategyTests.cs index 0ff32c14e5..9d9ef4837a 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategyTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategyTests.cs @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Commands.Discovery; -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Azure.Mcp.Tests.Client.Helpers; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; +using Microsoft.Mcp.Core.Areas.Server.Options; using Xunit; namespace Azure.Mcp.Core.UnitTests.Areas.Server.Commands.Discovery; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategyTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategyTests.cs index c9739371d7..a7b8f670d3 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategyTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategyTests.cs @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Configuration; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategyTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategyTests.cs index 5ff365d6b2..d2000075b8 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategyTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategyTests.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; +using Microsoft.Mcp.Core.Areas.Server.Options; using Xunit; namespace Azure.Mcp.Core.UnitTests.Areas.Server.Commands.Discovery; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryServerProviderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryServerProviderTests.cs index dab2771cee..8a837d1fb8 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryServerProviderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/RegistryServerProviderTests.cs @@ -3,8 +3,8 @@ using System.Net; using System.Net.Sockets; -using Azure.Mcp.Core.Areas.Server.Models; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; +using Microsoft.Mcp.Core.Areas.Server.Models; using ModelContextProtocol.Client; using NSubstitute; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs index e152a791ed..8367980233 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs @@ -3,13 +3,13 @@ using System.Diagnostics; using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Models.Option; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Services.Telemetry; using ModelContextProtocol.Protocol; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsSerializedTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsSerializedTests.cs index 0056756088..a592650e83 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsSerializedTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsSerializedTests.cs @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Helpers; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Microsoft.Mcp.Core.Areas.Server.Commands; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Configuration; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs index 1d62de3b1f..d49ae4e606 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using Azure.Mcp.Core.Areas.Server; -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Services.Azure.Authentication; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; @@ -10,11 +9,10 @@ using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; +using Microsoft.Mcp.Core.Areas.Server.Options; using ModelContextProtocol.Server; using Xunit; -using TransportTypes = Azure.Mcp.Core.Areas.Server.Options.TransportTypes; - namespace Azure.Mcp.Core.UnitTests.Areas.Server.Commands; public class ServiceCollectionExtensionsTests diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/NamespaceToolLoaderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/NamespaceToolLoaderTests.cs index ed3be451e1..bce9a8d231 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/NamespaceToolLoaderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/NamespaceToolLoaderTests.cs @@ -2,13 +2,13 @@ // Licensed under the MIT License. using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; +using Microsoft.Mcp.Core.Areas.Server.Options; using ModelContextProtocol.Protocol; using NSubstitute; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ServerToolLoaderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ServerToolLoaderTests.cs index 53751e58a6..9f65e00ad0 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ServerToolLoaderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ServerToolLoaderTests.cs @@ -2,11 +2,11 @@ // Licensed under the MIT License. using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Options; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; +using Microsoft.Mcp.Core.Areas.Server.Options; using ModelContextProtocol.Protocol; using NSubstitute; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/SingleProxyToolLoaderTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/SingleProxyToolLoaderTests.cs index 2922d6392c..093f61dbf5 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/SingleProxyToolLoaderTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/SingleProxyToolLoaderTests.cs @@ -2,12 +2,12 @@ // Licensed under the MIT License. using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Helpers; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; +using Microsoft.Mcp.Core.Areas.Server.Options; using ModelContextProtocol.Protocol; using NSubstitute; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Models/RegistryRootTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Models/RegistryRootTests.cs index eaf0cfdf03..4e03de20cc 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Models/RegistryRootTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Models/RegistryRootTests.cs @@ -3,7 +3,7 @@ using System.Text.Json; using Azure.Mcp.Core.Areas.Server; -using Azure.Mcp.Core.Areas.Server.Models; +using Microsoft.Mcp.Core.Areas.Server.Models; using Xunit; namespace Azure.Mcp.Core.UnitTests.Areas.Server.Models; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ServiceStartCommandTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ServiceStartCommandTests.cs index 7f353caad7..063a120755 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ServiceStartCommandTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ServiceStartCommandTests.cs @@ -4,10 +4,10 @@ using System.CommandLine; using System.Diagnostics; using System.Net; -using Azure.Mcp.Core.Areas.Server.Options; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.Mcp.Core.Areas.Server.Commands; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Models.Command; using Microsoft.Mcp.Core.Services.Telemetry; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/RegistryDiscoveryStrategyHelper.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/RegistryDiscoveryStrategyHelper.cs index a1c9fd0f3e..277f681a4e 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/RegistryDiscoveryStrategyHelper.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/RegistryDiscoveryStrategyHelper.cs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Helpers; using Microsoft.Extensions.Logging; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; +using Microsoft.Mcp.Core.Areas.Server.Options; namespace Azure.Mcp.Core.UnitTests; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Services/Azure/Authentication/AzureCloudConfigurationTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Services/Azure/Authentication/AzureCloudConfigurationTests.cs index f5db219f0d..965df86bab 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Services/Azure/Authentication/AzureCloudConfigurationTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Services/Azure/Authentication/AzureCloudConfigurationTests.cs @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Services.Azure.Authentication; using Azure.ResourceManager; using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; using Xunit; namespace Azure.Mcp.Core.UnitTests.Services.Azure.Authentication; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Services/Azure/BaseAzureServiceTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Services/Azure/BaseAzureServiceTests.cs index 4bd4be2331..344028edf0 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Services/Azure/BaseAzureServiceTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Services/Azure/BaseAzureServiceTests.cs @@ -2,12 +2,12 @@ // Licensed under the MIT License. using Azure.Core; -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Options; using Azure.Mcp.Core.Services.Azure; using Azure.Mcp.Core.Services.Azure.Authentication; using Azure.Mcp.Core.Services.Azure.Tenant; using Azure.ResourceManager; +using Microsoft.Mcp.Core.Areas.Server.Options; using NSubstitute; using Xunit; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Tests/Helpers/TestHttpClientFactoryProvider.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Tests/Helpers/TestHttpClientFactoryProvider.cs index 0a45e0048b..d7104d16d1 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Tests/Helpers/TestHttpClientFactoryProvider.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Tests/Helpers/TestHttpClientFactoryProvider.cs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Services.Http; using Azure.Mcp.Tests.Client.Helpers; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Mcp.Core.Areas.Server.Options; namespace Azure.Mcp.Tests.Helpers; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategy.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategy.cs index b21c31cef4..23dd8c8bd1 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategy.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupDiscoveryStrategy.cs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; namespace Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupServerProvider.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupServerProvider.cs index 6276def66c..f51bdd9102 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupServerProvider.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/CommandGroupServerProvider.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Commands; using ModelContextProtocol.Client; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategy.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategy.cs index 0b2f3ec22e..996267aec8 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategy.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategy.cs @@ -3,12 +3,12 @@ using System.Reflection; using Azure.Mcp.Core.Areas.Server; -using Azure.Mcp.Core.Areas.Server.Models; -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Models; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Configuration; using Microsoft.Mcp.Core.Services.Telemetry; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolServerProvider.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolServerProvider.cs index 1542e202a7..d5b674181f 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolServerProvider.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolServerProvider.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Commands; using ModelContextProtocol.Client; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategy.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategy.cs index c7c0aa1a48..41eb4cb45a 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategy.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryDiscoveryStrategy.cs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Models; -using Azure.Mcp.Core.Areas.Server.Options; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Models; +using Microsoft.Mcp.Core.Areas.Server.Options; namespace Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryServerProvider.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryServerProvider.cs index 9aaef5ac9a..89a061b274 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryServerProvider.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/RegistryServerProvider.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Models; using Azure.Mcp.Core.Helpers; +using Microsoft.Mcp.Core.Areas.Server.Models; using ModelContextProtocol.Client; namespace Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs index 6676457d30..4b84dbb790 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs @@ -3,11 +3,11 @@ using System.Diagnostics; using System.Text.Json.Nodes; -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Models.Option; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Helpers; using Microsoft.Mcp.Core.Services.Telemetry; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs index 861a649acd..7e41597e84 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs @@ -3,7 +3,6 @@ using System.Reflection; using System.Text; -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Azure.Mcp.Core.Helpers; using Microsoft.Extensions.Configuration; @@ -13,6 +12,7 @@ using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Configuration; using ModelContextProtocol.Protocol; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceStartCommand.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceStartCommand.cs index c480918181..2119be0eab 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceStartCommand.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceStartCommand.cs @@ -4,8 +4,6 @@ using System.CommandLine.Parsing; using System.Diagnostics; using System.Net; -using Azure.Mcp.Core.Areas.Server.Models; -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Helpers; using Azure.Mcp.Core.Logging; using Azure.Mcp.Core.Services.Azure; @@ -21,6 +19,8 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Identity.Web; +using Microsoft.Mcp.Core.Areas.Server.Models; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Extensions; using Microsoft.Mcp.Core.Models.Command; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs index 5371d0f8d8..fe6183b816 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs @@ -5,10 +5,10 @@ using System.Net; using System.Text.Json.Nodes; using Azure.Mcp.Core.Areas.Server; -using Azure.Mcp.Core.Areas.Server.Models; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Models; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Helpers; using Microsoft.Mcp.Core.Models.Command; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs index 1db58b9d70..ee0ac26640 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs @@ -5,12 +5,12 @@ using System.Net; using System.Text.Json.Nodes; using Azure.Mcp.Core.Areas.Server; -using Azure.Mcp.Core.Areas.Server.Models; -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; +using Microsoft.Mcp.Core.Areas.Server.Models; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Helpers; using Microsoft.Mcp.Core.Models.Command; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/TypeToJsonTypeMapper.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/TypeToJsonTypeMapper.cs index 23f6cba043..1c82e12d3a 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/TypeToJsonTypeMapper.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/TypeToJsonTypeMapper.cs @@ -2,8 +2,8 @@ // Licensed under the MIT License. using System.Collections; -using Azure.Mcp.Core.Areas.Server.Models; using Azure.Mcp.Core.Helpers; +using Microsoft.Mcp.Core.Areas.Server.Models; namespace Microsoft.Mcp.Core.Areas.Server.Commands; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Models/ConsolidatedToolDefinition.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Models/ConsolidatedToolDefinition.cs index 4d14b6e396..85baa4f912 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Models/ConsolidatedToolDefinition.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Models/ConsolidatedToolDefinition.cs @@ -4,11 +4,11 @@ using System.Text.Json.Serialization; using Microsoft.Mcp.Core.Commands; -namespace Azure.Mcp.Core.Areas.Server.Models; +namespace Microsoft.Mcp.Core.Areas.Server.Models; /// -/// Represents a composite tool definition that groups multiple related Azure operations together. -/// Used to create consolidated tools from the azure_mcp_consolidated_tools JSON configuration. +/// Represents a composite tool definition that groups multiple related operations together. +/// Used to create consolidated tools from the *_mcp_consolidated_tools JSON configuration. /// public sealed class ConsolidatedToolDefinition { diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Models/IRegistryRoot.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Models/IRegistryRoot.cs index 8c633d8516..a1adafe33f 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Models/IRegistryRoot.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Models/IRegistryRoot.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -namespace Azure.Mcp.Core.Areas.Server.Models; +namespace Microsoft.Mcp.Core.Areas.Server.Models; /// /// Represents the root structure of the MCP server registry JSON file. @@ -12,5 +12,5 @@ public interface IRegistryRoot /// /// Gets the dictionary of server configurations, keyed by server name. /// - public Dictionary? Servers { get; init; } + Dictionary? Servers { get; init; } } diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Models/OAuthProtectedResourceMetadata.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Models/OAuthProtectedResourceMetadata.cs index 728b50ff60..950eb8947e 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Models/OAuthProtectedResourceMetadata.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Models/OAuthProtectedResourceMetadata.cs @@ -3,7 +3,7 @@ using System.Text.Json.Serialization; -namespace Azure.Mcp.Core.Areas.Server.Models; +namespace Microsoft.Mcp.Core.Areas.Server.Models; /// /// OAuth 2.0 protected resource metadata response model. See https://datatracker.ietf.org/doc/rfc9728/. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Models/RegistryRoot.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Models/RegistryRoot.cs index 65395109ed..ca1d75e025 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Models/RegistryRoot.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Models/RegistryRoot.cs @@ -3,7 +3,7 @@ using System.Text.Json.Serialization; -namespace Azure.Mcp.Core.Areas.Server.Models; +namespace Microsoft.Mcp.Core.Areas.Server.Models; /// /// Represents the root structure of the MCP server registry JSON file. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Models/RegistryServerInfo.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Models/RegistryServerInfo.cs index 6a2375c84e..6d284b23ad 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Models/RegistryServerInfo.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Models/RegistryServerInfo.cs @@ -3,7 +3,7 @@ using System.Text.Json.Serialization; -namespace Azure.Mcp.Core.Areas.Server.Models; +namespace Microsoft.Mcp.Core.Areas.Server.Models; /// /// Contains configuration information for an MCP server defined in the registry. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Models/ToolInputSchema.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Models/ToolInputSchema.cs index edbaa21c1a..7e865de2a6 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Models/ToolInputSchema.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Models/ToolInputSchema.cs @@ -3,7 +3,7 @@ using System.Text.Json.Serialization; -namespace Azure.Mcp.Core.Areas.Server.Models; +namespace Microsoft.Mcp.Core.Areas.Server.Models; /// /// Represents the JSON schema for a tool's input parameters. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Models/ToolPropertySchema.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Models/ToolPropertySchema.cs index e22abbf2f5..f25debd821 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Models/ToolPropertySchema.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Models/ToolPropertySchema.cs @@ -3,7 +3,7 @@ using System.Text.Json.Serialization; -namespace Azure.Mcp.Core.Areas.Server.Models; +namespace Microsoft.Mcp.Core.Areas.Server.Models; /// /// Represents a property definition within a tool's input schema. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Options/ModeTypes.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Options/ModeTypes.cs index 6fd9355a24..f6217176d1 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Options/ModeTypes.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Options/ModeTypes.cs @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -namespace Azure.Mcp.Core.Areas.Server.Options; +namespace Microsoft.Mcp.Core.Areas.Server.Options; /// -/// Defines the supported proxy modes for the Azure MCP server. +/// Defines the supported proxy modes for the MCP server. /// internal static class ModeTypes { /// - /// Single tool proxy mode - exposes a single "azure" tool that handles internal routing across all Azure MCP tools. + /// Single tool proxy mode - exposes a single "azure" tool that handles internal routing across all MCP tools. /// public const string SingleToolProxy = "single"; @@ -20,12 +20,12 @@ internal static class ModeTypes public const string NamespaceProxy = "namespace"; /// - /// All tools mode - exposes all Azure MCP tools individually (one tool per command). + /// All tools mode - exposes all MCP tools individually (one tool per command). /// public const string All = "all"; /// - /// Consolidated tools mode - exposes consolidated tools that group related Azure operations together. + /// Consolidated tools mode - exposes consolidated tools that group related operations together. /// public const string ConsolidatedProxy = "consolidated"; } diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Options/OutgoingAuthStrategy.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Options/OutgoingAuthStrategy.cs index 528f7e23e6..520213692e 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Options/OutgoingAuthStrategy.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Options/OutgoingAuthStrategy.cs @@ -3,7 +3,7 @@ using Azure.Identity; -namespace Azure.Mcp.Core.Areas.Server.Options; +namespace Microsoft.Mcp.Core.Areas.Server.Options; /// /// The strategy to use for authenticating outgoing requests to downstream services. diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Options/ServiceOptionDefinitions.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Options/ServiceOptionDefinitions.cs index 46325e4585..28882ddb58 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Options/ServiceOptionDefinitions.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Options/ServiceOptionDefinitions.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -namespace Azure.Mcp.Core.Areas.Server.Options; +namespace Microsoft.Mcp.Core.Areas.Server.Options; public static class ServiceOptionDefinitions { @@ -19,7 +19,7 @@ public static class ServiceOptionDefinitions public static readonly Option Transport = new($"--{TransportName}") { - Description = "Transport mechanism to use for Azure MCP Server.", + Description = "Transport mechanism to use for MCP Server.", DefaultValueFactory = _ => TransportTypes.StdIo, Required = false }; @@ -28,7 +28,7 @@ public static class ServiceOptionDefinitions $"--{NamespaceName}" ) { - Description = "The Azure service namespaces to expose on the MCP server (e.g., storage, keyvault, cosmos).", + Description = "The service namespaces to expose on the MCP server (e.g., storage, keyvault, cosmos).", Required = false, Arity = ArgumentArity.OneOrMore, AllowMultipleArgumentsPerToken = true, @@ -90,7 +90,7 @@ public static class ServiceOptionDefinitions $"--{OutgoingAuthStrategyName}") { Required = false, - Description = "Outgoing authentication strategy for Azure service requests. Valid values: NotSet, UseHostingEnvironmentIdentity, UseOnBehalfOf.", + Description = "Outgoing authentication strategy for service requests. Valid values: NotSet, UseHostingEnvironmentIdentity, UseOnBehalfOf.", DefaultValueFactory = _ => Options.OutgoingAuthStrategy.NotSet }; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Options/ServiceStartOptions.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Options/ServiceStartOptions.cs index f5bc798896..3e068d9013 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Options/ServiceStartOptions.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Options/ServiceStartOptions.cs @@ -3,10 +3,10 @@ using System.Text.Json.Serialization; -namespace Azure.Mcp.Core.Areas.Server.Options; +namespace Microsoft.Mcp.Core.Areas.Server.Options; /// -/// Configuration options for starting the Azure MCP server service. +/// Configuration options for starting the MCP server service. /// public class ServiceStartOptions { @@ -67,7 +67,7 @@ public class ServiceStartOptions public bool DangerouslyDisableElicitation { get; set; } = false; /// - /// Gets or sets the outgoing authentication strategy for Azure service requests. + /// Gets or sets the outgoing authentication strategy for service requests. /// Determines whether to use hosting environment identity or on-behalf-of flow. /// [JsonPropertyName("outgoingAuthStrategy")] diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Options/TransportTypes.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Options/TransportTypes.cs index 51002fa5d1..4857f06079 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Options/TransportTypes.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Options/TransportTypes.cs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -namespace Azure.Mcp.Core.Areas.Server.Options; +namespace Microsoft.Mcp.Core.Areas.Server.Options; /// -/// Defines the supported transport mechanisms for the Azure MCP server. +/// Defines the supported transport mechanisms for the MCP server. /// internal static class TransportTypes { diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/RegistryServerServiceCollectionExtensions.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/RegistryServerServiceCollectionExtensions.cs index 27c6f530fb..e260b3a8c4 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/RegistryServerServiceCollectionExtensions.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/RegistryServerServiceCollectionExtensions.cs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Models; using Azure.Mcp.Core.Helpers; using Azure.Mcp.Core.Services.Azure.Authentication; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Mcp.Core.Areas.Server.Models; namespace Azure.Mcp.Core.Areas.Server; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/ServerJsonContext.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/ServerJsonContext.cs index 27cf183b24..f93c0cb0f0 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/ServerJsonContext.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/ServerJsonContext.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. using System.Text.Json.Serialization; -using Azure.Mcp.Core.Areas.Server.Models; +using Microsoft.Mcp.Core.Areas.Server.Models; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Models.Metadata; using ModelContextProtocol.Client; diff --git a/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs b/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs index 66cd159032..12e22f2939 100644 --- a/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs +++ b/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs @@ -3,8 +3,8 @@ using System.Reflection; using Azure.Mcp.Core.Areas.Server; -using Azure.Mcp.Core.Areas.Server.Models; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; +using Microsoft.Mcp.Core.Areas.Server.Models; namespace Azure.Mcp.Core.Helpers; diff --git a/core/Microsoft.Mcp.Core/src/Services/Azure/Authentication/AzureCloudConfiguration.cs b/core/Microsoft.Mcp.Core/src/Services/Azure/Authentication/AzureCloudConfiguration.cs index 712326e7b7..2e9e8c6700 100644 --- a/core/Microsoft.Mcp.Core/src/Services/Azure/Authentication/AzureCloudConfiguration.cs +++ b/core/Microsoft.Mcp.Core/src/Services/Azure/Authentication/AzureCloudConfiguration.cs @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server.Options; using Azure.ResourceManager; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; namespace Azure.Mcp.Core.Services.Azure.Authentication; diff --git a/core/Microsoft.Mcp.Core/src/Services/Http/HttpClientFactoryConfigurator.cs b/core/Microsoft.Mcp.Core/src/Services/Http/HttpClientFactoryConfigurator.cs index 442ec4ed05..5262d39ae5 100644 --- a/core/Microsoft.Mcp.Core/src/Services/Http/HttpClientFactoryConfigurator.cs +++ b/core/Microsoft.Mcp.Core/src/Services/Http/HttpClientFactoryConfigurator.cs @@ -5,9 +5,9 @@ using System.Reflection; using System.Runtime.InteropServices; using System.Runtime.Versioning; -using Azure.Mcp.Core.Areas.Server.Options; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; namespace Azure.Mcp.Core.Services.Http; diff --git a/core/Microsoft.Mcp.Core/src/Services/Telemetry/TelemetryService.cs b/core/Microsoft.Mcp.Core/src/Services/Telemetry/TelemetryService.cs index 1c994f5bbf..305dbcc922 100644 --- a/core/Microsoft.Mcp.Core/src/Services/Telemetry/TelemetryService.cs +++ b/core/Microsoft.Mcp.Core/src/Services/Telemetry/TelemetryService.cs @@ -3,9 +3,9 @@ using System.Diagnostics; using System.Runtime.InteropServices; -using Azure.Mcp.Core.Areas.Server.Options; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Configuration; using ModelContextProtocol.Protocol; diff --git a/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ToolLoaderTelemetryTests.cs b/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ToolLoaderTelemetryTests.cs index 9be74f76bb..6ce623c6eb 100644 --- a/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ToolLoaderTelemetryTests.cs +++ b/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ToolLoaderTelemetryTests.cs @@ -4,12 +4,12 @@ using System.CommandLine; using System.Diagnostics; using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; using Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Models.Command; using Microsoft.Mcp.Core.Services.Telemetry; diff --git a/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Services/Telemetry/TelemetryServiceTests.cs b/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Services/Telemetry/TelemetryServiceTests.cs index 3d39c22f06..ddb07ec937 100644 --- a/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Services/Telemetry/TelemetryServiceTests.cs +++ b/core/Microsoft.Mcp.Core/tests/Microsoft.Mcp.Core.UnitTests/Services/Telemetry/TelemetryServiceTests.cs @@ -2,9 +2,9 @@ // Licensed under the MIT License. using System.Runtime.InteropServices; -using Azure.Mcp.Core.Areas.Server.Options; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Configuration; using Microsoft.Mcp.Core.Services.Telemetry; diff --git a/tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/BlobGetCommand.cs b/tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/BlobGetCommand.cs index a240480ae4..b57069aa37 100644 --- a/tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/BlobGetCommand.cs +++ b/tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/BlobGetCommand.cs @@ -1,13 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.CommandLine; -using System.CommandLine.Parsing; -using System.IO; using System.Net; using System.Text; -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Azure.Mcp.Core.Extensions; using Azure.Mcp.Core.Options; @@ -16,8 +11,8 @@ using Fabric.Mcp.Tools.OneLake.Services; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Commands; -using Microsoft.Mcp.Core.Models.Command; using Microsoft.Mcp.Core.Models.Option; public sealed class BlobGetCommand( diff --git a/tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/FileReadCommand.cs b/tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/FileReadCommand.cs index 63422e9ad3..0900db5bce 100644 --- a/tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/FileReadCommand.cs +++ b/tools/Fabric.Mcp.Tools.OneLake/src/Commands/File/FileReadCommand.cs @@ -1,13 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.CommandLine; -using System.CommandLine.Parsing; -using System.IO; using System.Net; using System.Text; -using Azure.Mcp.Core.Areas.Server.Options; using Azure.Mcp.Core.Commands; using Azure.Mcp.Core.Extensions; using Azure.Mcp.Core.Models; @@ -17,8 +12,8 @@ using Fabric.Mcp.Tools.OneLake.Services; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Commands; -using Microsoft.Mcp.Core.Models.Command; using Microsoft.Mcp.Core.Models.Option; namespace Fabric.Mcp.Tools.OneLake.Commands.File; diff --git a/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/BlobGetCommandTests.cs b/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/BlobGetCommandTests.cs index 932cb8620b..83a6f7a534 100644 --- a/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/BlobGetCommandTests.cs +++ b/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/BlobGetCommandTests.cs @@ -1,22 +1,16 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.CommandLine.Parsing; -using System.IO; using System.Net; using System.Text; using System.Text.Json; -using System.Threading; -using Azure.Mcp.Core.Areas.Server.Options; -using Fabric.Mcp.Tools.OneLake.Commands.File; using Fabric.Mcp.Tools.OneLake.Models; using Fabric.Mcp.Tools.OneLake.Services; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Models.Command; using NSubstitute; -using Xunit; namespace Fabric.Mcp.Tools.OneLake.Tests.Commands; diff --git a/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/FileReadCommandTests.cs b/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/FileReadCommandTests.cs index cab5c416a4..f088df9ba2 100644 --- a/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/FileReadCommandTests.cs +++ b/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/FileReadCommandTests.cs @@ -1,17 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System.CommandLine; -using System.CommandLine.Parsing; using System.Net; -using System.Text; -using System.Threading; -using Azure.Mcp.Core.Areas.Server.Options; using Fabric.Mcp.Tools.OneLake.Commands.File; using Fabric.Mcp.Tools.OneLake.Models; using Fabric.Mcp.Tools.OneLake.Services; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Models.Command; using NSubstitute; using NSubstitute.ExceptionExtensions; diff --git a/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableConfigGetCommandTests.cs b/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableConfigGetCommandTests.cs index 76d705a9d9..f3b82ca51c 100644 --- a/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableConfigGetCommandTests.cs +++ b/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableConfigGetCommandTests.cs @@ -1,17 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System.CommandLine.Parsing; -using System.IO; using System.Net; using System.Text; using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Options; using Fabric.Mcp.Tools.OneLake.Commands.Table; using Fabric.Mcp.Tools.OneLake.Models; using Fabric.Mcp.Tools.OneLake.Services; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Models.Command; using NSubstitute; diff --git a/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableGetCommandTests.cs b/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableGetCommandTests.cs index 792be976f6..30356989f4 100644 --- a/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableGetCommandTests.cs +++ b/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableGetCommandTests.cs @@ -1,17 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System.CommandLine.Parsing; -using System.IO; using System.Net; using System.Text; using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Options; using Fabric.Mcp.Tools.OneLake.Commands.Table; using Fabric.Mcp.Tools.OneLake.Models; using Fabric.Mcp.Tools.OneLake.Services; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Models.Command; using NSubstitute; diff --git a/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableListCommandTests.cs b/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableListCommandTests.cs index 27885a044f..e1d6502737 100644 --- a/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableListCommandTests.cs +++ b/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableListCommandTests.cs @@ -1,17 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System.CommandLine.Parsing; -using System.IO; using System.Net; using System.Text; using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Options; using Fabric.Mcp.Tools.OneLake.Commands.Table; using Fabric.Mcp.Tools.OneLake.Models; using Fabric.Mcp.Tools.OneLake.Services; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Models.Command; using NSubstitute; diff --git a/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableNamespaceGetCommandTests.cs b/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableNamespaceGetCommandTests.cs index abb47285f2..93ef277f8f 100644 --- a/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableNamespaceGetCommandTests.cs +++ b/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableNamespaceGetCommandTests.cs @@ -1,17 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System.CommandLine.Parsing; -using System.IO; using System.Net; using System.Text; using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Options; using Fabric.Mcp.Tools.OneLake.Commands.Table; using Fabric.Mcp.Tools.OneLake.Models; using Fabric.Mcp.Tools.OneLake.Services; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Models.Command; using NSubstitute; diff --git a/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableNamespaceListCommandTests.cs b/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableNamespaceListCommandTests.cs index 5c6eae1d51..c4a5da8611 100644 --- a/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableNamespaceListCommandTests.cs +++ b/tools/Fabric.Mcp.Tools.OneLake/tests/Commands/Table/TableNamespaceListCommandTests.cs @@ -1,17 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System.CommandLine.Parsing; -using System.IO; using System.Net; using System.Text; using System.Text.Json; -using Azure.Mcp.Core.Areas.Server.Options; using Fabric.Mcp.Tools.OneLake.Commands.Table; using Fabric.Mcp.Tools.OneLake.Models; using Fabric.Mcp.Tools.OneLake.Services; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server.Options; using Microsoft.Mcp.Core.Models.Command; using NSubstitute; From 71ae063157153e145cfe269dd35348a3734c17f2 Mon Sep 17 00:00:00 2001 From: alzimmermsft <48699787+alzimmermsft@users.noreply.github.com> Date: Thu, 19 Feb 2026 11:29:34 -0500 Subject: [PATCH 5/6] Finish fixing Server.* namespaces --- .../Areas/Server/Helpers/MockMcpClientBuilder.cs | 2 +- .../Areas/Server/Models/RegistryRootTests.cs | 2 +- .../Commands/Discovery/ConsolidatedToolDiscoveryStrategy.cs | 1 - .../Server/Commands/ToolLoading/CommandFactoryToolLoader.cs | 1 - .../Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs | 1 - .../Areas/Server/Commands/ToolLoading/ServerToolLoader.cs | 1 - .../Server/Commands/ToolLoading/SingleProxyToolLoader.cs | 1 - .../Server/RegistryServerServiceCollectionExtensions.cs | 5 +++-- .../Microsoft.Mcp.Core/src/Areas/Server/ServerJsonContext.cs | 2 +- core/Microsoft.Mcp.Core/src/Areas/Server/ServerSetup.cs | 5 ++--- core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs | 2 +- servers/Azure.Mcp.Server/src/Program.cs | 2 +- servers/Fabric.Mcp.Server/src/Program.cs | 2 +- servers/Template.Mcp.Server/src/Program.cs | 2 +- 14 files changed, 12 insertions(+), 17 deletions(-) diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Helpers/MockMcpClientBuilder.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Helpers/MockMcpClientBuilder.cs index 542f98aa27..c8cd2be0a9 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Helpers/MockMcpClientBuilder.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Helpers/MockMcpClientBuilder.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. using System.Text.Json; -using Azure.Mcp.Core.Areas.Server; +using Microsoft.Mcp.Core.Areas.Server; using ModelContextProtocol.Client; using ModelContextProtocol.Protocol; using NSubstitute; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Models/RegistryRootTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Models/RegistryRootTests.cs index 4e03de20cc..7eb1b9e6a4 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Models/RegistryRootTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Models/RegistryRootTests.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. using System.Text.Json; -using Azure.Mcp.Core.Areas.Server; +using Microsoft.Mcp.Core.Areas.Server; using Microsoft.Mcp.Core.Areas.Server.Models; using Xunit; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategy.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategy.cs index 996267aec8..8fe604141b 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategy.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategy.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System.Reflection; -using Azure.Mcp.Core.Areas.Server; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs index fe6183b816..318116ee3c 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/CommandFactoryToolLoader.cs @@ -4,7 +4,6 @@ using System.Diagnostics; using System.Net; using System.Text.Json.Nodes; -using Azure.Mcp.Core.Areas.Server; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs index ee0ac26640..700e7c2ce2 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs @@ -4,7 +4,6 @@ using System.Diagnostics; using System.Net; using System.Text.Json.Nodes; -using Azure.Mcp.Core.Areas.Server; using Azure.Mcp.Core.Commands; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs index cc14cafe0a..45afdca93f 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System.Diagnostics; -using Azure.Mcp.Core.Areas.Server; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs index cec19c4b2b..dd34bc3359 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System.Diagnostics; -using Azure.Mcp.Core.Areas.Server; using Microsoft.Extensions.Logging; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Commands; diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/RegistryServerServiceCollectionExtensions.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/RegistryServerServiceCollectionExtensions.cs index e260b3a8c4..49b1588739 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/RegistryServerServiceCollectionExtensions.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/RegistryServerServiceCollectionExtensions.cs @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using Azure.Mcp.Core; using Azure.Mcp.Core.Helpers; using Azure.Mcp.Core.Services.Azure.Authentication; using Microsoft.Extensions.DependencyInjection; using Microsoft.Mcp.Core.Areas.Server.Models; -namespace Azure.Mcp.Core.Areas.Server; +namespace Microsoft.Mcp.Core.Areas.Server; /// /// Extension methods for configuring RegistryServer services. @@ -55,7 +56,7 @@ public static IServiceCollection AddRegistryRoot(this IServiceCollection service }); } - services.AddSingleton(registry); + services.AddSingleton(registry); return services; } diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/ServerJsonContext.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/ServerJsonContext.cs index f93c0cb0f0..4399c36e44 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/ServerJsonContext.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/ServerJsonContext.cs @@ -8,7 +8,7 @@ using ModelContextProtocol.Client; using ModelContextProtocol.Protocol; -namespace Azure.Mcp.Core.Areas.Server; +namespace Microsoft.Mcp.Core.Areas.Server; [JsonSerializable(typeof(RegistryRoot))] [JsonSerializable(typeof(Dictionary))] diff --git a/core/Microsoft.Mcp.Core/src/Areas/Server/ServerSetup.cs b/core/Microsoft.Mcp.Core/src/Areas/Server/ServerSetup.cs index 034a36c927..2f68054dbd 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/ServerSetup.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/ServerSetup.cs @@ -2,14 +2,13 @@ // Licensed under the MIT License. using Microsoft.Extensions.DependencyInjection; -using Microsoft.Mcp.Core.Areas; using Microsoft.Mcp.Core.Areas.Server.Commands; using Microsoft.Mcp.Core.Commands; -namespace Azure.Mcp.Core.Areas.Server; +namespace Microsoft.Mcp.Core.Areas.Server; /// -/// Initializes and configures the Server area for the Azure MCP application. +/// Initializes and configures the Server area for the MCP application. /// public sealed class ServerSetup : IAreaSetup { diff --git a/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs b/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs index 12e22f2939..ee9b71c0cd 100644 --- a/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs +++ b/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. using System.Reflection; -using Azure.Mcp.Core.Areas.Server; +using Microsoft.Mcp.Core.Areas.Server; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Areas.Server.Models; diff --git a/servers/Azure.Mcp.Server/src/Program.cs b/servers/Azure.Mcp.Server/src/Program.cs index 4ff5e95bca..561c657f1b 100644 --- a/servers/Azure.Mcp.Server/src/Program.cs +++ b/servers/Azure.Mcp.Server/src/Program.cs @@ -83,7 +83,7 @@ private static IAreaSetup[] RegisterAreas() new Azure.Mcp.Tools.AzureBestPractices.AzureBestPracticesSetup(), new Azure.Mcp.Tools.Extension.ExtensionSetup(), new Azure.Mcp.Core.Areas.Group.GroupSetup(), - new Azure.Mcp.Core.Areas.Server.ServerSetup(), + new Microsoft.Mcp.Core.Areas.Server.ServerSetup(), new Azure.Mcp.Core.Areas.Subscription.SubscriptionSetup(), new Azure.Mcp.Core.Areas.Tools.ToolsSetup(), // Register Azure service areas diff --git a/servers/Fabric.Mcp.Server/src/Program.cs b/servers/Fabric.Mcp.Server/src/Program.cs index 6b67c4f2ae..0ff566247b 100644 --- a/servers/Fabric.Mcp.Server/src/Program.cs +++ b/servers/Fabric.Mcp.Server/src/Program.cs @@ -72,7 +72,7 @@ private static IAreaSetup[] RegisterAreas() return [ // Register core areas - new Azure.Mcp.Core.Areas.Server.ServerSetup(), + new Microsoft.Mcp.Core.Areas.Server.ServerSetup(), new Azure.Mcp.Core.Areas.Tools.ToolsSetup(), // Register Fabric areas new Fabric.Mcp.Tools.PublicApi.FabricPublicApiSetup(), diff --git a/servers/Template.Mcp.Server/src/Program.cs b/servers/Template.Mcp.Server/src/Program.cs index 35aee4f701..0a51929f0d 100644 --- a/servers/Template.Mcp.Server/src/Program.cs +++ b/servers/Template.Mcp.Server/src/Program.cs @@ -68,7 +68,7 @@ private static IAreaSetup[] RegisterAreas() { return [ // Register core areas - new Azure.Mcp.Core.Areas.Server.ServerSetup(), + new Microsoft.Mcp.Core.Areas.Server.ServerSetup(), new Azure.Mcp.Core.Areas.Tools.ToolsSetup() // Register template areas ]; From 466795ef7d86520a5b7942578f6cb952328c467a Mon Sep 17 00:00:00 2001 From: alzimmermsft <48699787+alzimmermsft@users.noreply.github.com> Date: Thu, 19 Feb 2026 11:41:15 -0500 Subject: [PATCH 6/6] Few fixes --- .../Areas/Server/Commands/ServiceCollectionExtensionsTests.cs | 2 +- .../Areas/Server/ServiceStartCommandTests.cs | 2 +- .../Areas/Server/TypeToJsonTypeMapperTests.cs | 2 +- servers/Azure.Mcp.Server/src/Program.cs | 1 + servers/Fabric.Mcp.Server/src/Program.cs | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs index d49ae4e606..219313332f 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsTests.cs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using Azure.Mcp.Core.Areas.Server; using Azure.Mcp.Core.Services.Azure.Authentication; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; +using Microsoft.Mcp.Core.Areas.Server; using Microsoft.Mcp.Core.Areas.Server.Commands; using Microsoft.Mcp.Core.Areas.Server.Commands.Discovery; using Microsoft.Mcp.Core.Areas.Server.Commands.Runtime; diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ServiceStartCommandTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ServiceStartCommandTests.cs index 063a120755..dd35335de7 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ServiceStartCommandTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/ServiceStartCommandTests.cs @@ -676,7 +676,7 @@ public void InitializedHandler_SetsCorrectInformationWhenNull() // Tool, Mode, and Namespace are null var serviceStartOptions = new ServiceStartOptions { - Transport = Core.Areas.Server.Options.TransportTypes.StdIo, + Transport = TransportTypes.StdIo, Mode = null, ReadOnly = true, Debug = false, diff --git a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/TypeToJsonTypeMapperTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/TypeToJsonTypeMapperTests.cs index beba85d4a0..166246e57b 100644 --- a/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/TypeToJsonTypeMapperTests.cs +++ b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/TypeToJsonTypeMapperTests.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. using System.Collections; -using Azure.Mcp.Core.Areas.Server.Commands; +using Microsoft.Mcp.Core.Areas.Server.Commands; using Xunit; namespace Azure.Mcp.Core.UnitTests.Areas.Server; diff --git a/servers/Azure.Mcp.Server/src/Program.cs b/servers/Azure.Mcp.Server/src/Program.cs index 561c657f1b..3d10685271 100644 --- a/servers/Azure.Mcp.Server/src/Program.cs +++ b/servers/Azure.Mcp.Server/src/Program.cs @@ -14,6 +14,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Mcp.Core.Areas; +using Microsoft.Mcp.Core.Areas.Server; using Microsoft.Mcp.Core.Areas.Server.Commands; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Models.Command; diff --git a/servers/Fabric.Mcp.Server/src/Program.cs b/servers/Fabric.Mcp.Server/src/Program.cs index 0ff566247b..b1dbccf04d 100644 --- a/servers/Fabric.Mcp.Server/src/Program.cs +++ b/servers/Fabric.Mcp.Server/src/Program.cs @@ -16,6 +16,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Mcp.Core.Areas; +using Microsoft.Mcp.Core.Areas.Server; using Microsoft.Mcp.Core.Areas.Server.Commands; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Models.Command;