Skip to main content

ArgoCD MCP Server

Python 3.12+ MCP License: Apache 2.0 ArgoCD GitHub Discord

A comprehensive Model Context Protocol (MCP) server for managing Kubernetes applications via ArgoCD using GitOps principles. Designed for AI assistants to perform secure, production-grade ArgoCD operations with deep observability, validation, and guided workflows.


✨ Features

🎯 Application Management

  • Create, update, and delete ArgoCD applications
  • List applications across clusters with health and sync status
  • Get detailed application information including resource breakdown
  • Validate application configurations before deployment
  • View application events and audit trails

🚀 Deployment & Operations

  • Sync applications to desired state (with dry-run support)
  • Get deployment diffs to preview changes
  • Monitor sync operations in real-time
  • Rollback to previous versions with impact analysis
  • Prune orphaned resources
  • Hard and soft refresh operations
  • Cancel ongoing deployments

📦 Repository Management

  • Onboard GitHub repositories via HTTPS or SSH
  • Validate repository connections before onboarding
  • List and manage registered repositories
  • Delete repositories from ArgoCD
  • Generate Kubernetes secret manifests for disaster recovery
  • Secure credential handling (never exposed to LLM)

🏢 Project Management (Multi-Tenancy)

  • Create ArgoCD projects with RBAC policies
  • Define source repository patterns (wildcards supported)
  • Configure destination clusters and namespaces
  • Whitelist/blacklist cluster and namespace resources
  • Generate AppProject YAML manifests

🔍 Monitoring & Debugging

  • Real-time application health metrics
  • Smart log analysis with automatic error detection
  • Cluster-wide health overview
  • Active sync operation tracking
  • Deployment event streams
  • Comprehensive troubleshooting workflows

📚 Guided Workflows (Prompts)

  • Repository onboarding: Step-by-step GitHub integration
  • Full deployment: End-to-end from repo to running app
  • Debugging: Automated issue diagnosis with recommendations
  • Rollback: Guided recovery with history and impact preview
  • Project setup: Multi-tenancy configuration assistant
  • Deployment validation: Comprehensive post-deployment checks

🏗️ Architecture


📦 Quick Start

Prerequisites

RequirementDescription
ArgoCD ServerRunning ArgoCD instance (v2.x)
ArgoCD TokenAPI authentication token
DockerFor containerized deployment (recommended)
Python 3.12+For local installation
Git CredentialsHTTPS token or SSH key for repo onboarding

Docker Quick Start

# Pull and run with default configuration
docker pull sandeep2014/talkops-mcp:argocd-mcp-server-latest

docker run --rm -it \
-p 8765:8765 \
-v ~/.ssh/id_ed25519:/app/.ssh/id_rsa:ro \
-e ARGOCD_SERVER_URL="https://argocd.example.com" \
-e ARGOCD_AUTH_TOKEN="your-token-here" \
-e SSH_PRIVATE_KEY_PATH=/app/.ssh/id_rsa \
-e MCP_ALLOW_WRITE="true" \
sandeep2014/talkops-mcp:argocd-mcp-server-latest

Connect Your MCP Client

{
"mcpServers": {
"argocd-mcp-server": {
"transport": "sse",
"url": "http://localhost:8765/sse",
"description": "ArgoCD MCP Server for GitOps application management"
}
}
}

🔒 Security Considerations

PracticeDescription
Read-Only ModeDefault mode prevents all mutating operations
Credential IsolationSecrets never passed to LLM
Write Access ControlGranular operation permissions
TLS VerificationSecure ArgoCD connections
Dry-run SupportPreview changes before applying
Environment VariablesBest practices for secret management

📁 Project Structure

argocd-mcp-server/
├── argocd_mcp_server/ # Main package
│ ├── tools/ # MCP Tools (29 total)
│ │ ├── application_manager/ # Application lifecycle tools
│ │ ├── deployment_executor/ # Deployment and sync tools
│ │ ├── repository_mgmt/ # Repository management tools
│ │ └── project_mgmt/ # Project management tools
│ ├── resources/ # MCP Resources (5 total)
│ ├── prompts/ # MCP Prompts (7 total)
│ ├── services/ # Business logic layer
│ ├── server/ # FastMCP server setup
│ ├── static/ # Static documentation
│ └── config.py # Configuration management
├── scripts/ # Helper scripts
├── tests/ # Test suite
└── pyproject.toml # Project configuration

🙏 Acknowledgments


Next Steps