Skip to main content
Glama

Azure MCP Server

Official
MIT License
1,161
  • Linux
  • Apple
PostgresSetup.cs2.67 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using AzureMcp.Core.Areas; using AzureMcp.Core.Commands; using AzureMcp.Postgres.Commands.Database; using AzureMcp.Postgres.Commands.Server; using AzureMcp.Postgres.Commands.Table; using AzureMcp.Postgres.Services; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; namespace AzureMcp.Postgres; public class PostgresSetup : IAreaSetup { public string Name => "postgres"; public void ConfigureServices(IServiceCollection services) { services.AddSingleton<IPostgresService, PostgresService>(); } public void RegisterCommands(CommandGroup rootGroup, ILoggerFactory loggerFactory) { var pg = new CommandGroup(Name, "PostgreSQL operations - Commands for managing Azure Database for PostgreSQL Flexible Server resources. Includes operations for listing servers and databases, executing SQL queries, managing table schemas, and configuring server parameters."); rootGroup.AddSubGroup(pg); var database = new CommandGroup("database", "PostgreSQL database operations"); pg.AddSubGroup(database); database.AddCommand("list", new DatabaseListCommand(loggerFactory.CreateLogger<DatabaseListCommand>())); database.AddCommand("query", new DatabaseQueryCommand(loggerFactory.CreateLogger<DatabaseQueryCommand>())); var table = new CommandGroup("table", "PostgreSQL table operations"); pg.AddSubGroup(table); table.AddCommand("list", new TableListCommand(loggerFactory.CreateLogger<TableListCommand>())); var schema = new CommandGroup("schema", "PostgreSQL table schema operations"); table.AddSubGroup(schema); schema.AddCommand("get", new TableSchemaGetCommand(loggerFactory.CreateLogger<TableSchemaGetCommand>())); var server = new CommandGroup("server", "PostgreSQL server operations"); pg.AddSubGroup(server); server.AddCommand("list", new ServerListCommand(loggerFactory.CreateLogger<ServerListCommand>())); var config = new CommandGroup("config", "PostgreSQL server configuration operations"); server.AddSubGroup(config); config.AddCommand("get", new ServerConfigGetCommand(loggerFactory.CreateLogger<ServerConfigGetCommand>())); var param = new CommandGroup("param", "PostgreSQL server parameter operations"); server.AddSubGroup(param); param.AddCommand("get", new ServerParamGetCommand(loggerFactory.CreateLogger<ServerParamGetCommand>())); param.AddCommand("set", new ServerParamSetCommand(loggerFactory.CreateLogger<ServerParamSetCommand>())); } }

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