NK

nozomi-koborinai/gcp-cost-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

23 stars 2 forks 质量 79 趋势 14MIT

💰 这是一个MCP服务器,使AI助手能够估算Google Cloud成本,由Cloud Billing Catalog API驱动,并采用Genkit for Go构建

概览

:这是一个非官方项目,与谷歌或Genkit团队无关、不认可或支持。 一个用于估算 Google Cloud 运行成本的 MCP(模型上下文协议)服务器。 你无需手动使用谷歌云定价计算器,而是直接从Claude Desktop、Gemini CLI或Cursor等AI助手获取GCP费用估算。 每个工具都是。AI助手根据上下文自主决定调用哪些工具及其顺序: 展示数据流——一个工具的输出会为另一个工具的输入提供能量。get_estimation_guide和estimate_cost是:它们内部解决自身依赖关系,减少往返。

概述(AI 翻译)

注:这是一个非官方项目,与谷歌或Genkit团队无任何关联、认可或支持。

一个用于估算 Google Cloud 运行成本的 MCP(模型上下文协议)服务器。

你无需手动使用谷歌云定价计算器,而是直接从Claude Desktop、Gemini CLI或Cursor等AI助手获取GCP费用估算。

特色

可用工具

工具 描述
get_estimation_guide 从这里开始! 动态生成任何GCP服务的SKU分析估算指南
classify_resource_cost 分类Terraform资源计费行为并估算授权计数基线
list_services 列出所有可用的谷歌云服务及其ID。
list_skus 列出特定服务的SKU(计费项目)
get_sku_price 获取特定SKU的价格详情
estimate_cost 根据SKU和使用量计算成本,并自动扣除免费分级

工具关系

每个工具都是独立且无状态的。AI助手根据上下文自主决定调用哪些工具及其顺序:

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

GCP Cost MCP Server

Note: This is an unofficial project and is not affiliated with, endorsed by, or supported by Google or the Genkit team.

An MCP (Model Context Protocol) server for estimating Google Cloud running costs.

Instead of manually using the Google Cloud Pricing Calculator, you can get GCP cost estimates directly from AI assistants like Claude Desktop, Gemini CLI, or Cursor.

Features

Available Tools

Tool Description
get_estimation_guide Start here! Dynamically generates estimation guides from SKU analysis for any GCP service
classify_resource_cost Classifies Terraform resource billing behavior and estimates an authorized-count baseline
list_services Lists all available Google Cloud services with their IDs
list_skus Lists SKUs (billable items) for a specific service
get_sku_price Gets pricing details for a specific SKU
estimate_cost Calculates cost based on SKU and usage amount, with automatic free tier deduction

Tool Relationships

Each tool is independent and stateless. AI assistants autonomously decide which tools to call and in what order based on context:

graph TB
    guide["get_estimation_guide─────────────────IN: service_nameOUT: required params, pricingfactors, free tier info, tips─────────────────Internally resolvesservice & SKU lookup"]

    classify["classify_resource_cost─────────────────IN: Terraform resource type,resource attributesOUT: billing trigger, SKU,warnings, monthly estimate"]

    services["list_services─────────────────IN: name filter (opt)OUT: service_id, display_name"]

    skus["list_skus─────────────────IN: service_id, region, keywordOUT: sku_id, display_name,categories, regions"]

    price["get_sku_price─────────────────IN: sku_id, currencyOUT: price/unit, pricing tiers"]

    cost["estimate_cost─────────────────IN: sku_id, usage_amountOUT: estimated cost withautomatic free tier deduction─────────────────Internally resolves pricing"]

    services -- "service_id" --> skus
    skus -- "sku_id" --> price
    skus -- "sku_id" --> cost

Solid arrows show data flow — one tool’s output feeds another’s input. get_estimation_guide and estimate_cost are self-contained: they internally resolve their own dependencies, reducing round-trips.

Use Case How AI Uses the Tools
Quick estimate get_estimation_guide → gather user requirements → estimate_cost
Multi-service Multiple get_estimation_guide + estimate_cost calls in parallel
Explore pricing list_services → list_skus → get_sku_price
在 GitHub 查看完整 README

安装

npx @modelcontextprotocol/inspector ./gcp-cost-mcp-server
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "gcp-cost": { "command": "/opt/homebrew/bin/gcp-cost-mcp-server" } } }