Skip to main content
Glama

Azure MCP Server

Official
MIT License
1,161
  • Linux
  • Apple
CosmosSetup.cs2.44 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using AzureMcp.Core.Areas; using AzureMcp.Core.Commands; using AzureMcp.Cosmos.Commands; using AzureMcp.Cosmos.Services; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; namespace AzureMcp.Cosmos; public class CosmosSetup : IAreaSetup { public string Name => "cosmos"; public void ConfigureServices(IServiceCollection services) { services.AddSingleton<ICosmosService, CosmosService>(); } public void RegisterCommands(CommandGroup rootGroup, ILoggerFactory loggerFactory) { // Create Cosmos command group var cosmos = new CommandGroup(Name, "Cosmos DB operations - Commands for managing and querying Azure Cosmos DB resources. Includes operations for databases, containers, and document queries."); rootGroup.AddSubGroup(cosmos); // Create Cosmos subgroups var databases = new CommandGroup("database", "Cosmos DB database operations - Commands for listing, creating, and managing database within your Cosmos DB accounts."); cosmos.AddSubGroup(databases); var cosmosContainer = new CommandGroup("container", "Cosmos DB container operations - Commands for listing, creating, and managing container (collection) within your Cosmos DB databases."); databases.AddSubGroup(cosmosContainer); var cosmosAccount = new CommandGroup("account", "Cosmos DB account operations - Commands for listing and managing Cosmos DB account in your Azure subscription."); cosmos.AddSubGroup(cosmosAccount); // Create items subgroup for Cosmos var cosmosItem = new CommandGroup("item", "Cosmos DB item operations - Commands for querying, creating, updating, and deleting document within your Cosmos DB containers."); cosmosContainer.AddSubGroup(cosmosItem); // Register Cosmos commands databases.AddCommand("list", new DatabaseListCommand( loggerFactory.CreateLogger<DatabaseListCommand>())); cosmosContainer.AddCommand("list", new ContainerListCommand( loggerFactory.CreateLogger<ContainerListCommand>())); cosmosAccount.AddCommand("list", new AccountListCommand( loggerFactory.CreateLogger<AccountListCommand>())); cosmosItem.AddCommand("query", new ItemQueryCommand( loggerFactory.CreateLogger<ItemQueryCommand>())); } }

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