
mcp helmfile
通过模型上下文协议 (MCP) 执行 Helmfile 命令的服务器,支持部署、配置和故障排查。
Repository Info
About This Server
通过模型上下文协议 (MCP) 执行 Helmfile 命令的服务器,支持部署、配置和故障排查。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Helmfile MCP Server
A FastMCP server for executing Helmfile commands through the Model Context Protocol (MCP). This server provides a standardized interface for managing Helmfile operations, allowing AI assistants to help with Helmfile deployments, configurations, and troubleshooting.
!Sync Helmfile !List Helmfile
Key Features
- Command Execution: Execute any Helmfile command with proper validation and error handling
- Synchronization: Specialized tool for synchronizing Helmfile releases
- Async Operations: Asynchronous command execution for better performance
- Command Piping: Support for Unix pipe operations to filter and transform command output
- Progress Tracking: Real-time progress updates through MCP context
- Timeout Support: Configurable command timeouts to prevent hanging operations
- Structured Errors: Detailed error responses with proper error codes and messages
Installation
Prerequisites
- Python 3.11 or higher
- Helmfile installed and available in PATH
- Access to a Kubernetes cluster
Install from Source
- Clone the repository:
git clone git@github.com:snowsky/mcp-helmfile.git
cd mcp-helmfile
- Install dependencies:
uv pip install -e .
Claude Desktop App Configuration
To configure the Claude desktop app to work with the MCP servers, you can use the following settings in your claude_desktop_config.json file:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"LOCAL_DIRECTORY_ALLOWED_ACCESSED_BY_CLAUDE_DESKTOP"
]
},
"helmfile": {
"command": "uv",
"args": [
"--directory",
"LOCAL_DIRECTORY_THIS_REPO",
"run",
"server.py"
]
}
}
}
Explanation of Configuration
-
filesystem: This configuration uses
npxto run the server for filesystem operations, specifying directories for Desktop and Downloads. -
helmfile: This configuration uses
uvto run the Helmfile server. The--directoryargument specifies the path to the MCP Helmfile project, andrun server.pyindicates the script to execute.
Use with Claude Desktop App
After adding this configuration, restart the Claude desktop app to ensure it picks up the new settings. You can then interact with the MCP servers as needed.
Copy helmfile.yaml file to the above directory LOCAL_DIRECTORY_ALLOWED_ACCESSED_BY_CLAUDE_DESKTOP.
For more information on troubleshooting and advanced configurations, please refer to the debugging documentation.
Run in python
Starting the Server
python -m mcp-helmfile.server
Available Tools
1. execute_helmfile
A general-purpose tool for executing any Helmfile command.
Parameters:
command: Complete Helmfile command to execute (including any pipes and flags)timeout: Maximum execution time in seconds (default: 300)ctx: Optional MCP context for request tracking
Example:
result = await execute_helmfile(
command="list",
timeout=60,
ctx=context
)
2. sync_helmfile
A specialized tool for synchronizing Helmfile releases.
Parameters:
helmfile_path: Path to the Helmfile configuration filenamespace: Optional namespace to targettimeout: Maximum execution time in seconds (default: 300)ctx: Optional MCP context for request tracking
Example:
result = await sync_helmfile(
helmfile_path="/path/to/helmfile.yaml",
namespace="production",
timeout=300,
ctx=context
)
Response Format
All tools return a dictionary with the following structure:
{
"status": "success" | "error",
"output": "Command output if successful",
"error": {
"code": "Error code",
"message": "Error message"
} # Only present if status is "error"
}
Development
Running Tests
pytest
Building and Publishing
- Build the package:
uv build
- Publish to PyPI:
uv publish
Security Considerations
- Commands are executed with proper validation
- Dangerous operations like apply/destroy require confirmation
- Environment-specific commands are validated against allowed environments
- Command timeouts prevent resource exhaustion
- Proper error handling and reporting
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Quick Start
Clone the repository
git clone https://github.com/snowsky/mcp-helmfileInstall dependencies
cd mcp-helmfile
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.