{"id":28955904,"url":"https://github.com/lokimcpuniverse/argocd-mcp-server","last_synced_at":"2026-04-18T00:31:27.779Z","repository":{"id":298045530,"uuid":"998661156","full_name":"LokiMCPUniverse/argocd-mcp-server","owner":"LokiMCPUniverse","description":"MCP server for ArgoCD - GitOps continuous delivery for Kubernetes with GenAI","archived":false,"fork":false,"pushed_at":"2025-06-09T04:39:53.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-09T05:24:30.105Z","etag":null,"topics":["ai-agents","argocd","cd","deployment","devops","genai","gitops","k8s","kubernetes","mcp","model-context-protocol"],"latest_commit_sha":null,"homepage":"https://github.com/asklokesh/mcp-servers","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LokiMCPUniverse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-09T03:41:57.000Z","updated_at":"2025-06-09T04:39:58.000Z","dependencies_parsed_at":"2025-06-09T05:35:05.850Z","dependency_job_id":null,"html_url":"https://github.com/LokiMCPUniverse/argocd-mcp-server","commit_stats":null,"previous_names":["lokimcpuniverse/argocd-mcp-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LokiMCPUniverse/argocd-mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LokiMCPUniverse%2Fargocd-mcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LokiMCPUniverse%2Fargocd-mcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LokiMCPUniverse%2Fargocd-mcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LokiMCPUniverse%2Fargocd-mcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LokiMCPUniverse","download_url":"https://codeload.github.com/LokiMCPUniverse/argocd-mcp-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LokiMCPUniverse%2Fargocd-mcp-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261548757,"owners_count":23175502,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","argocd","cd","deployment","devops","genai","gitops","k8s","kubernetes","mcp","model-context-protocol"],"created_at":"2025-06-23T20:12:05.180Z","updated_at":"2026-04-18T00:31:27.734Z","avatar_url":"https://github.com/LokiMCPUniverse.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArgoCD MCP Server\n\n\u003cdiv align=\"center\"\u003e\n\n# Argocd Mcp Server\n\n[![GitHub stars](https://img.shields.io/github/stars/LokiMCPUniverse/argocd-mcp-server?style=social)](https://github.com/LokiMCPUniverse/argocd-mcp-server/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/LokiMCPUniverse/argocd-mcp-server?style=social)](https://github.com/LokiMCPUniverse/argocd-mcp-server/network)\n[![GitHub watchers](https://img.shields.io/github/watchers/LokiMCPUniverse/argocd-mcp-server?style=social)](https://github.com/LokiMCPUniverse/argocd-mcp-server/watchers)\n\n[![License](https://img.shields.io/github/license/LokiMCPUniverse/argocd-mcp-server?style=for-the-badge)](https://github.com/LokiMCPUniverse/argocd-mcp-server/blob/main/LICENSE)\n[![Issues](https://img.shields.io/github/issues/LokiMCPUniverse/argocd-mcp-server?style=for-the-badge)](https://github.com/LokiMCPUniverse/argocd-mcp-server/issues)\n[![Pull Requests](https://img.shields.io/github/issues-pr/LokiMCPUniverse/argocd-mcp-server?style=for-the-badge)](https://github.com/LokiMCPUniverse/argocd-mcp-server/pulls)\n[![Last Commit](https://img.shields.io/github/last-commit/LokiMCPUniverse/argocd-mcp-server?style=for-the-badge)](https://github.com/LokiMCPUniverse/argocd-mcp-server/commits)\n\n[![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge\u0026logo=python\u0026logoColor=white)](https://python.org)\n[![MCP](https://img.shields.io/badge/Model_Context_Protocol-DC143C?style=for-the-badge)](https://modelcontextprotocol.io)\n\n[![Commit Activity](https://img.shields.io/github/commit-activity/m/LokiMCPUniverse/argocd-mcp-server?style=flat-square)](https://github.com/LokiMCPUniverse/argocd-mcp-server/pulse)\n[![Code Size](https://img.shields.io/github/languages/code-size/LokiMCPUniverse/argocd-mcp-server?style=flat-square)](https://github.com/LokiMCPUniverse/argocd-mcp-server)\n[![Contributors](https://img.shields.io/github/contributors/LokiMCPUniverse/argocd-mcp-server?style=flat-square)](https://github.com/LokiMCPUniverse/argocd-mcp-server/graphs/contributors)\n\n\u003c/div\u003e\n\nA Model Context Protocol (MCP) server for integrating ArgoCD GitOps continuous delivery tool with GenAI applications, enabling intelligent Kubernetes deployment management.\n\n## Features\n\n- **Comprehensive ArgoCD API Coverage**:\n  - Application Management: Create, sync, delete, rollback applications\n  - Project Management: Configure projects, roles, and policies\n  - Repository Management: Add/remove Git repositories, Helm charts\n  - Cluster Management: Register and manage Kubernetes clusters\n  - Sync Operations: Manual/auto sync, sync windows, hooks\n  - Health Monitoring: Application health, sync status, resource tree\n  - RBAC Management: Users, roles, policies, JWT tokens\n  - GitOps Workflows: Automated deployments from Git commits\n  - Multi-tenancy: Namespace isolation, project restrictions\n  - Application Sets: Template-based multi-cluster deployments\n\n- **Authentication Methods**:\n  - JWT Token authentication\n  - API Token authentication\n  - OIDC/OAuth2 integration\n  - LDAP authentication support\n\n- **Enterprise Features**:\n  - Multi-cluster support\n  - Disaster recovery workflows\n  - Progressive delivery (Canary, Blue-Green)\n  - Automated rollback on failures\n  - Audit logging and compliance\n  - Resource optimization\n  - Secret management integration\n\n## Installation\n\n```bash\npip install argocd-mcp-server\n```\n\nOr install from source:\n\n```bash\ngit clone https://github.com/asklokesh/argocd-mcp-server.git\ncd argocd-mcp-server\npip install -e .\n```\n\n## Configuration\n\nCreate a `.env` file or set environment variables:\n\n```env\n# ArgoCD Connection\nARGOCD_SERVER=argocd.example.com\nARGOCD_AUTH_TOKEN=your_auth_token\nARGOCD_INSECURE=false\n\n# Optional Settings\nARGOCD_GRPC_WEB=true\nARGOCD_TIMEOUT=30\nARGOCD_CLIENT_CERT=/path/to/cert.pem\nARGOCD_CLIENT_KEY=/path/to/key.pem\n\n# Multi-Cluster Support\nARGOCD_PROD_SERVER=argocd-prod.example.com\nARGOCD_PROD_TOKEN=prod_token\n\nARGOCD_DEV_SERVER=argocd-dev.example.com\nARGOCD_DEV_TOKEN=dev_token\n```\n\n## Quick Start\n\n### Basic Usage\n\n```python\nfrom argocd_mcp import ArgoCDMCPServer\n\n# Initialize the server\nserver = ArgoCDMCPServer()\n\n# Start the server\nserver.start()\n```\n\n### Claude Desktop Configuration\n\nAdd to your Claude Desktop config:\n\n```json\n{\n  \"mcpServers\": {\n    \"argocd\": {\n      \"command\": \"python\",\n      \"args\": [\"-m\", \"argocd_mcp.server\"],\n      \"env\": {\n        \"ARGOCD_SERVER\": \"argocd.example.com\",\n        \"ARGOCD_AUTH_TOKEN\": \"your_auth_token\"\n      }\n    }\n  }\n}\n```\n\n## Available Tools\n\n### Application Management\n\n#### List Applications\n```python\n{\n  \"tool\": \"argocd_list_applications\",\n  \"arguments\": {\n    \"project\": \"default\",\n    \"namespace\": \"argocd\"\n  }\n}\n```\n\n#### Create Application\n```python\n{\n  \"tool\": \"argocd_create_application\",\n  \"arguments\": {\n    \"name\": \"my-app\",\n    \"project\": \"default\",\n    \"source\": {\n      \"repoURL\": \"https://github.com/org/repo.git\",\n      \"path\": \"manifests\",\n      \"targetRevision\": \"main\"\n    },\n    \"destination\": {\n      \"server\": \"https://kubernetes.default.svc\",\n      \"namespace\": \"production\"\n    },\n    \"syncPolicy\": {\n      \"automated\": {\n        \"prune\": true,\n        \"selfHeal\": true\n      }\n    }\n  }\n}\n```\n\n#### Sync Application\n```python\n{\n  \"tool\": \"argocd_sync_application\",\n  \"arguments\": {\n    \"name\": \"my-app\",\n    \"prune\": true,\n    \"force\": false,\n    \"strategy\": {\n      \"hook\": {\n        \"force\": true\n      }\n    }\n  }\n}\n```\n\n#### Get Application Status\n```python\n{\n  \"tool\": \"argocd_get_application_status\",\n  \"arguments\": {\n    \"name\": \"my-app\",\n    \"refresh\": true\n  }\n}\n```\n\n#### Rollback Application\n```python\n{\n  \"tool\": \"argocd_rollback_application\",\n  \"arguments\": {\n    \"name\": \"my-app\",\n    \"revision\": \"abc123\"\n  }\n}\n```\n\n### Project Management\n\n#### Create Project\n```python\n{\n  \"tool\": \"argocd_create_project\",\n  \"arguments\": {\n    \"name\": \"production\",\n    \"description\": \"Production applications\",\n    \"sourceRepos\": [\"https://github.com/org/*\"],\n    \"destinations\": [\n      {\n        \"server\": \"https://kubernetes.default.svc\",\n        \"namespace\": \"prod-*\"\n      }\n    ],\n    \"clusterResourceWhitelist\": [\n      {\"group\": \"*\", \"kind\": \"*\"}\n    ]\n  }\n}\n```\n\n### Repository Management\n\n#### Add Repository\n```python\n{\n  \"tool\": \"argocd_add_repository\",\n  \"arguments\": {\n    \"url\": \"https://github.com/org/repo.git\",\n    \"name\": \"my-repo\",\n    \"type\": \"git\",\n    \"username\": \"git-user\",\n    \"password\": \"git-token\",\n    \"insecure\": false\n  }\n}\n```\n\n#### Add Helm Repository\n```python\n{\n  \"tool\": \"argocd_add_helm_repository\",\n  \"arguments\": {\n    \"url\": \"https://charts.example.com\",\n    \"name\": \"my-charts\",\n    \"type\": \"helm\",\n    \"username\": \"helm-user\",\n    \"password\": \"helm-password\"\n  }\n}\n```\n\n### Cluster Management\n\n#### Add Cluster\n```python\n{\n  \"tool\": \"argocd_add_cluster\",\n  \"arguments\": {\n    \"name\": \"production-cluster\",\n    \"server\": \"https://k8s-prod.example.com\",\n    \"config\": {\n      \"bearerToken\": \"cluster-token\",\n      \"tlsClientConfig\": {\n        \"insecure\": false,\n        \"caData\": \"base64-encoded-ca\"\n      }\n    }\n  }\n}\n```\n\n### Application Sets\n\n#### Create ApplicationSet\n```python\n{\n  \"tool\": \"argocd_create_applicationset\",\n  \"arguments\": {\n    \"name\": \"multi-cluster-app\",\n    \"generators\": [\n      {\n        \"clusters\": {},\n        \"selector\": {\n          \"matchLabels\": {\n            \"environment\": \"production\"\n          }\n        }\n      }\n    ],\n    \"template\": {\n      \"metadata\": {\n        \"name\": \"{{cluster}}-app\"\n      },\n      \"spec\": {\n        \"project\": \"default\",\n        \"source\": {\n          \"repoURL\": \"https://github.com/org/repo.git\",\n          \"path\": \"{{cluster}}\"\n        },\n        \"destination\": {\n          \"server\": \"{{server}}\",\n          \"namespace\": \"default\"\n        }\n      }\n    }\n  }\n}\n```\n\n### Health and Monitoring\n\n#### Get Application Health\n```python\n{\n  \"tool\": \"argocd_get_application_health\",\n  \"arguments\": {\n    \"name\": \"my-app\"\n  }\n}\n```\n\n#### Get Resource Tree\n```python\n{\n  \"tool\": \"argocd_get_resource_tree\",\n  \"arguments\": {\n    \"name\": \"my-app\"\n  }\n}\n```\n\n## Advanced Configuration\n\n### Multi-Cluster GitOps\n\n```python\nfrom argocd_mcp import ArgoCDMCPServer, ClusterConfig\n\n# Configure multiple ArgoCD instances\nclusters = {\n    \"production\": ClusterConfig(\n        server=\"argocd-prod.example.com\",\n        auth_token=\"prod_token\",\n        default_namespace=\"argocd\"\n    ),\n    \"staging\": ClusterConfig(\n        server=\"argocd-staging.example.com\",\n        auth_token=\"staging_token\",\n        default_namespace=\"argocd-staging\"\n    ),\n    \"development\": ClusterConfig(\n        server=\"argocd-dev.example.com\",\n        auth_token=\"dev_token\",\n        default_namespace=\"argocd-dev\"\n    )\n}\n\nserver = ArgoCDMCPServer(clusters=clusters, default_cluster=\"production\")\n```\n\n### Progressive Delivery\n\n```python\n# Configure progressive delivery strategies\nprogressive_config = {\n    \"canary\": {\n        \"steps\": [\n            {\"setWeight\": 10},\n            {\"pause\": {\"duration\": \"5m\"}},\n            {\"setWeight\": 30},\n            {\"pause\": {\"duration\": \"5m\"}},\n            {\"setWeight\": 50},\n            {\"pause\": {\"duration\": \"5m\"}},\n            {\"setWeight\": 100}\n        ]\n    },\n    \"blueGreen\": {\n        \"activeService\": \"app-active\",\n        \"previewService\": \"app-preview\",\n        \"autoPromotionEnabled\": false\n    }\n}\n\nserver = ArgoCDMCPServer(progressive_config=progressive_config)\n```\n\n### Disaster Recovery\n\n```python\nfrom argocd_mcp import ArgoCDMCPServer, DisasterRecoveryConfig\n\ndr_config = DisasterRecoveryConfig(\n    backup_enabled=True,\n    backup_schedule=\"0 2 * * *\",  # Daily at 2 AM\n    backup_location=\"s3://backups/argocd\",\n    restore_priority=[\"production\", \"staging\", \"development\"]\n)\n\nserver = ArgoCDMCPServer(dr_config=dr_config)\n```\n\n## Integration Examples\n\nSee the `examples/` directory for complete integration examples:\n\n- `basic_gitops.py` - Basic GitOps workflows\n- `multi_cluster_deployment.py` - Multi-cluster application deployment\n- `progressive_delivery.py` - Canary and blue-green deployments\n- `disaster_recovery.py` - Backup and restore workflows\n- `genai_gitops.py` - AI-powered GitOps automation\n- `security_scanning.py` - Integration with security tools\n\n## Security Best Practices\n\n1. **Use service accounts** with minimal permissions\n2. **Enable RBAC** with proper policies\n3. **Implement network policies** for cluster isolation\n4. **Use sealed secrets** or external secret operators\n5. **Enable audit logging** for compliance\n6. **Implement admission controllers** for policy enforcement\n7. **Regular security scanning** of images and manifests\n\n## Error Handling\n\nThe server provides detailed error information:\n\n```python\ntry:\n    result = server.execute_tool(\"argocd_sync_application\", {\n        \"name\": \"my-app\"\n    })\nexcept ArgoCDError as e:\n    print(f\"ArgoCD error: {e.error_code} - {e.message}\")\n    if e.error_code == \"OutOfSync\":\n        print(\"Application is out of sync\")\n    elif e.error_code == \"ComparisonError\":\n        print(\"Error comparing application state\")\n```\n\n## Performance Optimization\n\n1. **Use application sets** for similar apps\n2. **Enable resource caching** in ArgoCD\n3. **Implement sync windows** to control deployment times\n4. **Use webhook notifications** instead of polling\n5. **Optimize manifest generation** with Helm/Kustomize\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Sync failures**\n   - Check application logs\n   - Verify repository access\n   - Review resource quotas\n\n2. **Authentication errors**\n   - Verify token validity\n   - Check RBAC policies\n   - Review server connectivity\n\n3. **Performance issues**\n   - Check ArgoCD server resources\n   - Review application count\n   - Optimize manifest size\n\n## Contributing\n\nContributions are welcome! Please read our contributing guidelines and submit pull requests.\n\n## License\n\nMIT License - see LICENSE file for details","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flokimcpuniverse%2Fargocd-mcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flokimcpuniverse%2Fargocd-mcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flokimcpuniverse%2Fargocd-mcp-server/lists"}