Skip to main content
Glama
argocd-mcp

argocd-mcp

Official

Argo CD MCP Server

Eine Implementierung des Model Context Protocol (MCP) -Servers für Argo CD ermöglicht KI-Assistenten die Interaktion mit Ihren Argo CD-Anwendungen über natürliche Sprache. Dieser Server ermöglicht die nahtlose Integration mit Visual Studio Code und anderen MCP-Clients über die Transportprotokolle stdio und Server-Sent Events (SSE).

Dieses Projekt wird von Akuity , den Entwicklern des Argo-Projekts, gepflegt.

Akuity ist das Enterprise-Unternehmen von Argo und Kargo und bietet die grundlegende Plattform für End-to-End-GitOps für Kubernetes. Mit der Akuity-Plattform können Unternehmen mit verwaltetem Argo CD bereitstellen, nahtlos mit Kargo werben und mithilfe von Akuity Monitoring Echtzeit-Einblicke in ihre Infrastruktur erhalten. Akuity wurde von den Argo-Entwicklern Hong Wang, Jesse Suen und Alexander Matyushentsev mit dem Ziel gegründet, Plattform- und Anwendungsteams mit den besten Tools für GitOps im Unternehmensmaßstab auszustatten.


argocd-mcp-demo

Merkmale

  • Transportprotokolle : Unterstützt sowohl den Standard- als auch den SSE-Transportmodus für eine flexible Integration mit verschiedenen Clients

  • Vollständige Argo CD API-Integration : Bietet umfassenden Zugriff auf Argo CD-Ressourcen und -Operationen

  • Bereit für KI-Assistenten : Vorkonfigurierte Tools für KI-Assistenten zur Interaktion mit Argo CD in natürlicher Sprache

Related MCP server: OpsLevel MCP

Installation

Voraussetzungen

Verwendung mit Cursor

  1. Befolgen Sie die Cursor-Dokumentation zur MCP-Unterstützung und erstellen Sie eine .cursor/mcp.json -Datei in Ihrem Projekt:

{
  "mcpServers": {
    "argocd-mcp": {
      "command": "npx",
      "args": [
        "argocd-mcp@latest",
        "stdio"
      ],
      "env": {
        "ARGOCD_BASE_URL": "<argocd_url>",
        "ARGOCD_API_TOKEN": "<argocd_token>"
      }
    }
  }
}
  1. Starten Sie eine Unterhaltung im Agentenmodus, um das MCP zu verwenden.

Verwendung mit VSCode

  1. Befolgen Sie die Anweisungen in der Dokumentation „MCP-Server in VS Code verwenden“ und erstellen Sie in Ihrem Projekt eine Datei .vscode/mcp.json :

{
  "servers": {
    "argocd-mcp-stdio": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "argocd-mcp@latest",
        "stdio"
      ],
      "env": {
        "ARGOCD_BASE_URL": "<argocd_url>",
        "ARGOCD_API_TOKEN": "<argocd_token>"
      }
    }
  }
}
  1. Beginnen Sie eine Unterhaltung mit einem KI-Assistenten in VS Code, der MCP unterstützt.

Verwendung mit Claude Desktop

  1. Befolgen Sie die MCP-Anweisungen in der Claude Desktop-Dokumentation und erstellen Sie eine Konfigurationsdatei claude_desktop_config.json :

{
  "mcpServers": {
    "argocd-mcp": {
      "command": "npx",
      "args": [
        "argocd-mcp@latest",
        "stdio"
      ],
      "env": {
        "ARGOCD_BASE_URL": "<argocd_url>",
        "ARGOCD_API_TOKEN": "<argocd_token>"
      }
    }
  }
}
  1. Konfigurieren Sie Claude Desktop so, dass diese Konfigurationsdatei in den Einstellungen verwendet wird.

Verfügbare Tools

Der Server bietet die folgenden ArgoCD-Verwaltungstools:

Anwendungsmanagement

  • list_applications : Alle Anwendungen auflisten und filtern

  • get_application : Erhalten Sie detaillierte Informationen zu einer bestimmten Anwendung

  • create_application : Erstellen Sie eine neue Anwendung

  • update_application : Aktualisieren Sie eine vorhandene Anwendung

  • delete_application : Löscht eine Anwendung

  • sync_application : Lösen Sie einen Synchronisierungsvorgang für eine Anwendung aus

Ressourcenmanagement

  • get_application_resource_tree : Ruft den Ressourcenbaum für eine bestimmte Anwendung ab

  • get_application_managed_resources : Verwaltete Ressourcen für eine bestimmte Anwendung abrufen

  • get_application_workload_logs : Protokolle für Anwendungs-Workloads abrufen (Pods, Bereitstellungen usw.)

  • get_resource_events : Ereignisse für von einer Anwendung verwaltete Ressourcen abrufen

  • get_resource_actions : Verfügbare Aktionen für Ressourcen abrufen

  • run_resource_action : Führen Sie eine Aktion für eine Ressource aus

