Azure Pricing MCP Server

Azure Pricing MCP Server

Provides AI assistants with real-time access to Azure retail pricing information, enabling price searches, regional cost comparisons, monthly bill estimates, and SKU discovery through natural language queries.

Category
Visit Server

README

Azure Pricing MCP Server 💰

Python 3.10+ MCP License: MIT

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.

<p align="center"> <img src="https://img.shields.io/badge/Azure-Pricing-0078D4?style=for-the-badge&logo=microsoft-azure&logoColor=white" alt="Azure Pricing"/> <img src="https://img.shields.io/badge/VS_Code-MCP-007ACC?style=for-the-badge&logo=visual-studio-code&logoColor=white" alt="VS Code MCP"/> </p>


🚀 Quick Start

# 1. Clone the repository
git clone https://github.com/msftnadavbh/AzurePricingMCP.git
cd azure-pricing-mcp

# 2. Set up virtual environment
python -m venv .venv
source .venv/bin/activate  # Linux/Mac
# .venv\Scripts\activate   # Windows

# 3. Install dependencies
pip install -r requirements.txt

# 4. Test the server
python -m azure_pricing_server

Then configure your AI assistant (VS Code, Claude Desktop, etc.) to use the MCP server.


✨ Features

Feature Description
🔍 Price Search Search Azure prices with filters (service, region, SKU, price type)
⚖️ Price Comparison Compare costs across regions or between different SKUs
💡 Cost Estimation Calculate monthly/yearly costs based on usage hours
💰 Savings Plans View 1-year and 3-year savings plan pricing
🎯 Smart SKU Discovery Fuzzy matching for service names ("vm" → "Virtual Machines")
🌍 Multi-Currency Support for USD, EUR, GBP, and more
📊 Real-time Data Live data from Azure Retail Prices API
🏷️ Customer Discounts Apply discount percentages to all pricing queries

🛠️ Available Tools

Tool Description
azure_price_search Search Azure retail prices with flexible filtering
azure_price_compare Compare prices across regions or SKUs
azure_cost_estimate Estimate costs based on usage patterns
azure_discover_skus List available SKUs for a specific service
azure_sku_discovery Intelligent SKU discovery with fuzzy name matching
get_customer_discount Get customer discount information

📋 Installation

Prerequisites

  • Python 3.10+
  • pip (Python package manager)

Option 1: Automated Setup

# Windows PowerShell
.\setup.ps1

# Linux/Mac/Cross-platform
python setup.py

Option 2: Manual Setup

# Clone repository
git clone https://github.com/msftnadavbh/AzurePricingMCP.git
cd azure-pricing-mcp

# Create virtual environment
python -m venv .venv

# Activate virtual environment
source .venv/bin/activate    # Linux/Mac
.venv\Scripts\activate       # Windows

# Install dependencies
pip install -r requirements.txt

Dependencies

mcp>=1.0.0
aiohttp>=3.9.0
pydantic>=2.0.0
requests>=2.31.0

🖥️ VS Code Integration

Step 1: Install GitHub Copilot

Ensure you have the GitHub Copilot extension installed.

Step 2: Configure MCP Server

Create or edit .vscode/mcp.json in your workspace:

{
  "servers": {
    "azure-pricing": {
      "type": "stdio",
      "command": "/absolute/path/to/azure-pricing-mcp/.venv/bin/python",
      "args": ["-m", "azure_pricing_server"]
    }
  }
}

Windows users: Use the full path with forward slashes or escaped backslashes:

"command": "C:/path/to/azure-pricing-mcp/.venv/Scripts/python.exe"

Step 3: Restart MCP Server

  1. Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  2. Run: MCP: List Servers
  3. Click the refresh/restart button next to azure-pricing

Step 4: Use in Copilot Chat

Open Copilot Chat and ask:

What's the price of Standard_D32s_v6 in East US 2?

You'll see the MCP tools being invoked with real Azure pricing data!


🤖 Claude Desktop Integration

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "azure-pricing": {
      "command": "python",
      "args": ["-m", "azure_pricing_server"],
      "cwd": "/path/to/azure-pricing-mcp"
    }
  }
}

💬 Example Queries

Once configured, ask your AI assistant:

Query Type Example
Basic Pricing "What's the price of a D4s_v3 VM in West US 2?"
Multi-Node "Price for 20 Standard_D32s_v6 nodes in East US 2"
Comparison "Compare VM prices between East US and West Europe"
Cost Estimate "Estimate monthly cost for D8s_v5 running 12 hours/day"
SKU Discovery "What App Service plans are available?"
Savings Plans "Show savings plan options for virtual machines"
Storage "What are the blob storage pricing tiers?"

Sample Response

Standard_D32s_v6 in East US 2:
- Linux On-Demand: $1.613/hour → $23,550/month for 20 nodes
- 1-Year Savings:  $1.113/hour → $16,250/month (31% savings)
- 3-Year Savings:  $0.742/hour → $10,833/month (54% savings)

🧪 Testing

Verify Installation

# Run the server directly (should start without errors)
python -m azure_pricing_server

# Run tests
python test_mcp_server.py

Test MCP Connection in VS Code

  1. Open Command Palette → MCP: List Servers
  2. Verify azure-pricing shows 6 tools
  3. Open Copilot Chat and ask a pricing question

🤝 Contributing

We welcome contributions! Here's how to get started:

Development Setup

# Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/azure-pricing-mcp.git
cd azure-pricing-mcp

# Create development environment
python -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Make your changes
# ...

# Test your changes
python test_mcp_server.py

Contribution Guidelines

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

Code Style

  • Follow PEP 8 guidelines
  • Add type hints for function parameters and return values
  • Include docstrings for public functions
  • Test your changes before submitting

Ideas for Contributions

  • [ ] Add support for Azure Reserved Instances pricing
  • [ ] Implement caching for frequently requested prices
  • [ ] Add more currency support
  • [ ] Create unit tests for all tools
  • [ ] Add support for Azure Government/China regions
  • [ ] Implement price alerts/notifications

📁 Project Structure

azure-pricing-mcp/
├── azure_pricing_server.py   # Main MCP server implementation
├── __init__.py               # Package initialization
├── __main__.py               # Module entry point
├── requirements.txt          # Python dependencies
├── setup.py                  # Automated setup script
├── setup.ps1                 # PowerShell setup script
├── test_mcp_server.py        # Test suite
├── README.md                 # This file
├── QUICK_START.md            # Quick start guide
├── USAGE_EXAMPLES.md         # Detailed usage examples
├── config_examples.json      # Example configurations
└── .vscode/
    └── mcp.json              # VS Code MCP configuration

🔌 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.


📚 Additional Documentation


⚠️ Troubleshooting

Tools not appearing in VS Code

  1. Check Python syntax: Ensure no syntax errors in azure_pricing_server.py
  2. Verify path: Use absolute paths in .vscode/mcp.json
  3. Restart server: Command Palette → MCP: List Servers → Restart

"No module named 'mcp'"

# Ensure you're in the virtual environment
source .venv/bin/activate
pip install mcp>=1.0.0

Connection errors

  • Check your internet connection
  • The Azure Pricing API may rate-limit requests (automatic retry is built-in)

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


🙏 Acknowledgments


📬 Support


<p align="center"> Made with ❤️ for the Azure community </p>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured