ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

Azure FinOps MCP Server

โดย raviteja-pegataรุ่น 0.1.1i★ –iรันบนเครื่อง
ชื่อใน registryio.github.raviteja-pegata/azure-finops-mcp

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Azure FinOps MCP: cost, budgets, forecasting and optimization for Claude, VS Code and Cursor.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: เครื่องมือนักพัฒนา
  • ต้องใส่ค่าเหล่านี้: AZURE_ALLOWED_SUBSCRIPTIONS, AZURE_DEFAULT_SUBSCRIPTION

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

  • ผลตรวจเบื้องต้น: ผ่าน 1 จาก 1 ข้อ
  • รันในเครื่องคุณด้วยสิทธิ์ของผู้ใช้คุณ (ไฟล์ อินเทอร์เน็ต แอปต่าง ๆ)
  • ค่าที่คุณต้องใส่เอง: AZURE_ALLOWED_SUBSCRIPTIONS, AZURE_DEFAULT_SUBSCRIPTION, FINOPS_CACHE_TTL_SECONDS

ต้องเตรียมก่อน

  • PyPIติดตั้ง uv ของ Python (มีคำสั่ง uvx) ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "azure-finops": {
      "command": "uvx",
      "args": [
        "azure-finops-mcp"
      ],
      "env": {
        "AZURE_ALLOWED_SUBSCRIPTIONS": "ใส่ค่าของคุณ",
        "AZURE_DEFAULT_SUBSCRIPTION": "ใส่ค่าของคุณ",
        "FINOPS_CACHE_TTL_SECONDS": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add azure-finops --env AZURE_ALLOWED_SUBSCRIPTIONS='ใส่ค่าของคุณ' --env AZURE_DEFAULT_SUBSCRIPTION='ใส่ค่าของคุณ' --env FINOPS_CACHE_TTL_SECONDS='ใส่ค่าของคุณ' -- uvx azure-finops-mcp

เติมค่าที่เว้นว่างไว้ก่อนรัน

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "azure-finops": {
      "command": "uvx",
      "args": [
        "azure-finops-mcp"
      ],
      "env": {
        "AZURE_ALLOWED_SUBSCRIPTIONS": "ใส่ค่าของคุณ",
        "AZURE_DEFAULT_SUBSCRIPTION": "ใส่ค่าของคุณ",
        "FINOPS_CACHE_TTL_SECONDS": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "azure-finops": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "azure-finops-mcp"
      ],
      "env": {
        "AZURE_ALLOWED_SUBSCRIPTIONS": "ใส่ค่าของคุณ",
        "AZURE_DEFAULT_SUBSCRIPTION": "ใส่ค่าของคุณ",
        "FINOPS_CACHE_TTL_SECONDS": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

  • AZURE_ALLOWED_SUBSCRIPTIONS จำเป็น env
    Comma-separated list of Azure subscription IDs this server may query
  • AZURE_DEFAULT_SUBSCRIPTION จำเป็น env
    Default subscription ID used when none is specified in a query (must be in AZURE_ALLOWED_SUBSCRIPTIONS)
  • FINOPS_CACHE_TTL_SECONDS env
    TTL for cost query cache in seconds (default: 900)

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 8 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub raviteja-pegata ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด เครื่องมือนักพัฒนาi

  • ดาวมากกว่า 0% ของอีก 5550 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 15% ของอีก 5550 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 5550 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Azure FinOps MCP Server ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

ต้องใส่ค่าเหล่านี้: AZURE_ALLOWED_SUBSCRIPTIONS, AZURE_DEFAULT_SUBSCRIPTION

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.1.1) เข้า registry 6 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี GitHub, Desktop Commander, Cloudflare MCP

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

GitHub

server ทางการของ GitHub ให้ AI อ่านและจัดการโค้ด issue และ pull request ในบัญชีของคุณได้ ใช้ผ่านคลาวด์ของ GitHub หรือรันในเครื่องด้วย Docker ก็ได้

โดย githubใช้กันมาก★ 34.2Kอัปเดต 5 วันที่ผ่านมา

บนเครื่องหรือคลาวด์

Desktop Commander

MCP server for terminal commands, file operations, and process management

โดย wonderwhy-erใช้กันมาก↓ 709.6K/สัปดาห์★ 10.2Kอัปเดต 17 วันที่ผ่านมา

รันบนเครื่อง

Cloudflare MCP

Cloudflare MCP servers

โดย cloudflareใช้กันมาก★ 4.4Kอัปเดต 14 เดือนที่ผ่านมา

รันบนคลาวด์✓ mcp.cloudflare.com

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

Azure FinOps MCP Server

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.

Tools

Discovery
ToolPurpose
list_subscriptionsList allowed subscriptions with friendly names
Cost Analysis
ToolPurpose
get_cost_summaryTotal cost for a date range (single sub)
get_cost_by_dimensionCost breakdown by service / RG / location / meter
get_cost_by_tagCost grouped by tag value (showback/chargeback)
get_month_to_date_costCurrent-month spend (single sub)
get_portfolio_month_to_date_costCurrent-month spend across ALL subs
Budgets
ToolPurpose
get_budget_statusBudget consumption for a single sub
get_portfolio_budget_statusBudget status across ALL subs
Optimization
ToolPurpose
find_idle_resourcesUnattached disks, stranded IPs/NICs, stopped VMs
find_idle_resources_portfolioIdle resources across ALL subs
get_advisor_recommendationsAzure Advisor cost recs with annual savings
get_vm_utilizationCPU stats to validate rightsizing
Forecasting
ToolPurpose
forecast_month_end_spendPredicted month-end cost (single sub)
forecast_portfolio_month_end_spendPredicted month-end cost across ALL subs

Quick Install

pip install azure-finops-mcp

Then add it to your MCP client config using the installed command — no cloning needed:

{

"mcpServers": { "azure-finops": { "command": "azure-finops-mcp", "env": { "AZURE_ALLOWED_SUBSCRIPTIONS": "sub-id-1,sub-id-2", "AZURE_DEFAULT_SUBSCRIPTION": "sub-id-1" } } } }

See the Client Configuration section below for per-client config file locations.


Prerequisites

  • Python 3.11+
  • Azure CLI installed and logged in (az login)

Azure RBAC Permissions

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:

RolePurpose
Cost Management ReaderCost analysis, forecasting, budget queries
ReaderResource inventory via Resource Graph
Monitoring ReaderVM utilization metrics via Azure Monitor
Assign via Azure CLI
SUBSCRIPTION_ID="<your-subscription-id>"

PRINCIPAL_ID=" "

for ROLE in "Cost Management Reader" "Reader" "Monitoring Reader"; do az role assignment create \ --assignee "$PRINCIPAL_ID" \ --role "$ROLE" \ --scope "/subscriptions/$SUBSCRIPTION_ID" done

Repeat for each subscription listed in AZURE_ALLOWED_SUBSCRIPTIONS.

Local development (your own user)
az login

az account set --subscription " "

Check your object ID

az ad signed-in-user show --query id -o tsv

Your user already has these roles if you're a subscription Owner or Contributor. If not, ask your Azure admin to assign them.

Managed Identity (Container Apps deployment)

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.

Install

git clone <your-repo-url> azure-finops-mcp

cd azure-finops-mcp

python3 -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate pip install -e .

cp .env.example .env

Edit .env: set your subscription IDs

Configure .env

# Required: comma-separated subscription IDs the server may query

AZURE_ALLOWED_SUBSCRIPTIONS=sub-id-1,sub-id-2,sub-id-3

Required: default subscription (must be in the list above)

AZURE_DEFAULT_SUBSCRIPTION=sub-id-1

Test with MCP Inspector

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.

# Use the venv's python3 explicitly — the Inspector launches a subprocess

and needs the binary that has mcp + azure SDKs installed.

npx @modelcontextprotocol/inspector $(which python3) -m azure_finops_mcp.server

In the Inspector UI:

  1. Verify Transport Type is STDIO
  2. Click Connect — should succeed and show "azure-finops" as the server name
  3. Navigate to Tools, click List Tools — you should see all 15 tools
  4. Try list_subscriptions first (no arguments needed)
  5. Try get_month_to_date_cost (no arguments needed — uses default sub)

Client Configuration

Find the absolute path to your venv's Python first — you'll need it in every config below:

# With your venv activated:

which python3

e.g. /Users/yourname/azure-finops-mcp/.venv/bin/python3


Claude Desktop

Edit claude_desktop_config.json:

OSPath
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json
Linux~/.config/Claude/claude_desktop_config.json
{

"mcpServers": { "azure-finops": { "command": "/absolute/path/to/.venv/bin/python3", "args": ["-m", "azure_finops_mcp.server"], "env": { "AZURE_ALLOWED_SUBSCRIPTIONS": "sub-1,sub-2,sub-3", "AZURE_DEFAULT_SUBSCRIPTION": "sub-1", "FINOPS_CACHE_TTL_SECONDS": "900" } } } }

Restart Claude Desktop. A tool icon in the chat input confirms the server connected.


VS Code (GitHub Copilot / Agent mode)

Create .vscode/mcp.json in your workspace (or add to user settings.json under "mcp"):

{

"servers": { "azure-finops": { "type": "stdio", "command": "/absolute/path/to/.venv/bin/python3", "args": ["-m", "azure_finops_mcp.server"], "env": { "AZURE_ALLOWED_SUBSCRIPTIONS": "sub-1,sub-2,sub-3", "AZURE_DEFAULT_SUBSCRIPTION": "sub-1", "FINOPS_CACHE_TTL_SECONDS": "900" } } } }

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.


Cursor

Create or edit ~/.cursor/mcp.json:

{

"mcpServers": { "azure-finops": { "command": "/absolute/path/to/.venv/bin/python3", "args": ["-m", "azure_finops_mcp.server"], "env": { "AZURE_ALLOWED_SUBSCRIPTIONS": "sub-1,sub-2,sub-3", "AZURE_DEFAULT_SUBSCRIPTION": "sub-1", "FINOPS_CACHE_TTL_SECONDS": "900" } } } }

Or add it via Cursor Settings → MCP → Add new global MCP server. Restart Cursor. The tools appear in Cursor's Agent/Composer panel.


Claude Code (CLI)
claude mcp add azure-finops \

/absolute/path/to/.venv/bin/python3 \ -m azure_finops_mcp.server \ -e AZURE_ALLOWED_SUBSCRIPTIONS=sub-1,sub-2,sub-3 \ -e AZURE_DEFAULT_SUBSCRIPTION=sub-1


Remote HTTP (after deploying to Azure Container Apps)

All clients support connecting to the deployed server over HTTP — no local Python needed:

Claude Desktop / Cursor — add to the same config files above:

{

"mcpServers": { "azure-finops": { "type": "http", "url": "https:// /mcp" } } }

VS Code — in .vscode/mcp.json:

{

"servers": { "azure-finops": { "type": "http", "url": "https:// /mcp" } } }

Claude Web — Settings → Integrations → Add → https:// /mcp

Example Prompts

Try these once connected:

  • "What are our allowed subscriptions?"
  • "What's our total month-to-date spend across all subscriptions?"
  • "Which 10 services cost the most on our prod subscription last month?"
  • "Break down last quarter's spend by the costcenter tag."
  • "Are any budgets close to breaching?"
  • "Show me idle resources across all our subscriptions."
  • "What does Azure Advisor recommend for cost savings?"
  • "Is VM my-analytics-vm actually being used? Check its CPU over 14 days."
  • "Compare our forecast for this month against our budgets."

Architecture

Claude Desktop ◄─┐

VS Code ◄─┤ Cursor ◄─┼──stdio / HTTP──► Azure FinOps MCP Server ◄──REST──► Azure APIs Claude Code ◄─┤ │ Claude Web ◄─┘ ├── config.py ← env + allowlist ├── azure_clients.py ← shared credential ├── cache.py ← TTL cache ├── server.py ← FastMCP + registration └── tools/ ├── subscriptions ← discovery ├── cost ← queries + portfolio ├── budgets ← budget status ├── optimization ← idle + advisor + metrics └── forecast ← predictions

Key design decisions

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.

Portfolio tools catch per-sub errors. When querying 5+ subscriptions, one might have different RBAC or be in a weird state. Portfolio tools (get_portfolio_*) wrap each sub in try/except so partial results are returned with errors listed separately.

Cache on Cost Management only. Cost queries are expensive and rate-limited (~30 req/min per tenant). Cost data updates hourly at best. Default 15-minute TTL trades almost nothing in freshness for significant rate-limit headroom. Resource Graph and Advisor are fast and cheap — no caching needed.

Structured returns, not prose. Tools return dicts with columns/rows/metadata. The LLM narrates them naturally. This avoids encoding English into tool responses (which makes them brittle to prompt changes).

Deploying to Azure (Remote Mode)

For team-wide access, deploy as a remote HTTP server:

  1. Transport swap in server.py:
   mcp.run(transport="streamable-http", host="0.0.0.0", port=8000)
  1. Dockerfile:
   FROM python:3.12-slim

WORKDIR /app COPY . . RUN pip install --no-cache-dir -e . CMD ["azure-finops-mcp"]

  1. Deploy to Azure Container Apps with a user-assigned managed identity.
  1. Grant RBAC to the managed identity (same 3 roles: Cost Management Reader, Reader, Monitoring Reader) on each subscription.
  1. Add auth via APIM or Azure Front Door + Entra ID. MCP supports OAuth for remote servers.
  1. DefaultAzureCredential picks up the managed identity automatically — no code changes needed.

Troubleshooting

ProblemFix
DefaultAzureCredential auth errorsRun az login and verify with az account show
429 throttling on Cost ManagementIncrease FINOPS_CACHE_TTL_SECONDS
Empty budget listBudgets must exist in the portal — the API doesn't create them
find_idle_resources errorsYou need Reader RBAC at subscription scope

| Inspector "Connection Error" | Use absolute path to venv's python3 in Command f

ตัดมาแค่ช่วงต้น อ่านต่อใน repo

ถาม PopNx