Für die Entwicklung

  1. Klonen Sie das Repository:

git clone https://github.com/akuity/argocd-mcp.git
cd argocd-mcp
  1. Projektabhängigkeiten installieren:

pnpm install
  1. Starten Sie den Entwicklungsserver mit aktiviertem Hot Reloading:

# For HTTP mode with hot reloading
pnpm run dev

# For SSE mode with hot reloading
pnpm run dev-sse

Sobald der Server läuft, können Sie den MCP-Server in Visual Studio Code oder einem anderen MCP-Client verwenden.

Aktualisieren von ArgoCD-Typen

So aktualisieren Sie die TypeScript-Typdefinitionen basierend auf der neuesten Argo CD-API-Spezifikation:

  1. Laden Sie die Datei swagger.json von der ArgoCD-Releaseseite herunter. Hier ist beispielsweise der Link zu swagger.json für ArgoCD v2.14.11.

  2. Platzieren Sie die heruntergeladene Datei swagger.json im Stammverzeichnis des argocd-mcp Projekts.

  3. Generieren Sie die TypeScript-Typen aus der Swagger-Definition, indem Sie den folgenden Befehl ausführen. Dadurch wird die Datei src/types/argocd.d.ts erstellt oder überschrieben:

    pnpm run generate-types
  4. Aktualisieren Sie die Datei src/types/argocd-types.ts um die benötigten Typen aus der neu generierten src/types/argocd.d.ts zu exportieren. Dieser Schritt erfordert häufig eine manuelle Überprüfung, um sicherzustellen, dass nur die erforderlichen Typen angezeigt werden.

Available Tools

14 tools
create_applicationC

create_application creates a new ArgoCD application in the specified namespace. The application.metadata.namespace field determines where the Application resource will be created (e.g., "argocd", "argocd-apps", or any custom namespace).

Inputs: application (required).

delete_applicationC

delete_application deletes application. Specify applicationNamespace if the application is in a non-default namespace to avoid permission errors.

Inputs: applicationName (required), applicationNamespace, cascade, propagationPolicy.

get_applicationB

get_application returns application by application name. Optionally specify the application namespace to get applications from non-default namespaces.

Inputs: applicationName (required), applicationNamespace.

get_application_eventsC

get_application_events returns events for application by application name

Inputs: applicationName (required).

get_application_managed_resourcesA

get_application_managed_resources returns managed resources for application by application name with optional filtering. Use filters to avoid token limits with large applications. Examples: kind="ConfigMap" for config maps only, namespace="production" for specific namespace, or combine multiple filters.

Inputs: applicationName (required), kind, namespace, name, +4 more.

get_application_resource_treeC

get_application_resource_tree returns resource tree for application by application name

Inputs: applicationName (required).

get_application_workload_logsC

get_application_workload_logs returns logs for application workload (Deployment, StatefulSet, Pod, etc.) by application name and resource ref and optionally container name

Inputs: applicationName (required), applicationNamespace (required), resourceRef (required), container (required).

get_resource_actionsC

get_resource_actions returns actions for a resource that is managed by an application

Inputs: applicationName (required), applicationNamespace (required), resourceRef (required).

get_resource_eventsC

get_resource_events returns events for a resource that is managed by an application

Inputs: applicationName (required), applicationNamespace (required), resourceUID (required), resourceNamespace (required), +1 more.

get_resourcesA

get_resources return manifests for resources specified by resourceRefs. If resourceRefs is empty or not provided, fetches all resources managed by the application.

Inputs: applicationName (required), applicationNamespace (required), resourceRefs.

list_applicationsC

list_applications returns list of applications

Inputs: search, limit, offset.

run_resource_actionC

run_resource_action runs an action on a resource

Inputs: applicationName (required), applicationNamespace (required), resourceRef (required), action (required).

sync_applicationC

sync_application syncs application. Specify applicationNamespace if the application is in a non-default namespace to avoid permission errors.

Inputs: applicationName (required), applicationNamespace, dryRun, prune, +2 more.

update_applicationD

update_application updates application

Inputs: applicationName (required), application (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 14 tools

    Disambiguation5/5

    Each tool targets a distinct aspect of ArgoCD application management. While get_application_events and get_resource_events could be confused, descriptions clarify their scope. Overall, purposes are clearly separated.

    Naming Consistency5/5

    All tools use consistent snake_case with verb_noun pattern (e.g., create_application, get_application_events). The naming is predictable and follows a clear convention.

    Tool Count5/5

    14 tools is well-scoped for an ArgoCD MCP server, covering CRUD operations, synchronization, logs, events, and resource management without being excessive.

    Completeness4/5

    The tool set covers core application lifecycle (CRUD, sync, logs, events) and resource management. Minor gaps like rollback or version history are missing, but the surface is largely complete for common tasks.

    Maintenance

    ActivityMaintained
    ResponsivenessMostly unanswered

    Related MCP Connectors

    Related MCP Servers