Sign inSign up

talkopsai/argocd-mcp-server

By talkopsai

•Updated 4 months ago

An MCP server that gives AI assistants full control over ArgoCD from app discovery to deployment.

Image
Developer tools
0

605

talkopsai/argocd-mcp-server repository overview

⁠ArgoCD MCP Server

A comprehensive Model Context Protocol (MCP) server for managing Kubernetes workloads via ArgoCD using GitOps principles. This image allows AI assistants (like Claude) to perform secure, production-grade ArgoCD operations, including repository onboarding, application deployments, rollbacks, and intelligent debugging.

⁠✨ Features

  • End-to-End Deployments: Create applications, preview deployment diffs, and orchestrate manual or auto-sync deployments.
  • Smart Debugging: Analyze sync states, automatically extract and summarize raw pod error logs (e.g., CrashLoopBackOff, Exceptions), and fetch Kubernetes event histories.
  • Repository Management: Securely onboard GitHub/GitLab repositories via HTTPS or SSH directly from chat.
  • Multi-Tenant Projects: Create and manage ArgoCD projects to isolate teams, restrict namespaces, and control repository access.
  • Safe Rollbacks: Intelligently rollback deployments to previous states or exact Git commit hashes.
  • Declarative GitOps: Generate infrastructure-as-code manifests (like AppProject or v1/Secret) to commit back to Git.
  • Built-in Guidance: Includes built-in workflow prompts to guide the AI step-by-step through complex deployment and debugging scenarios.

⁠🚀 How to use this image

This Docker image is designed to be used as an MCP server. It requires access to your ArgoCD API server and authentication credentials.

⁠Running Standalone (HTTP Transport)

Run the container mapping port 8770 so clients can connect locally:

docker run --rm -it \
  -p 8770:8770 \
  -e ARGOCD_SERVER_URL="https://host.docker.internal:8080" \
  -e ARGOCD_AUTH_TOKEN="your-token-here" \
  -e MCP_PORT=8770 \
  -e MCP_PATH="/mcp" \
  -e ARGOCD_INSECURE="true" \
  -e GIT_PASSWORD="your-github-pat" \
  -e MCP_ALLOW_WRITE=true \
  -e GIT_USERNAME="your-github-username" \
  talkopsai/argocd-mcp-server:latest

Then configure your MCP client to connect over HTTP/SSE:

{
  "mcpServers": {
    "argocd-mcp-server": {
      "serverUrl": "http://localhost:8770/mcp",
      "disabled": false,
      "disabledTools": []
    }
  }
}
⁠Important: Environment Variables

Authentication is entirely handled via environment variables to keep your credentials secure. At a minimum, you must provide ARGOCD_SERVER_URL and ARGOCD_AUTH_TOKEN. If you plan on having the AI onboard private git repositories, you should also provide GIT_USERNAME and GIT_PASSWORD.


⁠🛠️ Configuration (Claude Desktop - Stdio)

To use this image securely over stdio transport directly inside Claude Desktop, format the invocation like this:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "argocd-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e", "ARGOCD_SERVER_URL=https://host.docker.internal:8080",
        "-e", "ARGOCD_AUTH_TOKEN=your_argocd_token",
        "-e", "ARGOCD_INSECURE=true",
        "-e", "GIT_USERNAME=your_git_username",
        "-e", "GIT_PASSWORD=YOUR_GITHUB_PAT",
        "-e", "MCP_ALLOW_WRITE=true",
        "-e", "MCP_LOG_LEVEL=INFO",
        "-e", "MCP_TRANSPORT=stdio",
        "talkopsai/argocd-mcp-server:latest"
      ]
    }
  }
}

⁠⚙️ Environment Variables

The image supports several environment variables for authentication and advanced configuration:

VariableDefaultDescription
ARGOCD_SERVER_URLNone(Required) The URL of your ArgoCD server API
ARGOCD_AUTH_TOKENNone(Required) Bearer token or Session token for API authentication
ARGOCD_INSECUREfalseSet to true to disable TLS verification (for self-signed certs)
GIT_USERNAMENoneUsername for HTTPS Git repository onboarding
GIT_PASSWORDNonePassword/Personal Access Token for HTTPS Git repo onboarding
SSH_PRIVATE_KEY_PATH~/.ssh/id_rsaPath inside the container to the SSH key for Git repo onboarding
MCP_TRANSPORThttpTransport protocol (stdio or http/sse)
MCP_HOST0.0.0.0Host interface to bind to (if HTTP transport)
MCP_PORT8770Port to bind to (if HTTP transport)
MCP_LOG_LEVELINFOLogging level (DEBUG, INFO, WARNING, ERROR)

⁠🔐 Security Best Practices

  1. Personal Access Tokens: Always use a Personal Access Token (PAT) for the GIT_PASSWORD environment variable rather than your actual Git account password.
  2. ArgoCD Least Privilege: Ensure the ARGOCD_AUTH_TOKEN belongs to an ArgoCD Service Account or Role that is strictly scoped (via ArgoCD RBAC) to the projects and permissions the AI needs. Do not provide a cluster-admin token if not necessary.
  3. Hidden Credentials: Never expose your passwords in chat. By pre-loading them into the Docker container via environment variables, the AI can authenticate infrastructure securely under the hood without ever logging the secrets.

If you find this MCP server useful, consider leaving a ⭐ on the GitHub repository⁠!

Tag summary

Content type

Image

Digest

sha256:615cf7efe…

Size

78.7 MB

Last updated

4 months ago

docker pull talkopsai/argocd-mcp-server