# x7even/cloudcostsmcp [Health: Active]

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/x7even/cloudcostsmcp  
**GitHub Stars:** 3  
**Views:** 6  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/x7even-cloudcostsmcp

## Description
Anchor AI FinOps to real, live cloud pricing. 15 tools for AWS, GCP & Azure — public list prices and enterprise negotiated rates (Reserved Instances, Savings Plans, CUDs, EDPs). No credentials needed for AWS and Azure public pricing. pip install opencloudcosts

## Tools
Capabilities this server exposes over MCP:

- **cache_stats** — Return statistics about the local pricing cache (entry counts, DB size), including a per-provider/service breakdown and as_of age of the most recent write.
- **compare_bom** — Price a multi-service workload across multiple cloud providers simultaneously and return a side-by-side cost comparison. Use this when the user wants to compare total costs across AWS, GCP, and/or Azure for the same infrastructure.

OUTPUT FORMAT — aggregate totals only: for each workload key, storage capacity, provisioned IOPS, and provisioned throughput costs are summed into ONE number in the breakdown map. This tool does NOT return separate line items for storage $, IOPS $, and throughput $. If the user asks for a cost breakdown with storage capacity, provisioned IOPS, and provisioned throughput as separate line items per disk, use estimate_bom instead — it returns one row per price component.

Storage: accepts abstract tiers ("ssd" → gp3/pd-ssd/premium-ssd, "hdd" → sc1/pd-standard/standard-hdd) or provider-specific types (gp3, io2, sc1, pd-ssd, pd-extreme, hyperdisk-extreme, etc.) with iops and throughput_mbps for IOPS pricing. Use compare_bom when a provider-vs-provider total-cost summary is sufficient.

Returns per-provider totals keyed by pricing term, a breakdown map (workload_key → aggregate monthly $), committed vs on-demand savings, and any supplementary costs not included in the estimate.

The workload is described in cloud-agnostic terms (vcpus, memory_gb, storage_gb) — the tool selects the closest equivalent instance type per provider automatically.

Args:
    providers: Which providers to compare — ["aws", "gcp", "azure"] (default: all three).
    region_preference: Region tier — "us" (default), "eu", "apac".
    workload: Map of logical name → resource spec. Each spec needs 'type' (compute/storage/database/cache) plus vcpus, memory_gb, quantity, etc.
    terms: Pricing terms — default ["on_demand", "reserved_1yr"]. Term translation is automatic: reserved_1yr maps to cud_1yr for GCP.

Example:
    workload: {
      "web_servers": {"type": "compute", "vcpus": 4, "memory_gb": 16, "quantity": 3},
      "database":    {"type": "database", "vcpus": 8, "memory_gb": 32},
      "storage":     {"type": "storage", "storage_gb": 500, "storage_type": "ssd"}
    }

  Multi-disk storage (gp3/io2 vs pd-ssd/pd-extreme):
    providers:["aws","gcp"], workload:{"p_a":{"type":"storage","storage_gb":10000,"storage_type":"gp3","iops":3000},"p_c":{"type":"storage","storage_gb":500,"storage_type":"io2","iops":64000}}
- **compare_bom_regions** — 
        Compare a Bill of Materials' total monthly cost across multiple regions.

        v1 scope: PricingSpec-dict items are AWS-only. Each item is an open PricingSpec dict, same
        shape as estimate_bom's items (provider, domain, resource_type/region/etc, plus
        quantity/hours_per_month/size_gb/description) — or a raw-SKU dict (sku, region, provider,
        plus optional service/operation/product_family) for a CUR usage-type/SKU string
        (provider="aws"), a GCP Cloud Billing Catalog skuId string (provider="gcp"; operation/
        product_family are ignored for GCP), or an Azure Retail Prices API meterId string
        (provider="azure"; operation is ignored, product_family has Azure-specific meaning — see
        get_price_by_sku). Unlike get_price_by_sku, provider is REQUIRED on raw-SKU items here (no
        default) — a single call commonly compares items from different providers across the same
        regions, so a missing provider is reported once under "not_supported" (see below) rather
        than guessed. The region field on each item is overridden per comparison — pass any
        region in the item dicts. A region's region_name is only populated from the region-code
        display maps when every resolvable item in the call shares one provider; a mixed-provider
        call (e.g. an AWS item and a GCP item together) falls back to the bare region code instead
        of guessing whose naming applies.
        Weighting and a providers filter are not supported yet. Unsupported items
        (a PricingSpec-dict item naming a non-AWS provider, or a raw-SKU item naming a provider
        other than aws/gcp/azure, or a raw-SKU item with no provider at all) are reported once
        under "not_supported" rather than guessed or dropped silently; full GCP/Azure
        PricingSpec-dict support is tracked separately.

        Returns regions[] sorted cheapest-first, each with total_monthly, the
        resolved line_items, and any per-item errors. Optionally shows delta vs
        a baseline region.

        Args:
            items: List of PricingSpec dicts (same shape as estimate_bom, AWS-only) — or
                   raw-SKU dicts (sku, region, plus required provider "aws", "gcp", or "azure",
                   plus optional service/operation/product_family). See estimate_bom
                   for full item format.
            regions: List of region codes to compare, e.g. ["us-east-1", "eu-west-1"].
            baseline_region: Optional region for delta comparison, e.g. "us-east-1".
        
- **compare_prices** — 
        Compare pricing for any service across multiple regions.

        Fetches concurrently. Returns results sorted cheapest first, with % delta between
        cheapest and most expensive. Optionally shows delta vs a baseline region.

        Args:
            spec: PricingSpec dict (same as get_price). The region field is overridden
                  per comparison — you can pass any region in the spec.
            regions: List of region codes to compare, e.g. ["us-east-1", "eu-west-1", "ap-northeast-1"]
            baseline_region: Optional region for delta comparison, e.g. "us-east-1".
        
- **describe_catalog** — 
        Discover what each provider supports and how to call get_price.

        - No args → full support matrix across all configured providers.
        - provider only → all domains/services for that provider.
        - provider + domain [+ service] → targeted guidance with required_fields,
          supported_terms, filter_hints, and a ready-to-use example_invocation
          you can pass directly to get_price.

        Use this before get_price when unsure of exact field names or values.

        Args:
            provider: Cloud provider — "aws", "gcp", or "azure". Empty = all providers.
            domain: Domain — "compute", "storage", "database", "ai", "container",
                    "serverless", "analytics", "network", "observability". Empty = all.
            service: Service — e.g. "bedrock", "rds", "gke", "bigquery". Empty = all.
        
