ArgoCD MCP server
The ArgoCD MCP Server is a Model Context Protocol server for GitOps continuous delivery on Kubernetes. It exposes 29 tools, real-time MCP resources (argocd://), and operational prompts covering the complete ArgoCD v2.x lifecycle—repository onboarding, AppProject multi-tenancy, application creation, manifest diffing, dry-run synchronization, health diagnostics, and revision rollbacks.
Manage applications, preview live vs. desired manifest diffs, trigger dry-run or live syncs, onboard repositories, and configure RBAC projects.
Default to read-only diagnostics (MCP_ALLOW_WRITE=false) and keep ArgoCD API tokens and Git credentials isolated in server environment variables.
Stream live application health (argocd://applications), sync metrics, and multi-step deployment/rollback playbooks.
End-to-end patterns for onboarding GitHub repositories, debugging OutOfSync or Degraded apps, and executing emergency rollbacks.
Core capabilities
| Domain | Capabilities |
|---|---|
| Application Lifecycle | Create, update, validate, and delete ArgoCD Application resources; inspect per-resource health, sync status, and Kubernetes event streams. |
| Sync & Rollback Operations | Preview live vs. target Git manifest diffs, run dry-run syncs, prune orphaned resources, hard/soft refresh caches, cancel in-flight operations, and roll back to previous revisions. |
| Repository Onboarding | Register and validate HTTPS or SSH Git repositories using server-side credentials that are never exposed to the LLM context window. |
| Projects & Multi-Tenancy | Create AppProject resources with scoped source repositories, destination clusters/namespaces, resource allow/deny lists, and RBAC roles. |
| Diagnostics & Log Analysis | Retrieve pod logs with automatic error-line filtering, correlate failed sync hooks, and inspect cluster-wide GitOps health metrics. |
Architecture
Quickstart
Ensure you have a running ArgoCD v2.x instance and an authentication token (ARGOCD_AUTH_TOKEN).
Run the Docker image and pass your ArgoCD server URL and credentials via environment variables:
docker run --rm -it \
-p 8770:8770 \
-e ARGOCD_SERVER_URL="https://host.docker.internal:8080" \
-e ARGOCD_AUTH_TOKEN="your-argocd-token" \
-e MCP_PORT=8770 \
-e MCP_PATH="/mcp" \
-e ARGOCD_INSECURE="true" \
-e MCP_ALLOW_WRITE="false" \
talkopsai/argocd-mcp-server:latest
Use host.docker.internal:8080 when connecting to a locally port-forwarded ArgoCD server (kubectl port-forward svc/argocd-server -n argocd 8080:443). Set MCP_ALLOW_WRITE="true" only when you want to permit sync, create, or rollback mutations.
Register the server URL in your MCP client configuration:
{
"mcpServers": {
"argocd-mcp-server": {
"url": "http://localhost:8770/mcp",
"disabled": false
}
}
}
Security model
- Read-only by default: Keep
MCP_ALLOW_WRITE=falsefor observability and incident triage so agents can inspect diffs, events, and logs without mutating GitOps state. - Server-side credential isolation: Git tokens (
GIT_PASSWORD,SSH_PRIVATE_KEY_PATH) andARGOCD_AUTH_TOKENremain inside the MCP server process and are never required as LLM tool arguments. - Dry-run verification: Always preview manifest diffs (
get_application_diff) and runsync_application(dry_run=True)before applying production changes.
Project structure
argocd-mcp-server/
├── argocd_mcp_server/
│ ├── tools/ # 29 MCP tools (apps, deploy, repos, projects, diagnostics)
│ ├── resources/ # Real-time argocd:// resource streams
│ ├── prompts/ # Guided deployment, onboarding, and rollback workflows
│ ├── services/ # Async ArgoCD REST/gRPC client services
│ ├── server/ # FastMCP server setup
│ └── utils/ # Validation and formatting helpers
├── scripts/ # Token helper utilities (fetch_argocd_token.py)
├── tests/ # Unit and integration tests
└── pyproject.toml # Project configuration