使用说明
MCP Kubernetes 服务器的 Homebrew 源
这是一个针对模型上下文协议(MCP)Kubernetes服务器的Homebrew源(tap)。它提供了便捷的安装和更新方式 mcp-k8s 在 macOS 和 Linux 上。
快速入门
# Add the tap
brew tap gautampachnanda101/mcp
# Install mcp-k8s
brew install mcp-k8s
# Verify installation
mcp-k8s --version
支持的平台
| 操作系统 | 架构 | 状态 |
|---|---|---|
| macOS | 英特尔(x86_64) | ✅ |
| macOS | Apple Silicon(ARM64) | ✅ |
| Linux | x86_64 | ✅ |
| Linux | ARM64(64位架构) | ✅(支持) |
安装选项
标准安装
# Tap and install in one command
brew install gautampachnanda101/mcp/mcp-k8s
带有特定版本
# Install specific version
brew install gautampachnanda101/mcp/mcp-k8s@0.1.1
使用方法
基本命令
# Show help
mcp-k8s --help
# Test Kubernetes connection
mcp-k8s --test
# List available MCP tools
mcp-k8s --list-tools
测试安装
# Quick connection test
mcp-k8s --test
# Expected output:
# ✅ Successfully connected to Kubernetes cluster
# Cluster: https://your-cluster-api
# Context: your-context
MCP客户端集成
Claude Desktop(桌面版)
{
"mcpServers": {
"k8s": {
"command": "mcp-k8s",
"args": ["--log-level", "info"]
}
}
}
VS Code MCP 扩展:
{
"mcpServers": {
"k8s": {
"command": "mcp-k8s",
"args": ["--kubeconfig", "/path/to/kubeconfig"]
}
}
}
正在更新
# Update Homebrew
brew update
# Upgrade mcp-k8s
brew upgrade mcp-k8s
# Check current version
mcp-k8s --version
卸载
# Uninstall mcp-k8s
brew uninstall mcp-k8s
# Optionally remove the tap
brew untap gautampachnanda101/mcp
要求
- Kubernetes 集群访问
- 有效的 kubeconfig 文件 (
~/.kube/config或自定义路径) - kubectl 配置完成(可选但建议)
其工作原理
- 二进制文件: 从……下载 公开发布
- 公式: 自动为您的平台选择正确的二进制文件
- 更新: 通过Homebrew的标准更新机制进行管理
- SHA256: (这个短语本身在中文中没有直接的对应翻译,因为它是一个特定的加密算法名称,通常保持原样使用) 所有二进制文件均通过SHA256校验和进行了验证
故障排除
公式未找到
# Update Homebrew
brew update
# Tap the repository again
brew untap gautampachnanda101/mcp
brew tap gautampachnanda101/mcp
版本冲突
# Reinstall from scratch
brew uninstall mcp-k8s
brew install mcp-k8s
权限问题
# Ensure binary is executable
which mcp-k8s
ls -l $(which mcp-k8s)
# Should show executable permissions
文档
- 📖 主仓库: gautampachnanda101/mcp-servers 翻译为中文是:gautampachnanda101/MCP服务器(或MCP服务器集合,具体根据上下文确定“servers”的确切含义,这里“servers”可能指的是多个服务器或服务器集群)
- 📦 发布版本: GitHub 发布版(或:GitHub 里程碑版本)
- 📚 完整文档: 文档/
- 🐛 问题: 报告一个错误
其他安装方法
如果您的系统上没有安装Homebrew:
- 直接下载: GitHub 发布版
- 安装脚本:
curl -sSL https://github.com/gautampachnanda101/mcp-servers/releases/latest/download/install.sh | bash - Windows: 使用 PowerShell 安装脚本或手动下载
查看 分发指南 适用于所有安装选项。
做出贡献
发现公式有问题?请提交问题或拉取请求(PR):
- 公式问题: Homebrew-MCP 问题
- 二元问题: MCP服务器问题
许可证
麻省理工学院(MIT)