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
BaseServerCommand.cs•1.11 KiB
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using AzureMcp.Core.Commands;
using AzureMcp.Postgres.Options;
using Microsoft.Extensions.Logging;
namespace AzureMcp.Postgres.Commands;
public abstract class BaseServerCommand<
[DynamicallyAccessedMembers(TrimAnnotations.CommandAnnotations)] TOptions>(ILogger<BasePostgresCommand<TOptions>> logger)
: BasePostgresCommand<TOptions>(logger) where TOptions : BasePostgresOptions, new()
{
private readonly Option<string> _serverOption = PostgresOptionDefinitions.Server;
public override string Name => "server";
public override string Description =>
"Retrieves information about a PostgreSQL server.";
protected override void RegisterOptions(Command command)
{
base.RegisterOptions(command);
command.AddOption(_serverOption);
}
protected override TOptions BindOptions(ParseResult parseResult)
{
var options = base.BindOptions(parseResult);
options.Server = parseResult.GetValueForOption(_serverOption);
return options;
}
}