- **estimate_bom** — 
        Use this tool for total infrastructure cost, TCO, monthly spend for a multi-resource
        stack, or cost comparison between architectures.

        Handles compute + storage + database + AI together in a single call — do NOT call
        get_price individually for multi-resource questions; use this tool instead.

        Returns per-item and total monthly/annual costs with real public pricing data,
        plus a not_included list of supplementary costs (egress, load balancers, monitoring).
        These are SUPPLEMENTARY — only price them if the user asked for TCO; for most
        questions just note 'additional costs may apply'.

        Each item should be a PricingSpec dict PLUS a quantity field:
          - provider: "aws" | "gcp" | "azure"
          - domain: "compute" | "storage" | "database" | "ai" | ...
          - region: region code
          - quantity: number of units (default 1)
          - hours_per_month: hours/month for compute (default 730 = always-on)
          - description: optional label for this line item
          Plus domain-specific fields (see get_price or describe_catalog for details).

        An item may instead be a raw-SKU dict: {"sku": "...", "provider": "aws",
        "region": "us-east-1", "quantity": 3} — the same raw CUR usage-type/SKU string (provider
        "aws"), GCP Cloud Billing Catalog skuId string (provider "gcp"), or Azure Retail
        Prices API meterId string (provider "azure") get_price_by_sku resolves. Unlike
        get_price_by_sku, provider is REQUIRED here (no default) — a BoM commonly mixes items from
        different providers in one call, so a missing provider is rejected with a clear error
        rather than guessed. Optionally add service/operation/product_family hints to disambiguate
        (operation is AWS-only, ignored for provider "gcp"/"azure"; product_family is AWS-only for
        the productFamily-matching behavior described in get_price_by_sku, but carries different
        Azure-specific meaning — see get_price_by_sku — for provider "azure", and is ignored for
        provider "gcp"). A GCP SKU with usage-volume tiers is costed at the tier matching this
        item's quantity.

        Examples:
          Compute + database + storage on AWS:
          [
            {"provider": "aws", "domain": "compute", "resource_type": "m5.xlarge",   "region": "us-east-1", "quantity": 3},
            {"provider": "aws", "domain": "database", "service": "rds", "resource_type": "db.r6g.large", "engine": "MySQL", "deployment": "single-az", "region": "us-east-1"},
            {"provider": "aws", "domain": "storage",  "storage_type": "gp3", "size_gb": 500, "region": "us-east-1"}
          ]

          Mixed cloud:
          [
            {"provider": "gcp",   "domain": "compute", "resource_type": "n1-standard-4", "region": "us-central1", "quantity": 2},
            {"provider": "azure", "domain": "compute", "resource_type": "Standard_D4s_v3", "region": "eastus", "quantity": 1}
          ]
        
- **estimate_unit_economics** — 
        Estimate per-unit economics (cost per user, per request, per transaction) given
        a Bill of Materials and expected monthly usage volume.

        Args:
            items: Same format as estimate_bom — list of cloud resource PricingSpec dicts
                   plus quantity field. See estimate_bom for full item format.
            units_per_month: Monthly volume being measured (e.g. 10000 users)
            unit_label: What the unit represents — "user", "request", "transaction", etc.
        
- **find_available_regions** — 
        Find all regions where a specific service/instance type is available, cheapest first.

        All fields must be nested under "spec" — do not pass provider/domain/resource_type
        etc. as top-level arguments. Example call:
          {"spec": {"provider": "aws", "domain": "compute", "resource_type": "m5.xlarge", "region": "us-east-1"}}

        Args:
            spec: PricingSpec dict (same as get_price). The region field is overridden
                  per comparison — pass any region in the spec.
            regions: Region codes to check. Omit for major regions.
                     Pass ["all"] to search every available region.
            baseline_region: Optional region for delta comparison.
        
- **find_cheapest_region** — 
        Find the cheapest region for any cloud service.

        Queries pricing concurrently across regions and returns results sorted cheapest
        first, with the price delta between cheapest and most expensive regions.

        Args:
            spec: PricingSpec dict (same as get_price). The region field is overridden
                  for each comparison — pass any region in the spec.
            regions: List of region codes to compare. Omit for major regions (faster).
                     Pass ["all"] to search every available region (slow on first run without cache).
            baseline_region: Optional region for delta comparison, e.g. "us-east-1".
        
- **get_coverage** — 
        Report which domains/services this server actually covers, per provider.

        v1 scope: structural coverage from the catalog only — each domain is
        reported as "catalog" (with its known services) unless the provider
        has no entry for it at all. This does NOT fan out a live get_price call
        per region — whether a specific region's live price is a real catalog
        rate or a degraded fallback constant is only observable by calling
        get_price for that spec and checking its "fallback" field, since that
        is a live fetch outcome rather than a fixed property of the catalog.

        Use this to answer "what does this server know about" before trial-
        and-error against describe_catalog and individual get_price calls.

        Args:
            provider: Cloud provider — "aws", "gcp", or "azure". Empty = all
                      configured providers.
        
- **get_discount_summary** — 
        Return a summary of all active cloud discounts for the authenticated account.

        For AWS: active Savings Plans (type, commitment $/hr, utilization %) and
        active Reserved Instances (instance type, count, payment type, days remaining),
        plus Cost Explorer utilization for the previous month.

        Requires credentials and OCC_AWS_ENABLE_COST_EXPLORER=true for AWS.

        Args:
            provider: Cloud provider — "aws" (GCP CUD support coming later)
        
