From b2103b3aba801437ba8c03ebe36fc1fa357ff929 Mon Sep 17 00:00:00 2001 From: Jiacheng Xu Date: Mon, 21 Apr 2025 15:12:06 +0800 Subject: [PATCH 1/8] feat: update readme --- README.md | 141 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 129 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 51e3965..5c8caea 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,137 @@ # ArgoCD MCP Server -A Model Context Protocol (MCP) server implementation for ArgoCD, enabling seamless integration with Visual Studio Code through both stdio and SSE (Server-Sent Events) transport protocols. +An implementation of Model Context Protocol (MCP) server for ArgoCD, enabling AI assistants to interact with your ArgoCD applications through natural language. This server allows for seamless integration with Visual Studio Code and other MCP clients through both stdio and Server-Sent Events (SSE) transport protocols. ## Features -- Integration with ArgoCD API -- Support for both stdio and SSE transport modes +- **Transport Protocols**: Supports both stdio and SSE transport modes for flexible integration with different clients +- **Complete ArgoCD API Integration**: Provides comprehensive access to ArgoCD resources and operations +- **AI Assistant Ready**: Pre-configured tools for AI assistants to interact with ArgoCD in natural language -## Development +## Prerequisites + +- Node.js (v18 or higher recommended) +- pnpm package manager (for development) +- ArgoCD instance with API access + +## Installation + +### Usage with VSCode + +1. Install the MCP Server npm package: + ```bash + npm install argocd-mcp-server + ``` + +2. Create a `.vscode/mcp.json` file in your project: + ```json + { + "inputs": [ + { + "id": "argocd-base-url", + "type": "promptString", + "description": "Enter the ArgoCD base URL", + "password": false + }, + { + "id": "argocd-api-token", + "type": "promptString", + "description": "Enter the ArgoCD API token", + "password": true + } + ], + "servers": { + "argocd-mcp-server-stdio": { + "type": "stdio", + "command": "npx", + "args": [ + "argocd-mcp-server", + "stdio" + ], + "env": { + "ARGOCD_BASE_URL": "${input:argocd-base-url}", + "ARGOCD_API_TOKEN": "${input:argocd-api-token}" + } + } + } + } + ``` + +3. Start a conversation with an AI assistant in VS Code that supports MCP. + +### Usage with Claude Desktop + +1. Create a `claude_desktop_config.json` configuration file: + ```json + { + "mcpServers": { + "argocd-mcp": { + "command": "npx", + "args": ["argocd-mcp-server", "stdio"], + "env": { + "ARGOCD_BASE_URL": "https://your-argocd-server.com", + "ARGOCD_API_TOKEN": "your_argocd_token" + } + } + } + } + ``` + +2. Configure Claude Desktop to use this configuration file in settings. + +### Build from Source + +1. Clone the repository: + ```bash + git clone https://github.com/akuity/argocd-mcp-server.git + cd argocd-mcp-server + ``` + +2. Install project dependencies: + ```bash + pnpm install + ``` + +3. Create a `.env` file in the root directory: + ```env + # Uncomment to disable SSL verification (not recommended for production) + # NODE_TLS_REJECT_UNAUTHORIZED=0 + + ARGOCD_BASE_URL= + ARGOCD_API_TOKEN= + ``` + +4. Start the development server: + ```bash + # For SSE mode with hot reloading + pnpm run dev + + # For stdio mode + pnpm run build + node dist/argocd-mcp-server.js stdio + ``` + +### Available Tools + +The server provides the following ArgoCD management tools: + +#### Application Management +- `list_applications`: List and filter all applications +- `get_application`: Get detailed information about a specific application +- `create_application`: Create a new application +- `update_application`: Update an existing application +- `delete_application`: Delete an application +- `sync_application`: Trigger a sync operation on an application + +#### Resource Management +- `get_application_resource_tree`: Get the resource tree for a specific application +- `get_application_managed_resources`: Get managed resources for a specific application +- `get_application_workload_logs`: Get logs for application workloads (Pods, Deployments, etc.) +- `get_resource_events`: Get events for resources managed by an application +- `get_resource_actions`: Get available actions for resources +- `run_resource_action`: Run an action on a resource + +### For Development 1. Clone the repository: ```bash @@ -20,7 +144,7 @@ cd argocd-mcp-server pnpm install ``` -3. Copy the `.env.example` and create a `.env` file in the root directory with your ArgoCD configuration: +3. Create a `.env` file in the root directory with your ArgoCD configuration: ```env # Uncomment to disable SSL verification (not recommended for production) # NODE_TLS_REJECT_UNAUTHORIZED=0 @@ -28,10 +152,3 @@ pnpm install ARGOCD_BASE_URL= ARGOCD_API_TOKEN= ``` - -4. Start the development server with hot reloading enabled: -```bash -pnpm run dev -``` -Once the server is running, you can utilize the MCP server within Visual Studio Code or other MCP client. - From ecfdc9742577b4ae3bf5d0e09702399c75a549d5 Mon Sep 17 00:00:00 2001 From: Jiacheng Xu Date: Mon, 21 Apr 2025 15:15:46 +0800 Subject: [PATCH 2/8] update --- README.md | 52 +++++++++++----------------------------------------- 1 file changed, 11 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 5c8caea..869ac87 100644 --- a/README.md +++ b/README.md @@ -18,12 +18,7 @@ An implementation of Model Context Protocol (MCP) server for ArgoCD, enabling AI ### Usage with VSCode -1. Install the MCP Server npm package: - ```bash - npm install argocd-mcp-server - ``` - -2. Create a `.vscode/mcp.json` file in your project: +1. Create a `.vscode/mcp.json` file in your project: ```json { "inputs": [ @@ -45,7 +40,7 @@ An implementation of Model Context Protocol (MCP) server for ArgoCD, enabling AI "type": "stdio", "command": "npx", "args": [ - "argocd-mcp-server", + "akuity/argocd-mcp-server", "stdio" ], "env": { @@ -57,7 +52,7 @@ An implementation of Model Context Protocol (MCP) server for ArgoCD, enabling AI } ``` -3. Start a conversation with an AI assistant in VS Code that supports MCP. +2. Start a conversation with an AI assistant in VS Code that supports MCP. ### Usage with Claude Desktop @@ -67,7 +62,7 @@ An implementation of Model Context Protocol (MCP) server for ArgoCD, enabling AI "mcpServers": { "argocd-mcp": { "command": "npx", - "args": ["argocd-mcp-server", "stdio"], + "args": ["akuity/argocd-mcp-server", "stdio"], "env": { "ARGOCD_BASE_URL": "https://your-argocd-server.com", "ARGOCD_API_TOKEN": "your_argocd_token" @@ -79,38 +74,6 @@ An implementation of Model Context Protocol (MCP) server for ArgoCD, enabling AI 2. Configure Claude Desktop to use this configuration file in settings. -### Build from Source - -1. Clone the repository: - ```bash - git clone https://github.com/akuity/argocd-mcp-server.git - cd argocd-mcp-server - ``` - -2. Install project dependencies: - ```bash - pnpm install - ``` - -3. Create a `.env` file in the root directory: - ```env - # Uncomment to disable SSL verification (not recommended for production) - # NODE_TLS_REJECT_UNAUTHORIZED=0 - - ARGOCD_BASE_URL= - ARGOCD_API_TOKEN= - ``` - -4. Start the development server: - ```bash - # For SSE mode with hot reloading - pnpm run dev - - # For stdio mode - pnpm run build - node dist/argocd-mcp-server.js stdio - ``` - ### Available Tools The server provides the following ArgoCD management tools: @@ -152,3 +115,10 @@ pnpm install ARGOCD_BASE_URL= ARGOCD_API_TOKEN= ``` + +4. Start the development server: +```bash +# For SSE mode with hot reloading +pnpm run dev +``` +Once the server is running, you can utilize the MCP server within Visual Studio Code or other MCP client. From 0fd7e8ca15747c1177627de68e30af7248f898d2 Mon Sep 17 00:00:00 2001 From: Jiacheng Xu Date: Mon, 21 Apr 2025 15:18:11 +0800 Subject: [PATCH 3/8] remove akuity --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 869ac87..b491f7d 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ An implementation of Model Context Protocol (MCP) server for ArgoCD, enabling AI "type": "stdio", "command": "npx", "args": [ - "akuity/argocd-mcp-server", + "argocd-mcp-server", "stdio" ], "env": { @@ -62,7 +62,7 @@ An implementation of Model Context Protocol (MCP) server for ArgoCD, enabling AI "mcpServers": { "argocd-mcp": { "command": "npx", - "args": ["akuity/argocd-mcp-server", "stdio"], + "args": ["argocd-mcp-server", "stdio"], "env": { "ARGOCD_BASE_URL": "https://your-argocd-server.com", "ARGOCD_API_TOKEN": "your_argocd_token" From 6d7b39525033c7b28bf0a9cc60e3d7fc8435bab7 Mon Sep 17 00:00:00 2001 From: Jiacheng Xu Date: Mon, 21 Apr 2025 15:21:04 +0800 Subject: [PATCH 4/8] update --- .vscode/mcp.json | 13 ++----------- README.md | 4 ++-- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.vscode/mcp.json b/.vscode/mcp.json index 4d2b234..78362e5 100644 --- a/.vscode/mcp.json +++ b/.vscode/mcp.json @@ -14,22 +14,13 @@ } ], "servers": { - "argocd-mcp-server-stdio": { - "type": "stdio", - "command": "node", - "args": [ - "${workspaceFolder}/dist/argocd-mcp-server.js", - "stdio" - ], - "envFile": "${workspaceFolder}/.env" - }, "argocd-mcp-server-sse": { "type": "sse", "url": "http://localhost:3000/sse", "headers": { "x-argocd-base-url": "${input:argocd-base-url}", - "x-argocd-api-token": "${input:argocd-api-token}", + "x-argocd-api-token": "${input:argocd-api-token}" } } } -} \ No newline at end of file +} diff --git a/README.md b/README.md index b491f7d..3d64d4e 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ cd argocd-mcp-server pnpm install ``` -3. Create a `.env` file in the root directory with your ArgoCD configuration: +3. Copy the `.env.example` and create a `.env` file in the root directory with your ArgoCD configuration: ```env # Uncomment to disable SSL verification (not recommended for production) # NODE_TLS_REJECT_UNAUTHORIZED=0 @@ -116,7 +116,7 @@ ARGOCD_BASE_URL= ARGOCD_API_TOKEN= ``` -4. Start the development server: +4. Start the development server with hot reloading enabled: ```bash # For SSE mode with hot reloading pnpm run dev From 17d2c58a2471448c381b7fa0676fec3e4958ad09 Mon Sep 17 00:00:00 2001 From: Jiacheng Xu Date: Mon, 21 Apr 2025 15:25:26 +0800 Subject: [PATCH 5/8] update --- .env.example | 5 ----- README.md | 13 ++----------- 2 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 .env.example diff --git a/.env.example b/.env.example deleted file mode 100644 index 2a2e660..0000000 --- a/.env.example +++ /dev/null @@ -1,5 +0,0 @@ -# Uncomment to disable SSL verification (not recommended for production) -# NODE_TLS_REJECT_UNAUTHORIZED=0 - -ARGOCD_BASE_URL= -ARGOCD_API_TOKEN= diff --git a/README.md b/README.md index 3d64d4e..a57362f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ArgoCD MCP Server -An implementation of Model Context Protocol (MCP) server for ArgoCD, enabling AI assistants to interact with your ArgoCD applications through natural language. This server allows for seamless integration with Visual Studio Code and other MCP clients through both stdio and Server-Sent Events (SSE) transport protocols. +An implementation of [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for [ArgoCD](https://argo-cd.readthedocs.io/en/stable/), enabling AI assistants to interact with your ArgoCD applications through natural language. This server allows for seamless integration with Visual Studio Code and other MCP clients through both stdio and Server-Sent Events (SSE) transport protocols. ## Features @@ -107,16 +107,7 @@ cd argocd-mcp-server pnpm install ``` -3. Copy the `.env.example` and create a `.env` file in the root directory with your ArgoCD configuration: -```env -# Uncomment to disable SSL verification (not recommended for production) -# NODE_TLS_REJECT_UNAUTHORIZED=0 - -ARGOCD_BASE_URL= -ARGOCD_API_TOKEN= -``` - -4. Start the development server with hot reloading enabled: +3. Start the development server with hot reloading enabled: ```bash # For SSE mode with hot reloading pnpm run dev From 4c8a1bbd513e48332b4706e8e59f35f5e57906c1 Mon Sep 17 00:00:00 2001 From: Jiacheng Xu Date: Mon, 21 Apr 2025 15:26:43 +0800 Subject: [PATCH 6/8] update --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a57362f..fe05990 100644 --- a/README.md +++ b/README.md @@ -74,11 +74,11 @@ An implementation of [Model Context Protocol (MCP)](https://modelcontextprotocol 2. Configure Claude Desktop to use this configuration file in settings. -### Available Tools +## Available Tools The server provides the following ArgoCD management tools: -#### Application Management +### Application Management - `list_applications`: List and filter all applications - `get_application`: Get detailed information about a specific application - `create_application`: Create a new application @@ -86,7 +86,7 @@ The server provides the following ArgoCD management tools: - `delete_application`: Delete an application - `sync_application`: Trigger a sync operation on an application -#### Resource Management +### Resource Management - `get_application_resource_tree`: Get the resource tree for a specific application - `get_application_managed_resources`: Get managed resources for a specific application - `get_application_workload_logs`: Get logs for application workloads (Pods, Deployments, etc.) @@ -94,7 +94,7 @@ The server provides the following ArgoCD management tools: - `get_resource_actions`: Get available actions for resources - `run_resource_action`: Run an action on a resource -### For Development +## For Development 1. Clone the repository: ```bash From 673acb8035aa6950d6225bc6c12d81eb830514f3 Mon Sep 17 00:00:00 2001 From: Jiacheng Xu Date: Mon, 21 Apr 2025 15:28:38 +0800 Subject: [PATCH 7/8] argocd -> argo cd --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fe05990..222ea80 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@ -# ArgoCD MCP Server +# Argo CD MCP Server -An implementation of [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for [ArgoCD](https://argo-cd.readthedocs.io/en/stable/), enabling AI assistants to interact with your ArgoCD applications through natural language. This server allows for seamless integration with Visual Studio Code and other MCP clients through both stdio and Server-Sent Events (SSE) transport protocols. +An implementation of [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for [Argo CD](https://argo-cd.readthedocs.io/en/stable/), enabling AI assistants to interact with your Argo CD applications through natural language. This server allows for seamless integration with Visual Studio Code and other MCP clients through both stdio and Server-Sent Events (SSE) transport protocols. ## Features - **Transport Protocols**: Supports both stdio and SSE transport modes for flexible integration with different clients -- **Complete ArgoCD API Integration**: Provides comprehensive access to ArgoCD resources and operations -- **AI Assistant Ready**: Pre-configured tools for AI assistants to interact with ArgoCD in natural language +- **Complete Argo CD API Integration**: Provides comprehensive access to Argo CD resources and operations +- **AI Assistant Ready**: Pre-configured tools for AI assistants to interact with Argo CD in natural language ## Prerequisites - Node.js (v18 or higher recommended) - pnpm package manager (for development) -- ArgoCD instance with API access +- Argo CD instance with API access ## Installation From 3ed12bcc32f0dc70de63eb92e7b714fff0e4b24f Mon Sep 17 00:00:00 2001 From: Jiacheng Xu Date: Mon, 21 Apr 2025 15:29:54 +0800 Subject: [PATCH 8/8] update --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 222ea80..749309f 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,14 @@ An implementation of [Model Context Protocol (MCP)](https://modelcontextprotocol - **Complete Argo CD API Integration**: Provides comprehensive access to Argo CD resources and operations - **AI Assistant Ready**: Pre-configured tools for AI assistants to interact with Argo CD in natural language -## Prerequisites +## Installation + +### Prerequisites - Node.js (v18 or higher recommended) - pnpm package manager (for development) - Argo CD instance with API access -## Installation - ### Usage with VSCode 1. Create a `.vscode/mcp.json` file in your project: