Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>PricingCalculator MCP Server for Microsoft AzureNew to Visual Studio Code? Get it now.
PricingCalculator MCP Server for Microsoft Azure

PricingCalculator MCP Server for Microsoft Azure

Michel Perfetti

|
1 install
| (0) | Free
Model Context Protocol server for querying Microsoft Azure pricing and estimating Terraform infrastructure costs
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PricingCalculator MCP Server for Microsoft Azure

A Model Context Protocol (MCP) server for querying Microsoft Azure pricing and estimating Terraform infrastructure costs.

Quick Start

See Getting Started Guide for detailed installation.

Features

  • 🔍 Search Azure Pricing - Query Microsoft Azure Retail Prices API for any service
  • 💰 Calculate Costs - Estimate costs with time period conversions (hour/day/month/year)
  • 🔎 Service Discovery - Auto-discover available SKUs for 6 service categories
  • 📊 Terraform Estimation - Estimate complete Terraform plan costs
  • 🎯 54 Resource Types - Support for all major Microsoft Azure services via Terraform

Supported Resources (54 types - 100% coverage)

High-Priority Services:

  • ⭐⭐⭐⭐⭐ Virtual Machines (Linux, Windows, AKS)
  • ⭐⭐⭐⭐⭐ Functions (Consumption, Premium)
  • ⭐⭐⭐⭐ Event Hubs, Service Bus, Event Grid
  • ⭐⭐⭐⭐ Container Registry, Container Instances, Container Apps
  • ⭐⭐⭐⭐ Application Gateway, Firewall, Load Balancer, VPN Gateway
  • ⭐⭐⭐⭐ Databases (MySQL, PostgreSQL, SQL, Cosmos DB, Redis, MariaDB, SQL MI)
  • ⭐⭐⭐ Storage, NetApp Files, Backup
  • ⭐⭐⭐ Analytics (Data Factory, Databricks, Synapse, HDInsight)
  • ⭐⭐ API Management, Logic Apps, Spring Apps
  • ⭐⭐ Monitoring, Site Recovery, Maps

View all 54 supported resources →

New: Discovery Tools (6 specialized + 1 generic)

Explore Microsoft Azure services before deployment:

  1. discoverVmOptions - Find VMs by series/OS with specs
  2. discoverStorageOptions - Compare storage tiers & redundancy
  3. discoverDatabaseOptions - Explore database SKUs by type/tier
  4. discoverComputeOptions - Functions, App Service, Containers
  5. discoverMessagingOptions - Event Hubs, Service Bus, Event Grid
  6. discoverNetworkingOptions - App Gateway, Firewall, Load Balancer, VPN
  7. discoverGenericOptions - Fallback for any Microsoft Azure service

Installation

Option 1: VS Code Extension (Recommended)

Install the miiitchdev.pricingcalc-azure-mcp extension from the VS Code Marketplace:

code --install-extension miiitchdev.pricingcalc-azure-mcp

Or download from GitHub Releases and install manually.

Option 2: Manual MCP Server Setup

npm run mcp:build

The server communicates via stdio and can be integrated with MCP clients like GitHub Copilot.

Integration with VS Code / GitHub Copilot

Step 1: Configure MCP Server

Add the server to your VS Code settings (settings.json):

{
  "github.copilot.chat.mcp.servers": {
    "azure-pricing": {
      "command": "node",
      "args": ["/absolute/path/to/azurepricing.mcp/dist/mcp/server.js"]
    }
  }
}

Replace /absolute/path/to/azurepricing.mcp with the actual path to this project.

Step 2: Verify Setup

  1. Open VS Code with this repository
  2. Open Copilot Chat (Cmd/Ctrl + I)
  3. Look for "azure-pricing" in the list
  4. Ask: "@azure-pricing show me d-series vms in eastus"

Available MCP Tools (14 total)

Core Tools (7)

1. searchPrices

Search for Microsoft Azure retail prices with filters.

Parameters:

  • serviceName (string): Microsoft Azure service name (e.g., "Virtual Machines", "Storage")
  • armRegionName (string): Azure region (e.g., "eastus", "westeurope")
  • armSkuName (string): SKU name (e.g., "Standard_D2s_v3")
  • productName (string): Product name pattern
  • unitOfMeasure (string): Unit (e.g., "1 Hour", "1 GB/Month")
  • limit (number): Max results (default: 10)

Example:

@azure-pricing search prices for Virtual Machines in eastus with SKU Standard_D2s_v3

3. calculateCost

Calculate cost for a specific Azure service.

Parameters:

  • serviceName (string, required): Service name
  • armRegionName (string, required): Region
  • armSkuName (string): SKU name
  • quantity (number, required): Quantity (e.g., number of VMs, GB)
  • period (string): Time period - "hour", "day", "month" (default), "year"

Example:

@azure-pricing calculate cost for 2 VMs with Standard_D2s_v3 in eastus for 1 month

4. discoverVmOptions

Discover available VM SKUs with pricing in a region. Helps explore VM options before deployment.

Parameters:

  • armRegionName (string, required): Azure region (e.g., "eastus", "westeurope")
  • osType (string, required): Operating system - "Linux" or "Windows"
  • seriesFilter (string, optional): VM series filter (e.g., "d", "e", "f" for D/E/F-series)
  • limit (number, optional): Maximum results (default: 20)

Note: The osType parameter ensures accurate pricing comparisons by preventing mixing of Linux and Windows VM pricing. Spot VMs are automatically excluded.

Example:

@azure-pricing show me available D-series Linux VMs in East US

See VM Discovery Documentation for detailed usage examples.

5. estimateTerraformCost

Estimate total cost for a Terraform plan (resources to be created/updated).

Parameters:

  • planJson (string, required): Terraform plan JSON (from terraform show -json tfplan)
  • period (string): Time period - "hour", "day", "month" (default), "year"

Example:

# Generate plan and estimate
terraform plan -out=tfplan
terraform show -json tfplan > plan.json

# Use with MCP
@azure-pricing estimate cost for my terraform plan

6. estimateTerraformState

Parameters:

  • stateJson (string, required): Terraform state JSON (from terraform show -json or .tfstate file)
  • period (string): Time period - "hour", "day", "month" (default), "year"

Example:

# Get current state cost
terraform show -json > state.json

# Use with MCP
@azure-pricing estimate cost for my current terraform state

Use Cases:

  • Audit current infrastructure costs
  • Track spending over time
  • Compare environments (dev vs prod)

7. compareTerraformCosts

Parameters:

  • stateJson (string, required): Current Terraform state JSON
  • planJson (string, required): Terraform plan JSON with changes
  • period (string): Time period - "hour", "day", "month" (default), "year"

Example:

# Generate both state and plan
terraform show -json > state.json
terraform plan -out=tfplan
terraform show -json tfplan > plan.json

# Compare costs
@azure-pricing compare costs between my state and plan

Output:

  • Current state cost
  • After changes cost
  • Delta ($ and %)
  • Impact indicator (increase/decrease/no change)

Use Cases:

  • Review cost impact before applying changes
  • Infrastructure change approval process
  • Budget planning and forecasting

8. listSupportedResources

List all 54 supported Terraform resource types.

Example:

@azure-pricing what terraform resources are supported?

Discovery Tools (6)

9. discoverStorageOptions

Explore storage SKUs with filtering.

Parameters:

  • armRegionName (required): Azure region
  • storageType (optional): blob, file, queue, table, datalake
  • performanceTier (optional): Standard, Premium
  • redundancyFilter (optional): LRS, GRS, ZRS, GZRS
  • limit (optional): Max results (default: 20)

10. discoverDatabaseOptions

Explore database SKUs by type and tier.

