About Argocd MCP Server
Argocd MCP Server is an MCP server published by toyamagu-2021 in the Developer Tools category: argoCD MCP Server. It has been installed 0 times through Conduid.
The repository has 3 stars and 0 forks, with the last commit 7 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.
Install
npx argocd-mcp-serverThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Argocd MCP Server
Powered by Claude · Grounded in docs
Security checks
- ·README presentNot checked yet.
- ·License declaredNot checked yet.
- ·Tests presentNot checked yet.
- ·Dependencies pinnedNot checked yet.
- ·No dynamic code executionNot checked yet.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
Releases
README
ArgoCD MCP Server
A Model Context Protocol (MCP) server that provides ArgoCD functionality as tools for LLMs via gRPC API.
Features
Application Management
list_application- List ArgoCD applications with optional filtering by project, cluster, namespace, and label selectorsget_application- Retrieve detailed information about a specific ArgoCD applicationget_application_manifests- Get rendered Kubernetes manifests for an applicationget_application_events- Get Kubernetes events for resources belonging to an applicationget_application_logs- Retrieve logs from pods in an ArgoCD applicationget_application_resource_tree- Get the resource tree structure of an application showing all managed resourcescreate_application- Create a new ArgoCD application with source and destination configurationsync_application- Trigger a sync operation for an application with optional prune and dry-run modesrefresh_application- Refresh application state from the git repositorydelete_application- Delete an ArgoCD application with optional cascade controlterminate_operation- Terminate the currently running operation (sync, refresh, etc.) on an application
ApplicationSet Management
list_applicationset- List ArgoCD ApplicationSets with optional filteringget_applicationset- Retrieve detailed information about a specific ApplicationSetcreate_applicationset- Create a new ApplicationSet with generators and templatesdelete_applicationset- Delete an ApplicationSet with cascade control
Project Management
list_project- List all ArgoCD projectsget_project- Retrieve detailed project information by namecreate_project- Create new ArgoCD project with access controls and deployment restrictions
Cluster Management
list_cluster- List all registered clusters in ArgoCDget_cluster- Retrieve detailed cluster information including configuration and status
Repository Management
list_repository- List all configured Git repositoriesget_repository- Get details of a specific repository including connection status
Prerequisites
- Go 1.21+
- Access to an ArgoCD server with API token
Installation
go build -o argocd-mcp-server ./cmd/argocd-mcp-server
Configuration
Set the following environment variables:
export ARGOCD_AUTH_TOKEN=$(argocd account generate-token)
export ARGOCD_SERVER=your-argocd-server.com:443 # Include port number
# Optional settings
export ARGOCD_INSECURE=false # Skip TLS verification (default: false)
export ARGOCD_PLAINTEXT=false # Use plaintext connection (default: false)
export ARGOCD_GRPC_WEB=false # Enable gRPC-Web proxy mode (default: false)
export ARGOCD_GRPC_WEB_ROOT_PATH="" # Custom root path for gRPC-Web requests (optional)
# Logging configuration
export LOG_LEVEL=info # Options: debug, info, warn, error
export LOG_FORMAT=text # Options: text, json
Usage
Run the server:
./argocd-mcp-server
The server communicates via stdin/stdout using the MCP protocol.
Testing
List available tools:
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{}}}
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | ./argocd-mcp-server
Tool Examples
List Applications
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "list_application",
"arguments": {
"project": "default"
}
}
}
Get Application Details
{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "get_application",
"arguments": {
"name": "my-app"
}
}
}
Get Application Manifests
{
"jsonrpc": "2.0",
"id": 5,
"method": "tools/call",
"params": {
"name": "get_application_manifests",
"arguments": {
"name": "my-app",
"revision": "main"
}
}
}
Get Application Events
{
"jsonrpc": "2.0",
"id": 6,
"method": "tools/call",
"params": {
"name": "get_application_events",
"arguments": {
"name": "my-app",
"resource_namespace": "default",
"resource_name": "my-deployment"
}
}
}
Get Application Logs
{
"jsonrpc": "2.0",
"id": 7,
"method": "tools/call",
"params": {
"name": "get_application_logs",
"arguments": {
"name": "my-app",
"pod_name": "my-app-deployment-abc123",
"container": "main",
"tail_lines": 100,
"since_seconds": 3600
}
}
}
Get Application Resource Tree
{
"jsonrpc": "2.0",
"id": 8,
"method": "tools/call",
"params": {
"name": "get_application_resource_tree",
"arguments": {
"name": "my-app"
}
}
}
Create Application
{
"jsonrpc": "2.0",
"id": 9,
"method": "tools/call",
"params": {
"name": "create_application",
"arguments": {
"name": "my-app",
"repo_url": "https://github.com/myorg/myrepo.git",
"path": "manifests",
"dest_namespace": "default",
"dest_server": "https://kubernetes.default.svc",
"project": "default",
"target_revision": "main",
"auto_sync": true,
"self_heal": true
}
}
}
Sync Application
{
"jsonrpc": "2.0",
"id": 10,
"method": "tools/call",
"params": {
"name": "sync_application",
"arguments": {
"name": "my-app",
"prune": true,
"dry_run": false
}
}
}
Refresh Application
{
"jsonrpc": "2.0",
"id": 11,
"method": "tools/call",
"params": {
"name": "refresh_application",
"arguments": {
"name": "my-app",
"hard_refresh": false
}
}
}
Delete Application
{
"jsonrpc": "2.0",
"id": 12,
"method": "tools/call",
"params": {
"name": "delete_application",
"arguments": {
"name": "my-app",
"cascade": true
}
}
}
Terminate Operation
{
"jsonrpc": "2.0",
"id": 13,
"method": "tools/call",
"params": {
"name": "terminate_operation",
"arguments": {
"name": "my-app",
"app_namespace": "argocd",
"project": "default"
}
}
}
ApplicationSet Examples
List ApplicationSets
{
"jsonrpc": "2.0",
"id": 13,
"method": "tools/call",
"params": {
"name": "list_applicationset",
"arguments": {
"project": "default"
}
}
}
Get ApplicationSet
{
"jsonrpc": "2.0",
"id": 14,
"method": "tools/call",
"params": {
"name": "get_applicationset",
"arguments": {
"name": "my-appset"
}
}
}
Create ApplicationSet
{
"jsonrpc": "2.0",
"id": 15,
"method": "tools/call",
"params": {
"name": "create_applicationset",
"arguments": {
"name": "my-appset",
"namespace": "argocd",
"generators": [
{
"list": {
"elements": [
{"cluster": "dev", "namespace": "app-dev"},
{"cluster": "prod", "namespace": "app-prod"}
]
}
}
],
"template": {
"metadata": {
"name": "{{cluster}}-app"
},
"spec": {
"project": "default",
"source": {
"repoURL": "https://github.com/myorg/myrepo.git",
"targetRevision": "main",
"path": "manifests/{{cluster}}"
},
"destination": {
"server": "https://kubernetes.default.svc",
"namespace": "{{namespace}}"
}
}
}
}
}
}
Delete ApplicationSet
{
"jsonrpc": "2.0",
"id": 16,
"method": "tools/call",
"params": {
"name": "delete_applicationset",
"arguments": {
"name": "my-appset",
"cascade": true
}
}
}
Project Examples
List Projects
{
"jsonrpc": "2.0",
"id": 17,
"method": "tools/call",
"params": {
"name": "list_project",
"arguments": {}
}
}
Get Project Details
{
"jsonrpc": "2.0",
"id": 18,
"method": "tools/call",
"params": {
"name": "get_project",
"arguments": {
"name": "my-project"
}
}
}
Create Project
{
"jsonrpc": "2.0",
"id": 19,
"method": "tools/call",
"params": {
"name": "create_project",
"arguments": {
"name": "my-project",
"description": "My ArgoCD project",
"source_repos": "https://github.com/myorg/*",
"destination_namespace": "*",
"destination_server": "https://kubernetes.default.svc",
"namespace_resource_whitelist": "apps:Deployment,:Service,networking.k8s.io:Ingress",
"cluster_resource_whitelist": "",
"upsert": false
}
}
}
Cluster Examples
List Clusters
{
"jsonrpc": "2.0",
"id": 20,
"method": "tools/call",
"params": {
"name": "list_cluster",
"arguments": {}
}
}
Get Cluster Details
{
"jsonrpc": "2.0",
"id": 21,
"method": "tools/call",
"params": {
"name": "get_cluster",
"arguments": {
"id_or_name": "https://kubernetes.default.svc"
}
}
}
Repository Examples
List Repositories
{
"jsonrpc": "2.0",
"id": 22,
"method": "tools/call",
"params": {
"name": "list_repository",
"arguments": {}
}
}
Get Repository Details
{
"jsonrpc": "2.0",
"id": 23,
"method": "tools/call",
"params": {
"name": "get_repository",
"arguments": {
"repo_url": "https://github.com/myorg/myrepo.git"
}
}
}
Architecture
internal/argocd/client/- ArgoCD gRPC client implementationinternal/argocd/- ArgoCD data models and typesinternal/api/- Legacy REST API client (deprecated)internal/server/- MCP server core logicinternal/tools/- MCP tool definitions and handlersinternal/logging/- Structured logging configurationinternal/errors/- Custom error types and handlinginternal/grpcwebproxy/- gRPC-Web proxy for environments without direct gRPC accesscmd/argocd-mcp-server/- Main entry point
Implementation Details
gRPC Communication
This server communicates directly with the ArgoCD gRPC API. This provides:
- High performance binary protocol
- Full feature parity with ArgoCD CLI
- Structured error handling with gRPC status codes
- Type-safe request/response handling via protocol buffers
- Support for streaming operations
- No dependency on ArgoCD CLI installation
gRPC-Web Support
For environments without direct gRPC access, the server supports gRPC-Web proxy mode:
- Automatically enabled when
ARGOCD_GRPC_WEB=true - Creates a local Unix socket proxy server
- Translates gRPC calls to HTTP/gRPC-Web requests
- Handles proper framing and streaming responses
- Supports custom root paths via
ARGOCD_GRPC_WEB_ROOT_PATH
Authentication
The server uses JWT token authentication with the ArgoCD gRPC API:
- Token is passed via
ARGOCD_AUTH_TOKENenvironment variable - Server address with port is configured via
ARGOCD_SERVERenvironment variable - JWT token is sent as gRPC metadata with each request
- Supports both TLS and plaintext connections
Logging
Structured logging is implemented using logrus:
- Log level configurable via
LOG_LEVELenvironment variable (debug, info, warn, error) - Log format configurable via
LOG_FORMATenvironment variable (text or json) - Logs are written to stderr to avoid interfering with MCP protocol on stdout
Development
Running Tests
# Run all tests
make test
# Run tests with coverage
make test-cover
# Run tests with race detector
make test-race
# Run E2E tests with Kind cluster
make e2e-setup # Setup Kind cluster with ArgoCD
make e2e-test # Run E2E tests
make e2e-teardown # Cleanup
Linting and Formatting
# Format code
make fmt
# Run all linters
make lint
# Run advanced linting (includes security checks)
make lint-advanced
Safety Considerations
- sync_application: Use
dry_run: trueto preview changes before actual sync - refresh_application: Use
hard_refresh: falsefor incremental refresh,truefor full refresh - delete_application: Use
cascade: falseto preserve cluster resources when deleting only the ArgoCD application - delete_applicationset: Use
cascade: falseto preserve generated applications - create_project: Use
upsert: trueto update existing projects instead of failing on conflict - Always verify application and project names before performing destructive operations
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Run
make check-allto ensure quality - Submit a pull request
License
MIT License - see LICENSE file for details
README mirrored from the source repository yesterday. The original is authoritative.