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/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..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,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.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/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..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,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.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 579a8e84ca..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,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 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 27b68ee830..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.Commands.Discovery; -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 ed7f78ae5f..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.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.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; @@ -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/ServiceCollectionExtensionsSerializedTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ServiceCollectionExtensionsSerializedTests.cs index e66d3b79c9..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.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.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 6b24c90b4f..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,20 +1,18 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -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; +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; +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/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/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 36d7e14bef..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,12 +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 Microsoft.Mcp.Core.Areas.Server.Options; 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..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.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 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 4aa1ac52ff..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,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 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 f5281320f6..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.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 Microsoft.Mcp.Core.Areas.Server.Commands.ToolLoading; +using Microsoft.Mcp.Core.Areas.Server.Options; 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/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/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/Areas/Server/Models/RegistryRootTests.cs b/core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Models/RegistryRootTests.cs index eaf0cfdf03..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,8 +2,8 @@ // Licensed under the MIT License. using System.Text.Json; -using Azure.Mcp.Core.Areas.Server; -using Azure.Mcp.Core.Areas.Server.Models; +using Microsoft.Mcp.Core.Areas.Server; +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/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..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 @@ -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.Areas.Server.Options; 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; @@ -677,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/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..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.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; +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/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..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,12 +1,12 @@ // 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 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..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,11 +1,11 @@ // 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; -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..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,18 +2,17 @@ // Licensed under the MIT License. using System.Reflection; -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.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; -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 +22,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 +226,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..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,11 +1,11 @@ // 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; -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..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,12 +1,12 @@ // 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 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..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,11 +1,11 @@ // 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 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..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,17 +3,17 @@ 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.Areas.Server.Options; using Microsoft.Mcp.Core.Commands; using Microsoft.Mcp.Core.Helpers; 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..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,23 +3,23 @@ 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; using Azure.Mcp.Core.Helpers; using Microsoft.Extensions.Configuration; 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.Areas.Server.Commands.ToolLoading; +using Microsoft.Mcp.Core.Areas.Server.Options; 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..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; @@ -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/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..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,16 +4,16 @@ using System.Diagnostics; using System.Net; using System.Text.Json.Nodes; -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; 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 75ca5290f8..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,19 +4,19 @@ 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.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; 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 +47,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 09d7e88604..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 @@ -2,14 +2,14 @@ // 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; -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 01d8b01c2c..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,15 +2,15 @@ // 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; 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 b752e88701..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,15 +2,14 @@ // 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; 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 +83,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 +156,7 @@ public override async ValueTask CallToolHandler(RequestContext /// Configuration options for tool loaders. 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..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,10 +2,10 @@ // 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 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/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..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.Areas.Server.Models; +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 27cf183b24..4399c36e44 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/ServerJsonContext.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/ServerJsonContext.cs @@ -2,13 +2,13 @@ // 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; 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 eb9e5a8bea..2f68054dbd 100644 --- a/core/Microsoft.Mcp.Core/src/Areas/Server/ServerSetup.cs +++ b/core/Microsoft.Mcp.Core/src/Areas/Server/ServerSetup.cs @@ -1,15 +1,14 @@ // 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; +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/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/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs b/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs index d1dbd8f674..ee9b71c0cd 100644 --- a/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs +++ b/core/Microsoft.Mcp.Core/src/Helpers/RegistryServerHelper.cs @@ -2,9 +2,9 @@ // Licensed under the MIT License. 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; +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 30d50d053c..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.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.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/servers/Azure.Mcp.Server/src/Program.cs b/servers/Azure.Mcp.Server/src/Program.cs index b4019d1410..3d10685271 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,11 @@ 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; using Microsoft.Mcp.Core.Services.Telemetry; -using ServiceStartCommand = Azure.Mcp.Core.Areas.Server.Commands.ServiceStartCommand; internal class Program { @@ -84,7 +84,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 3d7698c195..b1dbccf04d 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,11 @@ 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; using Microsoft.Mcp.Core.Services.Telemetry; -using ServiceStartCommand = Azure.Mcp.Core.Areas.Server.Commands.ServiceStartCommand; internal class Program { @@ -73,7 +73,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 085a191f3c..0a51929f0d 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 { @@ -69,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 ]; 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; 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;