Skip to main content
Glama

Azure MCP Server

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

Latest Blog Posts

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