Skip to main content
Glama

Azure MCP Server

Official
MIT License
1,161
  • Linux
  • Apple
TestSubscriptionData.cs1.14 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System.Reflection; using Azure.ResourceManager.Resources; namespace AzureMcp.Tests.Helpers; public static class TestSubscriptionData { private static readonly ConstructorInfo? s_constructor = typeof(SubscriptionData).GetConstructors(BindingFlags.NonPublic | BindingFlags.Instance).FirstOrDefault(); public static SubscriptionData Create(string subscriptionId, string displayName) { if (s_constructor == null) { throw new InvalidOperationException("Could not find constructor for SubscriptionData"); } // Create subscription data using reflection var data = (SubscriptionData)s_constructor.Invoke(Array.Empty<object>()); // Use reflection to set the read-only properties typeof(SubscriptionData) .GetProperty(nameof(SubscriptionData.SubscriptionId))! .SetValue(data, subscriptionId); typeof(SubscriptionData) .GetProperty(nameof(SubscriptionData.DisplayName))! .SetValue(data, displayName); return data; } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Azure/azure-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server