- **get_price** — 
        Unified pricing tool — returns public catalog rates plus contracted/effective prices
        where credentials are available.

        Pass a spec dict with at minimum: provider, domain, region.
        Domain-specific required fields (call describe_catalog for the complete list):

          COMPUTE  : resource_type ("m5.xlarge" / "n1-standard-4" / "Standard_D4s_v3")
                     os ("Linux" or "Windows"), term ("on_demand"/"spot"/"cud_1yr")
                     Fargate: vcpu (e.g. 2.0), memory_gb (e.g. 4.0), service="fargate"
          STORAGE  : storage_type ("gp3"/"io2"/"sc1"/"standard"/"nearline"/"pd-extreme"/"hyperdisk-extreme"/"premium-ssd")
                     size_gb — disk size for monthly estimate
                     iops — provisioned IOPS for io1/io2 (AWS) or pd-extreme/hyperdisk-extreme (GCP)
                     throughput_mbps — provisioned throughput MB/s for gp3 (AWS); charge above 125 MB/s baseline
          DATABASE : resource_type ("db.r5.large"/"db-n1-standard-4"), engine ("MySQL"),
                     deployment ("single-az"/"ha"/"multi-az"), service ("rds"/"cloud_sql"/"memorystore")
          AI       : model ("claude-3-5-sonnet"/"gemini-1.5-flash"), service ("bedrock"/"gemini"/"vertex"),
                     input_tokens, output_tokens  |  machine_type + task for Vertex
          CONTAINER: service ("gke"/"eks"), mode ("standard"/"autopilot"), node_count, vcpu, memory_gb
          ANALYTICS: service ("bigquery"), query_tb, active_storage_gb, longterm_storage_gb, streaming_gb
          NETWORK  : service ("cloud_lb"/"cloud_cdn"/"cloud_nat"/"cloud_armor"),
                     lb_type, rule_count, data_gb, gateway_count, egress_gb, policy_count
          OBSERVABILITY: service ("cloudwatch"/"cloud_monitoring"), ingestion_mib, log_gb
          INTER_REGION_EGRESS: source_region, dest_region (empty = internet), data_gb
                     Example: {"provider": "aws", "domain": "inter_region_egress",
                               "source_region": "us-east-1", "dest_region": "eu-west-1"}

        Returns public_prices[] always. When auth exists: contracted_prices[], effective_price,
        auth_available=true.

        Call describe_catalog(provider, domain, service) for an example_invocation you can
        copy directly into this tool.

        Args:
            spec: PricingSpec dict — see field descriptions above.

        Examples:
            {"provider": "aws",   "domain": "compute",     "resource_type": "m5.xlarge",       "region": "us-east-1"}
            {"provider": "aws",   "domain": "ai",          "service": "bedrock", "model": "claude-3-5-sonnet", "region": "us-east-1", "input_tokens": 1000000, "output_tokens": 1000000}
            {"provider": "gcp",   "domain": "compute",     "resource_type": "n1-standard-4",   "region": "us-central1", "term": "cud_1yr"}
            {"provider": "gcp",   "domain": "analytics",   "service": "bigquery", "query_tb": 10.0, "active_storage_gb": 500.0, "region": "us"}
            {"provider": "azure", "domain": "compute",     "resource_type": "Standard_D4s_v3", "region": "eastus"}
            {"provider": "aws",   "domain": "database",    "service": "rds", "resource_type": "db.r5.large", "engine": "MySQL", "deployment": "single-az", "region": "us-east-1"}
        
- **get_price_by_sku** — 
        Resolve a raw AWS usage-type/SKU string — exactly as it appears in a Cost & Usage Report
        (CUR) export, e.g. "CAN1-BoxUsage:r5a.8xlarge" — a raw GCP Cloud Billing Catalog skuId
        string (provider="gcp"), or a raw Azure Retail Prices API meterId string (provider="azure",
        a GUID, e.g. "00000000-0000-0000-0000-000000000000") to a price, across one or more
        regions.

        Use this instead of get_price/compare_prices when you have a raw billing export line item
        (a "UsageType"/"SKU" column value, or a GCP skuId) and need to reconcile it against current
        public pricing, rather than starting from a known resource_type/domain spec. This tool strips the
        region-prefix token from the usage-type string (e.g. "CAN1-", "EU-", or no prefix at all
        for us-east-1) to get a region-independent suffix, then matches that suffix against each
        target region's pricing catalog. (This prefix-stripping step is AWS-only; see the GCP and
        Azure paragraphs below for how provider="gcp"/provider="azure" resolve instead.)

        If service is omitted, the AWS servicecode is inferred from the usage-type pattern (e.g.
        "BoxUsage:" implies AmazonEC2, "LCUUsage" implies AWSELB) — service_source in the response
        indicates "explicit" or "inferred". If a supplied service hint finds no match but the
        inferred servicecode does (real CUR data isn't always internally consistent — e.g. data-
        transfer usage types sometimes appear against an "AmazonEC2" AWS Product column but are
        actually billed under AWSDataTransfer), the tool falls back to the inferred match and flags
        service_mismatch on that region's result rather than reporting no match.

        Some usage-type suffixes are shared by multiple distinct billable products (e.g. ELB's
        "LCUUsage" suffix matches Application/Network/Gateway load balancer pricing alike; RDS's
        "InstanceUsage:<type>" suffix matches every database engine on that instance type). When
        that happens the affected region is reported under ambiguous_in (NOT in
        all_regions_sorted/cheapest_price/most_expensive_price — an ambiguous multi-product match
        is never silently resolved to "cheapest"), with every candidate row listed under
        alternate_matches. Pass operation and/or product_family — the same columns a CUR export
        carries alongside the usage-type/SKU column — to resolve it: e.g. for an Application Load
        Balancer LCU usage-type, product_family="Load Balancer-Application" picks the correct row
        out of the Application/Network/Gateway alternatives.

        Regions with no catalog entry for the resolved suffix are reported in no_mapping_in
        (checked, not found) — this is distinct from errors_in (the catalog fetch itself failed)
        and from ambiguous_in (matched, but more than one product row and not yet resolved).
        Known limitation: compound inter-region/wavelength data-transfer SKUs with two region-
        shaped tokens (e.g. "USE1WL1ATL1-CAN1-AWS-Out-Bytes") are not fully resolved by the
        single-prefix-strip model; these produce a warning rather than a silently wrong match.

        For provider="gcp": sku is a Cloud Billing Catalog skuId (e.g. "D041-9EFB-5FA5"), matched
        exactly (no prefix-stripping) against the service hint's catalog if given, or every
        onboarded service's catalog if service is omitted. operation/product_family hints are AWS-only and
        ignored for GCP — a matched skuId is unambiguous, so ambiguous_in does not apply; instead
        some GCP SKUs are usage-volume tiered (result entries carry "tiered": true plus an
        "all_tier_rates" array; the entry's own price_per_unit is the lowest tier's rate). GCP's
        service_source is "explicit" (service given) or "scanned_all" (no hint — every onboarded
        service's catalog is searched) rather than AWS's "inferred".

        For provider="azure": sku is an Azure Retail Prices API meterId (a GUID), matched exactly
        (no prefix-stripping, like GCP) against the region's catalog. service is not used (the
        meterId itself is looked up directly) and operation is ignored — Azure has no equivalent
        hint. product_family carries AZURE-SPECIFIC meaning here, distinct from the AWS
        productFamily/GCP cases above: pass one of "Consumption", "DevTestConsumption", or
        "Reservation" to match against the row's type field (case-insensitively), OR pass the
        literal value "spot" to match against the row's meterName instead of type (Azure spot rows
        are Consumption-type rows whose meterName contains "Spot", not a distinct type value) —
        do not assume "spot" resolves the same way as the type-equality hints. Some Azure
        Reservation-type meterId matches span more than one genuinely distinct billable product and
        cannot be safely disambiguated by this tool even with a hint; those are reported under
        ambiguous_in rather than guessed.

        Args:
            provider: Cloud provider — "aws" (raw usage-type SKUs), "gcp" (raw Cloud Billing
                      Catalog skuId strings), or "azure" (raw Retail Prices API meterId strings).
                      Defaults to "aws".
            sku: The raw usage-type/SKU string exactly as it appears in the CUR export (AWS), the
                 raw Cloud Billing Catalog skuId string (GCP), or the raw Retail Prices API meterId
                 GUID string (Azure).
            service: Optional service hint. For AWS, a servicecode (e.g. "AmazonEC2", "AWSELB",
                     "AmazonRDS", "AmazonDynamoDB", "AmazonElastiCache", "AWSDataTransfer") — if
                     omitted, it is inferred from the usage-type pattern. For GCP, one of the
                     onboarded service names (e.g. "compute", "gcs", "cloudsql", "gke",
                     "memorystore", "kms", "dns", "firestore", "pubsub", "vertex", "bigquery",
                     "monitoring", "armor") — if omitted, every onboarded service is searched.
                     Unused for Azure (the meterId is looked up directly).
            regions: List of region codes to check, e.g. ["us-east-1", "eu-west-1"] (AWS),
                     ["us-central1"] (GCP), or ["eastus"] (Azure). Required, max 30.
            baseline_region: Optional region for delta comparison, e.g. "us-east-1".
            operation: Optional AWS-only disambiguating hint — the AWS product "operation"
                       attribute (e.g. "CreateDBInstance:0021" identifies Aurora PostgreSQL among
                       RDS engines on the same instance type), matched case-insensitively. Use this
                       when a region comes back in ambiguous_in. Ignored for provider="gcp" or
                       provider="azure" (Azure has no equivalent hint).
            product_family: Optional disambiguating hint whose meaning is provider-specific. For
                            AWS, the AWS top-level "productFamily" (e.g. "Load Balancer-Application"
                            for an ALB vs NLB/GLB), matched case-insensitively. Ignored for
                            provider="gcp". For provider="azure", pass "Consumption",
                            "DevTestConsumption", or "Reservation" to match the row's type field, or
                            the literal "spot" to match the row's meterName instead (NOT resolved
                            the same way as the type values — see the Azure paragraph above). Use
                            this when a region comes back in ambiguous_in.

        Examples:
            {"sku": "CAN1-BoxUsage:r5a.8xlarge", "regions": ["ca-central-1", "us-east-1"]}
            {"sku": "CAN1-AWS-Out-Bytes", "service": "AmazonEC2", "regions": ["ca-central-1"]}
            {"sku": "CAN1-LCUUsage", "service": "AWSELB", "product_family": "Load Balancer-Application",
             "regions": ["ca-central-1", "us-east-1"]}
            {"provider": "gcp", "sku": "D041-9EFB-5FA5", "regions": ["us-central1", "europe-west1"]}
            {"provider": "azure", "sku": "00000000-0000-0000-0000-000000000000", "regions": ["eastus", "westeurope"]}
        
