使用说明
云成本MCP
AWS、Azure、GCP和OCI的多云定价比较MCP服务器。通过一个查询比较所有主要云提供商的计算、存储、出口和Kubernetes成本。
⚠️ 免责声明:所有定价数据均从公开可用的API和数据源检索,包括 instances.vantage.sh、Azure零售价格API和Oracle云价格表API。此数据仅供参考和估算。 云定价经常变化,可能因地区、账户类型、承诺条款和其他因素而异。 用户全权负责在做出任何购买或架构决策之前,直接与云提供商核实所有定价信息。作者对这些数据的准确性、完整性或及时性不作任何保证。
特性
- 全面覆盖:所有提供程序中有4900多种实例类型
- AWS:1300多个EC2实例+1180多种托管数据库类型+kubectl
- Azure:1680多种VM类型(官方Azure零售价格API)
- GCP:40多个地区的360多种实例类型
- OCI:通过Oracle API提供600多种产品
- 不需要API密钥:来自公共API(instance.vantage.sh+提供者API)的所有数据
- 新鲜数据,两种方式:AWS/Azure/GCP捆绑数据每周通过GitHub Actions自动刷新
refresh_*工具按需获取实时定价(在内存中缓存60分钟)。OCI捆绑数据经过精心策划。看 数据新鲜度 对于精确的模型。 - 自然语言查询:问克劳德“16GB的4 vCPU最便宜的是什么?”
- 工作量计算器:估算包括计算、存储和出口在内的全部工作负载成本
- 迁移规划:计算切换提供商时的潜在节省
安装
适用于Claude Code用户
# One-command install
claude mcp add cloud-cost -- npx -y cloud-cost-mcp
适用于Claude桌面用户
将此添加到您的 claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json,Windows: %APPDATA%\Claude\claude_desktop_config.json),然后重新启动Claude Desktop:
{
"mcpServers": {
"cloud-cost": {
"command": "npx",
"args": ["-y", "cloud-cost-mcp"]
}
}
}
手动安装
npm install -g cloud-cost-mcp
然后在任何MCP客户端配置中引用已安装的二进制文件:
{
"mcpServers": {
"cloud-cost": {
"command": "cloud-cost-mcp"
}
}
}
使用示例
安装后,只需询问Claude:
比较计算
"Compare 4 vCPU 16GB VMs across AWS, Azure, GCP, and OCI"
"Find the cheapest cloud for an 8-core VM with 32GB RAM"
"What's the best deal for ARM instances with 4 cores?"
比较存储
"Compare object storage pricing for 1TB across all clouds"
"What's the cheapest archival storage for 10TB?"
比较Egress(OCI优势!)
"Compare egress costs for 5TB monthly"
"What's the cheapest cloud for 10TB data transfer?"
注意:OCI提供10TB/月免费出口-比AWS/Azure/GCP多100倍!
全部工作量估算
"Estimate cost for 3 VMs with 4 vCPU each, 500GB storage, and 1TB egress"
"What would a Kubernetes cluster with 5 nodes cost across all clouds?"
快速估算
"Quick estimate for a medium API server"
"Compare all clouds for a kubernetes-cluster preset"
"Estimate cost for gpu-training-large preset"
GPU定价(OCI)
"List all available GPU shapes"
"Compare A100 vs H100 GPU pricing"
"What GPU should I use for ML training with 80GB memory?"
"Get details for BM.GPU.H100.8"
迁移规划
"How much could I save migrating from AWS to OCI?"
"Compare my current GCP setup against other clouds"
可用工具
比较工具
| 工具 | 说明 |
|---|---|
compare_compute |
按vCPU和内存比较VM/实例定价 |
compare_storage |
比较对象和块存储定价 |
compare_egress |
比较数据传输成本(OCI:10TB免费!) |
compare_kubernetes |
比较管理的K8s成本(EKS、AKS、GKE、OKE) |
find_cheapest_compute |
查找给定规格的最便宜供应商 |
计算器工具
| 工具 | 说明 |
|---|---|
calculate_workload_cost |
跨所有云的完整工作负载估计 |
quick_estimate |
常见预设的即时比较 |
estimate_migration_savings |
计算迁移节省 |
list_presets |
列出可用的部署预设 |
可用预设: small-web-app, medium-api-server, large-database, ml-training, kubernetes-cluster, data-lake, high-egress-cdn, high-traffic-web, gpu-inference, gpu-training-small, gpu-training-large
数据管理工具
| 工具 | 说明 |
|---|---|
get_data_freshness |
检查定价数据年龄(如果超过30天,则发出警告) |
get_provider_details |
获取一个提供商的详细定价 |
get_storage_summary |
所有提供商的存储分层定价 |
实时API工具
AWS(1147个EC2+353个RDS+服务)
| 工具 | 说明 |
|---|---|
refresh_aws_ec2_pricing |
以现货/预留价格获取1147个EC2实例类型 |
refresh_aws_rds_pricing |
获取353个RDS数据库实例类型 |
get_aws_lightsail_pricing |
获取ExpressRoute捆绑包定价 |
list_aws_regions |
列出带有定价数据的AWS区域 |
list_aws_instance_families |
列出EC2实例系列 |
GCP(287个实例类型)
| 工具 | 说明 |
|---|---|
refresh_gcp_pricing |
获取GCP计算引擎定价(40+地区) |
list_gcp_regions |
列出具有定价数据的GCP地区 |
list_gcp_instance_families |
列出GCP实例族 |
Azure(1199种虚拟机类型)
| 工具 | 说明 |
|---|---|
refresh_azure_pricing |
获取Azure零售价格API |
refresh_azure_full_pricing |
从vantage.sh获取1199个VM类型 |
list_azure_regions |
列出包含定价数据的Azure区域 |
list_azure_categories |
列出Azure虚拟机类别 |
OCI(600+个产品)
| 工具 | 说明 |
|---|---|
refresh_oci_pricing |
获取实时OCI定价(公共API) |
list_oci_categories |
列出OCI服务类别 |
GPU工具(OCI)
| 工具 | 说明 |
|---|---|
list_gpu_shapes |
列出GPU形状,并按型号、用例、价格进行过滤 |
get_gpu_shape_details |
获取GPU形状的详细规格和定价 |
compare_gpu_shapes |
并排比较多个GPU形状 |
recommend_gpu_shape |
根据工作负载类型获取GPU推荐 |
可用GPU形状:A10、A100 80GB、H100 80GB,H200 141GB、L40S、MI300X
状态
| 工具 | 说明 |
|---|---|
check_api_status |
检查是否可以访问所有实时API |
数据新鲜度
所有提供商现在都支持通过公共API实时刷新定价:
| 提供者 | 数据源 | 实例类型 | 实时 |
|---|---|---|---|
| 亚马逊云服务 | instances.vantage.sh | 1147 EC2+353 RDS | ✓ Yes |
| Azure | instances.vantage.sh+零售价格API | 1199 | ✓ Yes |
| 谷歌云平台 | 实例.优势.sh | 287 | ✓ Yes |
| OCI | Oracle云价格表API | 600+ | ✓ Yes |
使用 check_api_status 以验证API的可访问性。使用 get_data_freshness 检查捆绑数据的年龄。
关键见解
OCI成本优势
- 10TB/月免费出口 (与AWS/Azure/GCP上的100GB相比)
- 免费Kubernetes控制平面 (基本集群)
- 统一全球定价 (无区域差异)
- 始终免费等级 在ARM上包括4个OCPU+24GB RAM
免费Kubernetes控制平面
- OCI(确定):免费基本集群
- Azure(AKS):自由控制平面
- AWS(EKS)和GCP(GKE):每个集群每月73美元
输出示例
User: "Compare cost for a 4 vCPU, 16GB RAM VM across all clouds"
┌─────────┬──────────────────────┬────────┬──────────┬─────────────┐
│ Provider│ Instance Type │ vCPUs │ Memory │ Monthly Cost│
├─────────┼──────────────────────┼────────┼──────────┼─────────────┤
│ OCI │ VM.Standard.E5.Flex │ 4 │ 16 GB │ $61.32 │
│ GCP │ e2-standard-4 │ 4 │ 16 GB │ $97.82 │
│ AWS │ t3.xlarge │ 4 │ 16 GB │ $121.47 │
│ Azure │ Standard_D4s_v5 │ 4 │ 16 GB │ $140.16 │
└─────────┴──────────────────────┴────────┴──────────┴─────────────┘
Cheapest: OCI ($61.32/month) - 50% savings vs AWS
发展
# Clone and install
git clone https://github.com/jasonwilbur/cloud-cost-mcp.git
cd cloud-cost-mcp
npm install
# Build
npm run build
# Test locally with Claude Code
claude mcp add cloud-cost-dev -- node /path/to/cloud-cost-mcp/dist/index.js
数据新鲜度
此服务器使用 双层 数据模型——它有助于了解哪个是哪个:
-
捆绑数据 (
src/data/bundled/*.json)是什么比较/计算器工具 默认情况下读取,因此服务器无需网络调用即可立即工作。- AWS、Azure、GCP 从实时上游源重新生成捆绑数据
(
instances.vantage.sh+官方Azure零售价格API)和 自动刷新 每周的 通过refresh-dataGitHub行动. 您还可以使用以下命令在本地重新生成npm run fetch-data. - OCI 捆绑数据是 精选的 (vantage.sh没有OCI提要)并手动更新。
对于实时OCI定价,请使用
refresh_oci_pricing工具或专用 oci定价mcp.
- AWS、Azure、GCP 从实时上游源重新生成捆绑数据
(
-
实时刷新工具 (
refresh_aws_ec2_pricing,refresh_azure_full_pricing,refresh_gcp_pricing,refresh_oci_pricing,refresh_aws_rds_pricing)获取电流 调用时从提供商API定价,缓存 60分钟记忆 一生 过程。这些会向调用者返回新的数据,但 不 重写捆绑包 文件——这只能通过npm run fetch-data/每周行动。
使用 get_data_freshness 查看每个提供者的捆绑时间戳和过期时间。
许可证
阿帕奇-2.0
作者
杰森·威尔伯(Jason wilbur.com)
相关项目
- oci定价mcp -具有25种以上工具的专用OCI定价MCP