Parameters:

  • armRegionName (required): Azure region
  • databaseType (required): mysql, postgresql, sql, cosmosdb, redis, mariadb, sqlmi, cassandra
  • tier (optional): Basic, GeneralPurpose, BusinessCritical
  • generation (optional): Gen4, Gen5
  • limit (optional): Max results (default: 20)

8. discoverComputeOptions

Explore Functions, App Service, Container options.

Parameters:

  • armRegionName (required): Azure region
  • computeType (required): functions, appservice, containerinstances, containerapps
  • tier (optional): Basic, Standard, Premium
  • osType (optional): Linux, Windows
  • limit (optional): Max results (default: 20)

9. discoverMessagingOptions

Explore Event Hubs, Service Bus, Event Grid SKUs.

Parameters:

  • armRegionName (required): Azure region
  • messagingType (required): eventhub, servicebus, eventgrid
  • tier (optional): Basic, Standard, Premium
  • limit (optional): Max results (default: 20)

10. discoverNetworkingOptions

Explore networking service SKUs.

Parameters:

  • armRegionName (required): Azure region
  • networkingType (required): applicationgateway, firewall, loadbalancer, vpn
  • tier (optional): Basic, Standard, Premium, WAF
  • limit (optional): Max results (default: 20)

11. discoverGenericOptions

Fallback discovery for any Azure service.

Parameters:

  • serviceName (required): Exact Azure service name
  • armRegionName (required): Azure region
  • productFilter (optional): Filter by product pattern
  • skuFilter (optional): Filter by SKU pattern
  • unitOfMeasure (optional): Filter by unit
  • limit (optional): Max results (default: 20)

Example:

@azure-pricing show me Azure Data Factory v2 options in eastus

Unit of Measure Handling

The server automatically handles different Azure pricing units:

  • Time-based (1 Hour): VMs, databases → multiply by hours in period
  • Storage (1 GB/Month): Storage accounts → quantity is GB capacity
  • Data Transfer (1 GB): Network egress → quantity is GB transferred
  • Static (1/Month): Public IPs → flat monthly rate
  • Transactions (100 Transactions): Storage operations

Documentation

  • Implementation Details - Technical summary and architecture decisions
  • Time Period Handling - Detailed explanation of time calculations (730 hours/month)
  • VM Discovery - How to discover and compare VM options
  • Resource Type Handling - How different Azure resources are handled
  • Resource Workflows - Visual workflows for all resource types
  • Other Resources Status - Quick reference for non-VM resources

Key Concepts

Time Period Calculations

The server uses Azure's standard calculation:

  • 1 month = 730 hours (365 days × 24 hours ÷ 12 months)
  • 1 year = 8,760 hours (365 days × 24 hours)
  • All calculations assume 24/7 operation unless specified

See Time Period Handling for formulas and examples.

Pricing Type

All estimates use Consumption pricing (pay-as-you-go). Reserved Instances and Spot pricing are not included.

Error Handling

  • Unsupported Terraform resources are reported but don't fail estimation
  • Missing pricing data returns null for specific resources
  • All errors include descriptive messages

API Reference

Azure Retail Prices API

Base URL: https://prices.azure.com/api/retail/prices

API Version: 2023-01-01-preview

OData Filters Supported:

  • serviceName eq 'Virtual Machines'
  • armRegionName eq 'eastus'
  • armSkuName eq 'Standard_D2s_v3'
  • contains(productName, 'Linux')
  • type eq 'Consumption'

License

MIT

Links

  • Azure Retail Prices API Documentation
  • Model Context Protocol
  • Terraform JSON Output

Legal Notice

Microsoft, Azure, Terraform, and GitHub are trademarks of their respective owners.

This is an independent open-source project and is not affiliated with, endorsed by, or sponsored by Microsoft Corporation, HashiCorp, Inc., or GitHub, Inc.

This tool is designed to work with Microsoft Azure services and the Terraform infrastructure-as-code tool.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft