argocd.com
argocd.com logo

ArgoCD

Integrates with ArgoCD to enable natural language control of Kubernetes application deployments through a Python-based b...

Created byApr 23, 2025

ArgoCD MCP Server

An MCP (Model Context Protocol) server that integrates with the ArgoCD API, enabling AI assistants and large language models to manage ArgoCD applications and resources through natural language interactions.
![Version](https://img.shields.io/badge/version-0.1.0-blue) ![Python](https://img.shields.io/badge/python-3.12+-green) ![Type Checking](https://img.shields.io/badge/type_checking-mypy-brightgreen)

Features

  • **Authentication & Session Management**: - User info retrieval from ArgoCD API - Token-based authentication with ArgoCD - Server settings and configuration access - Plugin information retrieval - Version information retrieval
  • **Application Management**: - List and filter applications by project, name, namespace - Get detailed application information - Create, update, and delete applications - Sync applications with configurable options
  • **Robust API Client**: - URL normalization and intelligent endpoint handling - Comprehensive error handling and detailed error messages - Configurable timeouts and SSL verification - Token security protection and masking
  • **Developer Experience**: - Full static type checking with mypy - Detailed documentation and examples - Environment-based configuration

Quick Start

Setup

Starting the Server

The server is configured via environment variables. Here are the available configuration options:
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
You can start the server in several ways:
When the token is provided via environment variable, Claude can use it without you having to specify it in every command.

Connecting with Claude

Using Claude Code CLI

Using Claude Desktop

Create a `claude_desktop_config.json` configuration file:
Replace the paths and configuration values with your actual values:
  • Use the full path to the uv executable (find it with `which uv` on macOS/Linux or `where uv` on Windows)
  • Set the correct directory path to your argocd-mcp installation
  • Add your ArgoCD API token
  • Configure other environment variables as needed
This configuration tells Claude Desktop how to start the MCP server automatically with your specific environment settings.

Available Tools

Session Tools

  • `get_user_info`: Get the current user's info via api/v1/session/userinfo

Settings Tools

  • `get_settings`: Get ArgoCD server settings including UI, OIDC, and other configurations
  • `get_plugins`: Get information about configured ArgoCD plugins

Version Tools

  • `get_version`: Get version information of the API server

Application Management Tools

  • `list_applications`: Get all applications with filtering options
  • `get_application_details`: 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

Example Conversations

Checking User Information

Getting ArgoCD Version

Getting ArgoCD Settings

Managing Applications

Development

Requirements

  • Python 3.12+
  • MCP (includes FastMCP and development tools)
  • uv package manager (recommended) or pip
  • ArgoCD API token

Type Checking

This project uses mypy for static type checking to enhance code quality and catch type-related bugs early:
Type checking configuration is available in both `pyproject.toml` and `mypy.ini`. The configuration enforces strict typing rules including:
  • Disallowing untyped definitions
  • Warning on returning Any types
  • Checking completeness of function definitions
  • Namespace packages support
  • Module-specific configurations

Project Structure

The code is organized into a modular structure:

Extending the Server

To add new features:
  1. Add new tools to the appropriate module in the `tools` directory
  1. Register new tools in `server.py`
  1. Follow the existing patterns for parameter validation and error handling
  1. Update documentation in README.md
  1. Add tests for new functionality

Troubleshooting

If you encounter issues:
  1. Check server logs (info logging is enabled by default)
  1. Note that `Processing request of type CallToolRequest` is informational, not an error
  1. If using `mcp dev server.py`, the MCP Inspector will automatically open at http://localhost:5173 for debugging
  1. Use the server logs to debug API calls and responses
  1. For SSL certificate issues with self-signed certificates:
  1. Check if all required environment variables are properly set:

Contributing

Contributions are welcome! Please open an issue or pull request if you'd like to contribute to this project.
When contributing, please follow these guidelines:
  • Ensure all code includes proper type hints
  • Run mypy type checking before submitting PRs
  • Add tests for new functionality
  • Update documentation for any new features or changes