Azure FinOps MCP: cost, budgets, forecasting and optimization for Claude, VS Code and Cursor.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
An MCP server that gives LLM clients (Claude Desktop, Claude Code, VS Code, Cursor) conversational access to Azure cost analysis, budget tracking, forecasting, and resource optimization — across multiple subscriptions.
| Tool | Purpose |
|---|---|
list_subscriptions | List allowed subscriptions with friendly names |
| Tool | Purpose |
|---|---|
get_cost_summary | Total cost for a date range (single sub) |
get_cost_by_dimension | Cost breakdown by service / RG / location / meter |
get_cost_by_tag | Cost grouped by tag value (showback/chargeback) |
get_month_to_date_cost | Current-month spend (single sub) |
get_portfolio_month_to_date_cost | Current-month spend across ALL subs |
| Tool | Purpose |
|---|---|
get_budget_status | Budget consumption for a single sub |
get_portfolio_budget_status | Budget status across ALL subs |
| Tool | Purpose |
|---|---|
find_idle_resources | Unattached disks, stranded IPs/NICs, stopped VMs |
find_idle_resources_portfolio | Idle resources across ALL subs |
get_advisor_recommendations | Azure Advisor cost recs with annual savings |
get_vm_utilization | CPU stats to validate rightsizing |
| Tool | Purpose |
|---|---|
forecast_month_end_spend | Predicted month-end cost (single sub) |
forecast_portfolio_month_end_spend | Predicted month-end cost across ALL subs |
Then add it to your MCP client config using the installed command — no cloning needed:
See the Client Configuration section below for per-client config file locations.
az login)The identity running this server (your user, a service principal, or a managed identity) needs three roles assigned on each subscription you want to query:
| Role | Purpose |
|---|---|
| Cost Management Reader | Cost analysis, forecasting, budget queries |
| Reader | Resource inventory via Resource Graph |
| Monitoring Reader | VM utilization metrics via Azure Monitor |
Repeat for each subscription listed in AZURE_ALLOWED_SUBSCRIPTIONS.
Your user already has these roles if you're a subscription Owner or Contributor. If not, ask your Azure admin to assign them.
After deploying with deploy.sh, the script automatically assigns these three roles
to the Container App's system-assigned managed identity on each allowed subscription.
No credentials or secrets are needed — DefaultAzureCredential picks up the
managed identity automatically at runtime.
The Inspector is a web UI that lets you call tools interactively and see raw JSON-RPC messages. Always test here before connecting to Claude Desktop.
In the Inspector UI:
list_subscriptions first (no arguments needed)get_month_to_date_cost (no arguments needed — uses default sub)Find the absolute path to your venv's Python first — you'll need it in every config below:
Edit claude_desktop_config.json:
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
Restart Claude Desktop. A tool icon in the chat input confirms the server connected.
Create .vscode/mcp.json in your workspace (or add to user settings.json under "mcp"):
Requires VS Code 1.99+ with the GitHub Copilot extension. Open the Chat panel,
switch to Agent mode, and the azure-finops tools will appear automatically.
Create or edit ~/.cursor/mcp.json:
Or add it via Cursor Settings → MCP → Add new global MCP server. Restart Cursor. The tools appear in Cursor's Agent/Composer panel.
All clients support connecting to the deployed server over HTTP — no local Python needed:
Claude Desktop / Cursor — add to the same config files above:
VS Code — in .vscode/mcp.json:
Claude Web — Settings → Integrations → Add → https://<your-container-app-fqdn>/mcp
Try these once connected:
costcenter tag."my-analytics-vm actually being used? Check its CPU over 14 days."Narrow tools over flexible tools. The LLM picks among well-named tools far better than it constructs complex query objects. 15 purpose-built tools beats 3 configurable ones.
Subscription allowlist. A frozenset loaded from env. Every tool calls
resolve_subscription() which refuses any ID not in the list. Prevents the
LLM from querying unauthorized subscriptions — important for prompt injection
defense.
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/azure-finops-mcp-server)<a href="https://allmcps.com/mcp/azure-finops-mcp-server"><img src="https://allmcps.com/api/badge/azure-finops-mcp-server?style=directory" alt="Azure FinOps MCP Server on AllMCPs" /></a>