Unverified Commit b0bc2080 authored by tomberek's avatar tomberek Committed by GitHub
Browse files

aks-mcp-server: init at v0.0.08 (#443662)

parents 48bfbfe0 7d75b5a7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -20768,6 +20768,12 @@
    githubId = 20863431;
    name = "Prithak S.";
  };
  priyaananthasankar = {
    name = "Priya Ananthasankar";
    github = "priyaananthasankar";
    githubId = 10415876;
    email = "priyagituniverse@gmail.com";
  };
  ProducerMatt = {
    name = "Matthew Pherigo";
    email = "ProducerMatt42@gmail.com";
+79 −0
Original line number Diff line number Diff line
{
  lib,
  buildGoModule,
  fetchFromGitHub,
  installShellFiles,
  makeBinaryWrapper,
  azure-cli,
  kubectl,
  stdenv,
}:

buildGoModule (finalAttrs: {
  pname = "aks-mcp-server";
  version = "0.0.8";

  src = fetchFromGitHub {
    owner = "Azure";
    repo = "aks-mcp";
    rev = "v${finalAttrs.version}";
    hash = "sha256-DLdNMMsBu/FpE1+39vydWLAXrotIeQ7xjnaFBYsovQQ=";
  };

  vendorHash = "sha256-Hks0iGUu5KmnZwm0TmwrYZzy/pIV3Q9mRnzvQkB1t8M=";

  subPackages = [ "cmd/aks-mcp" ];

  nativeBuildInputs = [
    installShellFiles
    makeBinaryWrapper
  ];

  # Disable CGO and set environment variables
  env.CGO_ENABLED = "0";

  tags = [ "withoutebpf" ];

  ldflags = [
    "-s"
    "-w"
    "-X github.com/Azure/aks-mcp/internal/version.GitVersion=${finalAttrs.version}"
    "-X github.com/Azure/aks-mcp/internal/version.GitCommit=${finalAttrs.src.rev}"
    "-X github.com/Azure/aks-mcp/internal/version.GitTreeState=clean"
    "-X github.com/Azure/aks-mcp/internal/version.BuildDate=1970-01-01T00:00:00Z"
  ];

  checkFlags = [
    "-skip=TestAzure"
    "-skip=TestExecutor"
    "-skip=TestClient"
  ];

  postInstall = ''


    wrapProgram $out/bin/aks-mcp \
      --set-default AKS_MCP_COLLECT_TELEMETRY false \
      --prefix PATH : ${
        lib.makeBinPath [
          azure-cli
          kubectl
        ]
      }
  '';

  meta = {
    description = "Model Context Protocol server for Azure Kubernetes Service";
    longDescription = ''
      The AKS-MCP server enables AI assistants to interact with Azure Kubernetes
      Service clusters through the Model Context Protocol. It translates natural
      language requests into AKS operations and provides cluster information,
      network details, and resource management capabilities.
    '';
    homepage = "https://github.com/Azure/aks-mcp";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ priyaananthasankar ];
    platforms = lib.platforms.unix; # Now supports both Linux and macOS with withoutebpf
    mainProgram = "aks-mcp-server";
  };
})