Skip to content

An MCP server for Microsoft Azure pricing that goes beyond the Azure Pricing Calculator, with programmatic cost estimates plus FinOps features like Spot price and savings analysis, and detection of orphaned or underutilized resources.

License

Notifications You must be signed in to change notification settings

msftnadavbh/AzurePricingMCP

Repository files navigation

Azure Pricing MCP Server 💰

Python 3.10+ MCP License: MIT Tests

A Model Context Protocol (MCP) server that provides AI assistants with real-time access to Azure retail pricing information. Query VM prices, compare costs across regions, estimate monthly bills, and discover available SKUs—all through natural language.

Azure Pricing VS Code MCP


🚀 Quick Start

# Clone and setup
git clone https://github.com/msftnadavbh/AzurePricingMCP.git
cd AzurePricingMCP
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt

# Test the server
python -m azure_pricing_mcp

Then configure your AI assistant. See Integrations.


✨ Features

  • Price Search - Query Azure prices with flexible filters
  • Price Comparison - Compare costs across regions or SKUs
  • Cost Estimation - Calculate monthly/yearly costs
  • Reserved Instances - Compare RI pricing with break-even analysis
  • Region Recommendations - Find the cheapest regions for any SKU
  • SKU Discovery - Fuzzy matching for service names
  • Retirement Warnings - Alerts for retiring VM SKUs
  • Spot VM Intelligence - Eviction rates and price history (requires Azure auth)
  • Orphaned Resources - Detect unused resources with real cost calculation (requires Azure auth)

📖 Full feature details →


🛠️ Tools

12 tools available for AI assistants:

  • azure_price_search - Search retail prices
  • azure_price_compare - Compare across regions/SKUs
  • azure_ri_pricing - Reserved Instance pricing
  • azure_cost_estimate - Usage-based cost estimation
  • azure_region_recommend - Find cheapest regions
  • azure_discover_skus / azure_sku_discovery - SKU lookup
  • spot_eviction_rates / spot_price_history / simulate_eviction - Spot VM tools
  • find_orphaned_resources - Detect orphaned resources with cost analysis

📖 Tool documentation →


📋 Installation

Docker (Easiest):

docker build -t azure-pricing-mcp .
docker run -i azure-pricing-mcp

Python:

pip install -r requirements.txt

📖 Full installation guide →


🔌 Integrations

Works with any MCP-compatible AI assistant:

  • VS Code with GitHub Copilot
  • Claude Desktop

📖 Integration setup →


📁 Project Structure

AzurePricingMCP/
├── src/azure_pricing_mcp/    # Main package
│   ├── server.py             # MCP server
│   ├── handlers.py           # Tool handlers
│   ├── client.py             # Azure API client
│   └── services/             # Business logic
├── tests/                    # Test suite
├── docs/                     # Documentation
└── scripts/                  # Setup scripts

📖 Detailed structure →


🔌 API Reference

This server uses the Azure Retail Prices API:

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

No authentication required - The Azure Retail Prices API is publicly accessible.


🤝 Contributing

We welcome contributions!

Quick Start

git clone https://github.com/YOUR_USERNAME/AzurePricingMCP.git
cd AzurePricingMCP
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/

Guidelines

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Style

  • Follow PEP 8
  • Add type hints
  • Include docstrings
  • Run black, ruff, and mypy before submitting

📖 Full contribution guide →


📚 Documentation

Document Description
INSTALL.md Installation guide
docs/FEATURES.md Feature details
docs/TOOLS.md Tool documentation
docs/INTEGRATIONS.md VS Code & Claude setup
docs/USAGE_EXAMPLES.md Detailed examples
docs/ORPHANED_RESOURCES.md Orphaned resources guide
CHANGELOG.md Version history

📄 License

MIT License - see LICENSE for details.


🙏 Acknowledgments


📬 Support


Made with ❤️ for the Azure community

About

An MCP server for Microsoft Azure pricing that goes beyond the Azure Pricing Calculator, with programmatic cost estimates plus FinOps features like Spot price and savings analysis, and detection of orphaned or underutilized resources.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •