MA

matthisholleville/argocd-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

11 stars 4 forks 质量 78 趋势 16MIT

MCP server that exposes the entire ArgoCD API to LLMs all endpoints, not just a handful. Reads ArgoCD's OpenAPI spec at startup, zero hardcoded tools.

概览

The entire ArgoCD API, exposed to LLMs via MCP. 103+ endpoints. Zero hardcoded handlers. Two modes: search or generated tools. Quick Start • How It Works • OAuth • OIDC • Configuration Most ArgoCD MCP servers hardcode a few operations: list apps, sync, get status. When ArgoCD adds a new feature, you wait for the maintainer to add it. takes a different approach, inspired by Cloudflare's MCP server which covers 2500+ endpoints with only 2 tools. It reads ArgoCD's OpenAPI spec at startup and exposes every endpoint through just 2 tools: search and execute. New ArgoCD version? Restart the server. Done.

README

以下为原文 README 节选,完整内容请查看原文。

argocd-mcp

The entire ArgoCD API, exposed to LLMs via MCP. 103+ endpoints. Zero hardcoded handlers. Two modes: search or generated tools.

Quick Start • How It Works • OAuth • OIDC • Configuration


Most ArgoCD MCP servers hardcode a few operations: list apps, sync, get status. When ArgoCD adds a new feature, you wait for the maintainer to add it.

argocd-mcp takes a different approach, inspired by Cloudflare’s MCP server which covers 2500+ endpoints with only 2 tools. It reads ArgoCD’s OpenAPI spec at startup and exposes every endpoint through just 2 tools: search and execute. New ArgoCD version? Restart the server. Done.

  • 103+ endpoints from ArgoCD’s OpenAPI spec, zero hardcoded handlers
  • Two tool modes: search (2 meta-tools) or generated (1 typed tool per endpoint)
  • Works with Claude Desktop, Claude Code, Cursor, or any MCP client
  • No code per endpoint — the OpenAPI spec is the source of truth
  • Three auth modes: static token, OAuth via ArgoCD Dex, or OAuth via the external OIDC provider ArgoCD trusts (both give per-user RBAC)
  • Read-only mode — disable all write operations with a single flag
  • Resource scoping — restrict which ArgoCD resources are exposed with ALLOWED_RESOURCES
  • Rate limiting — per-user token bucket to protect ArgoCD from excessive calls
  • Prompt templates — pre-packaged workflows for common operations (unhealthy apps, diff, rollback, logs)
  • Audit logging — structured JSON logs for every tool call (user, method, path, status, duration)
  • MCP annotations — tools are annotated as read-only, destructive, or idempotent for proper client categorization
  • Optional semantic search via Ollama embeddings

How It Works

At startup, the server fetches ArgoCD’s Swagger spec and parses every endpoint. Then it exposes them to LLMs via one of two modes:

Search mode (default, TOOL_MODE=search)

Two meta-tools handle all 103+ endpoints. The LLM discovers endpoints by searching, then calls them via a generic executor.

graph TD
    A[ArgoCD /swagger.json] -->|Fetch at startup| B[Parse Swagger 2.0]
    B --> C[103+ Endpoints in memory]
    C --> D[search_operations]
    C --> E[execute_operation]
    D -->|LLM discovers endpoints| F[Returns method, path, summary, params]
    E -->|LLM calls API| G[Proxies to ArgoCD with user token]

Generated mode (TOOL_MODE=generated)

在 GitHub 查看完整 README

安装

docker run --rm -i -e ARGOCD_BASE_URL=https://argocd.example.com -e ARGOCD_TOKEN=your-token ghcr.io/matthisholleville/argocd-mcp:latest
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "argocd": { "command": "docker", "args": ["run", "--rm", "-i", "-e", "ARGOCD_BASE_URL=https://argocd.example.com", "-e", "ARGOCD_TOKEN=your-token", "ghcr.io/matthisholleville/argocd-mcp:latest" ] } } }