- **get_prices_batch** — 
        Get prices for multiple compute instance types in a single region in one call.

        Fetches all prices concurrently. Useful for comparing a shortlist of candidate
        instance types (e.g. m5.xlarge vs c5.xlarge vs r5.xlarge) without separate calls.

        Args:
            provider: Cloud provider — "aws", "gcp", or "azure"
            instance_types: List of instance types, e.g. ["m5.xlarge", "c5.xlarge", "r5.large"]
            region: Region code, e.g. "us-east-1" or "us-central1"
            os: Operating system — "Linux" (default) or "Windows"
            term: Pricing term — "on_demand" (default), "spot", "reserved_1yr", "cud_1yr"
        
- **get_prices_by_sku** — 
        Batch form of get_price_by_sku: resolve many raw AWS usage-type/SKU strings — each exactly
        as it appears in a Cost & Usage Report (CUR) export — many raw GCP Cloud Billing Catalog
        skuId strings (provider="gcp"), or many raw Azure Retail Prices API meterId strings
        (provider="azure") — against the same set of target regions in one call.

        Use this to reconcile many CUR line items (or GCP skuIds/Azure meterIds) at once instead
        of issuing one get_price_by_sku call per SKU. Each sku is resolved independently via the
        same logic get_price_by_sku uses, so per-region ambiguous_in/no_mapping_in/errors_in
        bucketing (AWS and Azure), tiered/all_tier_rates (GCP), and baseline_region deltas all
        apply per sku exactly as they would in a standalone get_price_by_sku call — this tool only
        adds the batching and aggregation layer on top.

        service/operation/product_family hints are not supported here (they are inherently
        per-sku, and different SKUs in a batch usually resolve to different services) — for AWS the
        servicecode is inferred per sku from its usage-type pattern; for GCP every onboarded
        service's catalog is searched per sku; for Azure the meterId is looked up directly and any
        Reservation-type collision that get_price_by_sku's product_family hint could otherwise
        resolve is instead reported ambiguous. If a particular sku needs a hint to resolve an
        ambiguous_in entry (AWS or Azure) or to narrow the search (GCP), follow up with a single
        get_price_by_sku call for that sku, passing service and, for AWS/Azure, operation/
        product_family.

        Each successfully-processed sku appears in "results", in the same order as the input skus
        list (NOT re-sorted by price — distinct SKUs commonly price in different units, e.g.
        per-hour vs per-GB vs per-request, that are not meaningfully comparable). A sku that fails
        outright (e.g. an empty string, or a usage-type pattern no service could be inferred for)
        is instead reported in the top-level "errors" map, keyed by that sku string, with
        message/status/retryable fields mirroring get_prices_batch's per-item error shape.

        Args:
            provider: Cloud provider — "aws" (raw usage-type SKUs), "gcp" (raw Cloud Billing
                      Catalog skuId strings), or "azure" (raw Retail Prices API meterId strings).
                      Defaults to "aws".
            skus: List of raw usage-type/SKU strings (AWS), skuId strings (GCP), or meterId GUID
                  strings (Azure). Required, max 25.
            regions: List of region codes to check, e.g. ["us-east-1", "eu-west-1"] (AWS),
                     ["us-central1"] (GCP), or ["eastus"] (Azure). Required, max 30 (applies to
                     every sku).
            baseline_region: Optional region for delta comparison, applied to every sku,
                             e.g. "us-east-1".

        Examples:
            {"skus": ["CAN1-BoxUsage:r5a.8xlarge", "USW2-BoxUsage:m5.large"], "regions": ["us-east-1", "ca-central-1"]}
            {"provider": "gcp", "skus": ["D041-9EFB-5FA5"], "regions": ["us-central1", "europe-west1"]}
            {"provider": "azure", "skus": ["00000000-0000-0000-0000-000000000000"], "regions": ["eastus", "westeurope"]}
        
- **get_spot_history** — get_spot_history is not available. For spot pricing, use get_price with term="spot" to look up current spot prices, or use list_instance_types to browse instance families and their spot price ranges.
- **list_instance_types** — 
        List available compute instance types matching the given filters.

        Args:
            provider: Cloud provider — "aws", "gcp", or "azure"
            region: Region code, e.g. "us-east-1" (AWS), "us-central1" (GCP), "eastus" (Azure)
            family: Instance family prefix filter, e.g. "m5" (AWS), "n2" (GCP)
            min_vcpu: Minimum vCPU count filter
            min_memory_gb: Minimum memory in GB filter
            gpu: If True, only return GPU-enabled instance types
        
- **list_regions** — 
        List all regions where a cloud service is available for the given provider.

        Args:
            provider: Cloud provider — "aws", "gcp", or "azure"
            domain: Domain filter — "compute" (default), "storage", "database"
        
- **refresh_cache** — 
        Invalidate the pricing cache to force fresh data on next request.

        Args:
            provider: Provider to clear ("aws", "gcp", "azure"), or empty string to purge expired entries.
        
- **search_pricing** — Deprecated helper that redirects to the correct tools. Use describe_catalog to browse available services by domain/provider, or get_price with a known spec.
- **warm_cache** — 
        Pre-populate the pricing cache for a provider before a large sweep (e.g. a
        multi-region compare_prices or get_prices_batch call), so that sweep hits a warm
        cache instead of paying fetch latency on every combination.

        Resolves each requested service to its catalog example_invocation (the same data
        describe_catalog returns) and fans the resulting spec x region combinations out
        concurrently, mirroring the compare_prices/get_prices_batch fan-out pattern.

        Args:
            provider: Cloud provider — "aws", "gcp", or "azure"
            regions: List of region codes to warm, e.g. ["us-east-1", "eu-west-1"]
            services: Optional list of service names or describe_catalog keys, e.g.
                      ["ec2", "rds", "compute/fargate"]. Omit to warm every service the
                      provider's catalog has an example invocation for.
        

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "cloudcostsmcp": {
    "command": "uvx",
    "args": ["opencloudcosts"]
  }
}
```

## Documentation & README

# OpenCloudCosts MCP

<!-- mcp-name: io.github.x7even/cloudcostsmcp -->

## Anchor AI FinOps to real, live cloud pricing.

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![PyPI version](https://img.shields.io/pypi/v/opencloudcosts)](https://pypi.org/project/opencloudcosts/)
[![Release](https://img.shields.io/github/v/release/x7even/cloudcostsmcp?include_prereleases)](https://github.com/x7even/cloudcostsmcp/releases/latest)

Your LLM's cloud pricing knowledge was frozen at training cutoff. Cloud pricing wasn't.

**opencloudcosts** is an MCP server that gives your AI assistant live, structured access to AWS, GCP, and Azure pricing — 16 tools it can call directly, with results it can reason over rather than guess at. Ask it to compare a full multi-resource workload across all three clouds simultaneously. Ask it for your actual post-discount effective rates from Reserved Instances, Savings Plans, or Enterprise Discount Programs. Ask it to fan out across every region and return the cheapest option. None of that is possible from training data alone, and none of it is possible from a single-cloud pricing calculator.

## The Problem

Ask any AI assistant what an `m5.2xlarge` costs in `ap-southeast-2`, whether AWS or GCP is cheaper for a three-tier web app, or what your effective hourly rate is after Savings Plans. You will get a confident answer. It will probably be wrong.

Cloud pricing is a poor fit for static model weights: instance families are added and retired, regional pricing diverges (the same instance type can differ 20–40% across regions), spot markets fluctuate, and commitment discounts are by definition unique to each account. A model answering from training data cannot know your negotiated EDP rate. It can barely reliably recall last year's list price. The problem is not that LLMs are bad — it's that real-time, account-specific pricing data is structurally outside what a model can know.

opencloudcosts fixes this by giving your AI assistant 16 MCP tools backed by live provider APIs. Instead of hallucinating numbers, the model calls a tool and gets a precise answer.

## A Concrete Scenario

Your team asks: *"We're evaluating whether to migrate this workload from AWS to GCP. What does the full stack cost on-demand vs. three-year committed, across all three clouds, so I can make the case to leadership?"*

Without this tool, the model interpolates — possibly from pricing that is a year out of date — across three providers, multiple resource types, and at least four pricing tiers. The numbers will be plausible and wrong.

With opencloudcosts, the model calls `compare_bom` with the workload spec (compute + storage + database). The tool fans out **8 concurrent provider calls** across AWS, GCP, and Azure simultaneously, prices each resource category at public and committed rates, and returns a per-provider, per-term breakdown with savings analysis — in a single tool call.

No spreadsheet. No switching between three provider calculators. No manual SKU matching. No training-data approximation.

## Why Not the Obvious Alternatives

**Asking a model without tools** — Training data has a cutoff. Cloud pricing changes constantly, varies 20–40% across regions for the same instance type, and includes account-level commitment discounts that are invisible at inference time. The model will approximate, confabulate, or recall stale numbers. There is no structured output, and the model cannot access your contracted rates under any circumstances.

**Cloud pricing calculators (AWS / GCP / Azure)** — Each covers exactly one cloud. They are UI-only with no API surface callable from an AI assistant. Cross-cloud comparison requires manually reproducing the same architecture three times across three separate calculators and reconciling exports by hand. They have no concept of unit economics and produce no programmatic output for agentic workflows.

**Infracost** — Excellent at estimating cost diffs against Terraform plans. It requires IaC files as input — it cannot answer "what does an n2-standard-8 cost in europe-west4?" without a Terraform plan in hand. It is not an MCP server and is not callable from a conversational AI context.

**Calling provider APIs directly** — AWS bulk pricing files are multi-GB and require targeted API access patterns to avoid downloading them in full. GCP's Cloud Billing Pricing API v1beta requires a multi-source ADC credential chain and provider-specific IAM. Azure's Retail Prices API needs pagination logic and SKU matching. Every provider uses different region naming conventions, SKU formats, and data schemas. opencloudcosts normalizes all of this behind a uniform MCP tool interface and handles credential chains, caching, and retry logic so the model does not have to.

## Capabilities at a Glance

| Capability | LLM (no tools) | Cloud Calculators | Infracost | opencloudcosts |
|---|---|---|---|---|
| Live pricing (not frozen at training cutoff) | No | Manual input only | IaC-bound | Yes — fetched from provider APIs |
| Cross-cloud comparison in one call | No | No | No | Yes — `compare_bom`, 8 concurrent provider calls |
| Effective/contracted rates (RI, SP, EDP, CUD) | No | No | No | Yes — credentials unlock this layer |
| Multi-region concurrent fan-out | No | No | No | Yes — up to 32 goroutines |
| Unit economics (cost/user, cost/request) | Approximate | No | No | Yes — `estimate_unit_economics` |
| MCP tool surface — callable by model | N/A | No | No | Yes — 16 tools |
| AWS + Azure public pricing, zero credentials | N/A | Single-cloud only | Partial | Yes |
| HTTP service for shared/Kubernetes deployments | N/A | N/A | No | Yes — bearer auth, rate limiting, probes |

## Coverage: Three Clouds, 16 Tools

Fourteen tools are fully functional. Two entries are compatibility stubs: `search_pricing` (a deprecated redirect from v0.8.x, kept for backward compatibility) and `get_spot_history` (registered but not implemented in the Go server — returns a structured "not available" response).

**Credential requirements by provider**

| Coverage | Credentials required |
|---|---|
| AWS EC2, EBS (gp3/io2/sc1), RDS, inter-region egress | None |
| Azure VMs, Managed Disks, Blob Storage, Azure SQL/MySQL/PostgreSQL, Cosmos DB, AKS, Azure Functions, Azure OpenAI (GPT-4o, GPT-4, GPT-3.5-Turbo, o1, o1-mini, embeddings) | None — fully public Retail Prices API |
| GCP Compute Engine, Cloud Storage, Persistent Disk, Cloud SQL, Memorystore, GKE, BigQuery, Vertex AI, Gemini, Cloud LB/CDN/NAT/Armor, Cloud Monitoring | Free API key (`OCC_GCP_API_KEY`) — no billing account, no credit card |
| AWS post-discount rates (Reserved Instances, Savings Plans) + `get_discount_summary` | AWS credentials + `OCC_AWS_ENABLE_COST_EXPLORER=true` ($0.01/call to Cost Explorer, opt-in only) |
| GCP committed-use discounts (CUDs) and Enterprise Discount Programs (EDPs) | ADC credentials + `billing.billingAccountPrice.get` IAM + `OCC_GCP_BILLING_ACCOUNT_ID` |

Azure Reserved VM pricing (1-year and 3-year terms) is available via the public Retail Prices API — no credentials needed. `compare_bom` returns committed-term Azure pricing with no setup beyond the binary.

**The 16 tools by category**

| Category | Tools |
|---|---|
| Pricing | `get_price`, `get_prices_batch`, `compare_prices`, `describe_catalog`, `search_pricing`†, `get_spot_history`† |
| FinOps | `estimate_bom`, `estimate_unit_economics`, `compare_bom`, `get_discount_summary` |
| Discovery | `list_regions`, `list_instance_types`, `find_cheapest_region`, `find_available_regions` |
| Cache | `refresh_cache`, `cache_stats` |

† Compatibility stub only — not functional for live data. See [opencloudcosts-go/README.md](https://github.com/x7even/cloudcostsmcp/blob/HEAD/opencloudcosts-go/README.md) for full parameter reference.

## Performance and Reliability

**Concurrency** — The analysis tools are not sequential HTTP wrappers:

- `find_cheapest_region` and `find_available_regions`: errgroup + semaphore, **up to 32 goroutines** — queries all available regions in parallel, returns results sorted cheapest-first
- `compare_bom`: **8 concurrent provider calls** across AWS, GCP, and Azure simultaneously
- `compare_prices`: semaphore of **10 concurrent region calls**
- `get_prices_batch`: parallelized across instance types within a region

**Rate limiting and timeouts** — Token-bucket rate limiter at 200 req/s on the HTTP transport (`OCC_RATE_LIMIT`). Per-request deadline: 60s (`OCC_REQUEST_TIMEOUT`). Per-provider API call: 30s (`OCC_PROVIDER_TIMEOUT`). Graceful SIGTERM drain: 15s (`OCC_SHUTDOWN_TIMEOUT`).

**Cache** — Prices are stored in a **concurrent in-memory cache** (read-optimised with `sync.RWMutex`) with atomic JSON persistence at `~/.cache/opencloudcosts/cache.json`. TTLs: public prices 24h (`OCC_CACHE_TTL_HOURS`), region/instance metadata 7 days (`OCC_METADATA_TTL_DAYS`), effective/contracted rates 1h (`OCC_EFFECTIVE_PRICE_TTL_HOURS`). Cache survives binary updates. 401/403 responses from billing APIs are never cached, so credential rotation takes effect immediately.

**AWS pricing** — EC2/EBS/RDS public pricing uses a targeted SKU API path rather than downloading the full multi-GB bulk pricing file, keeping startup fast and avoiding large network payloads.

**Error isolation** — Raw exception text never reaches LLM context. All tool boundaries emit structured error envelopes; full tracebacks are logged server-side only. GCP contract pricing falls back to public list prices on auth failure rather than surfacing an error into the conversation.

## Validated: 234/234

opencloudcosts v1.0.0 achieves **234/234 (100%)** on the LLM grounding harness, with zero XML hallucinations across the full suite.

The harness covers 234 realistic pricing questions across all three clouds: instance spot checks, cross-region comparisons, BOM estimates, multi-cloud comparisons, unit economics, AI model pricing, database pricing, storage pricing, discount summaries, egress pricing, availability queries, and network pricing.

Primary validation model: **`qwen3.6-35b-128k`** running locally via llama-swap — a self-hosted 35B reasoning model with no external API dependency. The harness has also been exercised against `qwen3.6-35b-a3b`, `qwen3.5-122b-a10b@q6_k`, and `gemma-4-26b-a4b`. Because MCP is a protocol rather than a model feature, accuracy comes from the tool returning correct live data — any MCP-capable AI assistant calls the same tool surface and gets the same structured response.

Harness progression: 109/123 (Python v0.8.x) → 169/169 (v0.9.0) → 199/199 (v0.9.2) → **234/234 (v1.0.0)**.

643 Go unit tests across all providers and tools verify behavioral correctness and cross-provider API parity, independent of LLM evaluation.

## Use Cases

**1. Price the same workload across all three clouds at once**

> "Price the following on AWS, GCP, and Azure simultaneously: 4 instances (8 vCPU, 32 GB RAM), 1 managed PostgreSQL database (4 vCPU, 16 GB RAM), and 500 GB block storage. Return on-demand, 1-year committed, and 3-year committed totals for each cloud with monthly and annual figures, and flag which provider is cheapest at each commitment term."

`compare_bom` fans out 8 concurrent provider calls and returns a per-provider, per-term breakdown with savings analysis versus on-demand. No pricing calculator does this across cloud boundaries. AWS and Azure public pricing requires no credentials; GCP requires a free API key.

---

**2. Find the cheapest AWS region for a long-running compute workload**

> "I need to run a c6a.4xlarge continuously. Fan out across all available AWS regions and return the 5 cheapest, sorted by on-demand hourly rate. Show us-east-1 as a baseline."

`find_cheapest_region` uses a 32-goroutine fan-out across every region where the instance type is available and returns results sorted cheapest-first. Regional price deltas for the same instance type routinely exceed 20%. No credentials needed.

---

**3. Determine your effective AWS rate after commitments**

> "I have two m5.xlarge Reserved Instances (1-year, no upfront) in us-east-1 and a Compute Savings Plan covering $500/month of EC2 spend. What is my effective blended hourly rate on m5.xlarge right now, and what percentage am I saving versus on-demand?"

`get_price` with AWS credentials and `OCC_AWS_ENABLE_COST_EXPLORER=true` returns your actual post-discount rate alongside the public list price, pulling live data from Cost Explorer and Savings Plans APIs.

---

**4. Azure serverless vs. always-on: break-even analysis**

> "Our batch processing job runs 1.5 million Azure Function executions per month, each consuming 512 MB for 900ms. What is the total monthly cost on the Consumption plan in West Europe, and what is the monthly cost of a Standard_D2s_v5 VM running continuously in the same region? At what monthly execution count do they break even?"

`estimate_unit_economics` covers the Functions path; `get_price` covers the VM. Azure pricing is fully public — no credentials, no API key, no subscription required.

---

**5. Unit economics for a SaaS product**

> "If I run two m5.large app servers, one db.t3.medium RDS MySQL instance, and 200 GB gp3 in us-east-1, and I have 50,000 monthly active users making 1 million requests per day, what is my infrastructure cost per user and per request?"

`estimate_bom` prices the full stack; `estimate_unit_economics` computes cost per user and per request at that scale. Output is structured for direct use in a margin model or board-level cost discussion. No credentials needed.

---

**6. AI token cost comparison: Vertex AI vs. Azure OpenAI**

> "We process 50 million input tokens and 8 million output tokens per month. Compare the total monthly cost of Gemini 1.5 Pro on Vertex AI versus GPT-4o and GPT-4o-mini on Azure OpenAI. Show cost per million tokens and total monthly bill for each."

`get_price` with `domain: ai` covers both providers. GCP Vertex AI and Gemini pricing requires a free GCP API key (`OCC_GCP_API_KEY`); Azure OpenAI pricing is fully public — no credentials needed.

---

## Setup

### Option 1 — pip (easiest, cross-platform)

The PyPI package wraps the native Go binary — no Go toolchain needed.

```bash
pip install opencloudcosts
opencloudcosts            # stdio mode (for local MCP clients)
opencloudcosts --transport http --host 0.0.0.0 --port 8080  # HTTP mode
```

### Option 2 — Homebrew (macOS / Linux)

```bash
brew tap x7even/opencloudcosts
brew install opencloudcosts
```

### Option 3 — binary download

Download the pre-built binary for your platform from the [latest release](https://github.com/x7even/cloudcostsmcp/releases/latest):

```bash
# Linux (amd64)
curl -L https://github.com/x7even/cloudcostsmcp/releases/latest/download/opencloudcosts_linux_amd64.tar.gz | tar xz
./opencloudcosts

# macOS (Apple Silicon)
curl -L https://github.com/x7even/cloudcostsmcp/releases/latest/download/opencloudcosts_darwin_arm64.tar.gz | tar xz
./opencloudcosts
```

### Option 4 — Docker / container

```bash
# Build the image first (no pre-built image is published)
cd opencloudcosts-go
docker build -t opencloudcosts:local .

# Run — HTTP transport, bound to all interfaces
docker run -p 8080:8080 \
  -e OCC_GCP_API_KEY=AIza... \
  -v ~/.aws:/root/.aws:ro \
  opencloudcosts:local
```

The image is ~15 MB (distroless scratch base, static binary). No credentials are
required for AWS and Azure public pricing.

### Option 5 — build from source

```bash
git clone https://github.com/x7even/cloudcostsmcp
cd cloudcostsmcp/opencloudcosts-go
CGO_ENABLED=0 go build -o opencloudcosts ./cmd/opencloudcosts
./opencloudcosts
```

### Connect to Claude Code

**Stdio (local process — recommended for single-user)**

Add to `~/.claude/settings.json` or your project's `.mcp.json`:

```json
{
  "mcpServers": {
    "cloudcost": {
      "command": "opencloudcosts",
      "env": {
        "OCC_GCP_API_KEY": "AIza..."
      }
    }
  }
}
```

**HTTP (shared/remote server — one server, many clients)**

```json
{
  "mcpServers": {
    "cloudcost": {
      "transport": "http",
      "url": "http://localhost:8080/"
    }
  }
}
```

### Kubernetes

See `deploy/kubernetes/` for manifests. Build and push your own image (see Docker section above), then reference it in `deployment.yaml`.
Credentials are passed via environment variables or Kubernetes Secrets — same variable
names as the Docker examples above.

### Test with MCP Inspector

```bash
npx @modelcontextprotocol/inspector opencloudcosts
```

## AWS Credentials

| Feature | Credentials needed |
|---------|--------------------|
| Public pricing (EC2, EBS, RDS list prices) | None |
| Effective pricing (RI / SP discounts) | AWS credentials + `OCC_AWS_ENABLE_COST_EXPLORER=true` |

Minimal IAM policy for public pricing:
```json
{
  "Effect": "Allow",
  "Action": ["pricing:GetProducts", "pricing:DescribeServices", "pricing:GetAttributeValues"],
  "Resource": "*"
}
```

Add these for effective pricing:
```json
"ce:GetCostAndUsage", "savingsplans:DescribeSavingsPlans", "savingsplans:DescribeSavingsPlanRates"
```

## Configuration

All settings via environment variables (prefix `OCC_`) or `.env` file:

| Variable | Default | Description |
|----------|---------|-------------|
| `OCC_CACHE_TTL_HOURS` | 24 | Public price cache TTL |
| `OCC_AWS_ENABLE_COST_EXPLORER` | false | Enable AWS effective pricing (costs $0.01/call) |
| `OCC_DEFAULT_REGIONS` | us-east-1,us-west-2 | Default regions |
| `AWS_PROFILE` | (default chain) | AWS credentials profile |
| `OCC_GCP_BILLING_ACCOUNT_ID` | (none) | GCP billing account ID for contract/effective pricing |

## Caching

Prices are stored in a **concurrent in-memory cache** (read-optimised with `sync.RWMutex`) with atomic JSON persistence at `~/.cache/opencloudcosts/cache.json`. Public list prices are cached for 24 hours — AWS pricing changes infrequently. Use the `refresh_cache` tool to force a refresh.

## GCP Setup

Unlike AWS (which has public bulk pricing endpoints), GCP's pricing API always requires at least a free API key. No credit card or billing account is needed.

**Option A — Free API key (recommended, 2 min setup):**
1. Go to [console.cloud.google.com/apis/credentials](https://console.cloud.google.com/apis/credentials)
2. Create a Project if you don't have one (free)
3. Click **Create Credentials → API key**
4. Set the key:

```bash
export OCC_GCP_API_KEY=AIza...
```

Or add `OCC_GCP_API_KEY=AIza...` to your `.env` file.

**Option B — Application Default Credentials** (if you already use `gcloud`):
```bash
gcloud auth application-default login
# or set GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
```

**GCP instance type format:** `{family}-{series}-{vcpus}` e.g. `n2-standard-4`, `e2-highmem-8`, `c2-standard-16`

### GCP Contract / Effective Pricing

If you have a negotiated pricing contract with Google Cloud, you can retrieve your actual discounted rates (EDP, custom pricing) via the Cloud Billing Pricing API v1beta. This requires:

1. ADC credentials: `gcloud auth application-default login`
2. `billing.billingAccountPrice.get` IAM permission on your billing account
3. Your billing account ID:

```bash
export OCC_GCP_BILLING_ACCOUNT_ID=012345-567890-ABCDEF
```

With this configured, `get_price` responses for GCP compute will include an `effective_price` block showing your contract rate and discount percentage. Without it, public list prices are returned unchanged.

## Azure Setup

Azure pricing is fully public — no credentials, API key, or subscription needed.

```bash
# No configuration needed — works out of the box
uv run opencloudcosts
```

**Azure instance type format:** ARM SKU names e.g. `Standard_D4s_v3`, `Standard_E8s_v3`, `Standard_B2ms`

**Azure pricing terms:** `on_demand` (default), `reserved_1yr`, `reserved_3yr`, `spot`

**Azure regions:** ARM region names e.g. `eastus`, `westeurope`, `southeastasia` (use `list_regions` for full list)

**Azure supported services:**

| Domain | Service | Description |
|--------|---------|-------------|
| compute | vm | Virtual Machines — all families, Linux/Windows, on-demand/spot/reserved |
| storage | managed_disks | Premium SSD, Standard SSD, Standard HDD, Ultra Disk |
| storage | blob | Blob Storage |
| database | sql | Azure SQL Database, Azure DB for MySQL/PostgreSQL — vCore tiers, HA, reserved |
| database | cosmos | Cosmos DB — provisioned (per 100 RU/s), serverless, autoscale |
| container | aks | AKS cluster management fee (free tier or $0.10/hr Standard) |
| serverless | azure_functions | Functions Consumption plan — per GB-second + per execution |
| ai | openai | Azure OpenAI — GPT-4o, GPT-4, GPT-3.5-Turbo, o1, o1-mini, embeddings |
| inter_region_egress | — | Outbound data transfer — internet and inter-region, Zone 1 rates, 5 GB/month free |

**GCP pricing terms:** `on_demand` (default), `spot` (preemptible), `cud_1yr`, `cud_3yr`

## Security

OpenCloudCosts can access sensitive billing data when configured with cloud credentials (AWS Cost Explorer, GCP billing, Azure contract pricing). Follow these guidelines to keep that data safe.

**Credential hygiene**
- Use dedicated, least-privilege credentials — read-only access scoped to pricing and billing APIs only. Never use root, owner, or admin credentials.
- AWS: create an IAM user/role with only `ce:GetCostAndUsage`, `pricing:GetProducts`, and `savingsplans:Describe*` permissions.
- Store credentials in `.env` (see `.env.example`) and never commit that file to version control.

**Transport security**
- The default `stdio` transport is safe — the server runs as a local process with no network exposure.
- If you use `--transport http`, never expose it publicly without a reverse proxy and authentication in front of it. Treat it as an internal service.

**MCP client trust**
- Only add this server to MCP client configs you control.
- Avoid running it alongside untrusted third-party MCP servers — a malicious server can craft prompts that cause the LLM to call your billing tools and relay the results.

**What this server can access**
With credentials configured: actual spend, contract/negotiated pricing, reservation and savings plan data. Understand this before granting access in shared or multi-user environments.

**Server instructions**

This is the complete, verbatim `Instructions` string this server sends to MCP clients (from `opencloudcosts-go/internal/server/server.go`), reproduced here so it can be checked without reading source:

```
OpenCloudCosts MCP provides accurate public and effective cloud pricing data. Use it to look up compute, storage, and database pricing on AWS, GCP, and Azure; compare prices across regions and providers; estimate TCO from a Bill of Materials; and calculate unit economics. For effective/bespoke pricing (post-discount), ensure provider credentials are configured. Azure pricing requires no credentials.
```

That's the whole thing: a description of what the tools do and when credentials matter. It contains no directives about the model's behavior, tone, or process, and it never will. We commit to keeping these instructions minimal and strictly pricing-scoped — any future change that adds a "you must...", "always...", or other behavioral directive is a review-blocking change and should be rejected in review unless this section of the README is updated in the same PR to reflect it.

If your MCP client or harness renders instructions from multiple locally-installed servers or plugins adjacent to each other (for example, a separate SessionStart hook from an unrelated plugin), that adjacent output is not produced by this server. Compare what you see against the fenced block above — only that text originates from OpenCloudCosts MCP.

## Recent releases

- **v0.9.1** ✅ GCP egress contract pricing; fix `PricingResult.source` Literal
- **v0.9.2** ✅ Azure OpenAI model matching fix; Azure Functions pricing fix; `list_instance_types` cap; 199-prompt harness suite
- **v1.0.0** ✅ Go rewrite — static binary, dual stdio/HTTP transport, 16 tools, `compare_bom` cross-cloud workload comparison, concurrent region fan-out (32 goroutines), Azure o1-mini SKU fix; **234/234 (100%) LLM grounding harness**
- **v1.0.1** ✅ PyPI package description; CI Trusted Publisher fix; `go install` tag
- **v1.0.2** ✅ README accuracy fixes; cache description updated

