CloudScope MCP
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
> Ask your AI about your cloud bill.
What you get
Ask once: **"Give me this month's cost review"** — and CloudScope runs the full
workflow (spend, deltas, anomalies, idle resources, budgets, forecast) and hands
back a decision-ready report, not raw numbers to interpret yourself:
> ## TL;DR
> Month-to-date Azure spend is **$4,312** (May 1–29), tracking **+11% vs April**.
> The mover is **App Service (+$280)** — a new staging slot left running.
> **2 idle resources cost $94/month**; prod-budget is at **78%** with 2 days left.
> Top action: **delete the orphaned managed disk → save $63/month.**
>
> ## Spend This Month
> | Service | Cost | % |
> |------------------|----------|------|
> | Virtual Machines | $2,140 | 49.6% |
> | App Service | $890 | 20.6% |
> | Storage | $612 | 14.2% |
> | Redis Cache | $410 | 9.5% |
> | Networking | $260 | 6.0% |
>
> ## vs Last Month
> **+$427 (+11%)** overall. App Service **+$280** drove most of it; everything
> else flat. → *new staging-slot-2, created May 12, never torn down.*
>
> ## Idle & Wasted Resources
> | Resource | Type | $/month |
> |-----------------------|-------------|---------|
> | orphaned-osdisk-01 | Managed Disk| $63 |
> | old-lb-ip | Public IP | $31 |
>
> ## Budget Status
> prod-budget — **78% used**, $4,312 / $5,500, on track (2 days left).
>
> ## Recommended Actions
> 1. Delete orphaned-osdisk-01 (unattached 40 days) → **$63/month**
> 2. Tear down staging-slot-2 if staging is idle → **~$280/month**
> 3. Release old-lb-ip (no binding) → **$31/month**
*Illustrative example showing the report format. Run /cloudscope:monthly-cost-review against your own subscription for live numbers.*
Install
| Claude Code | Cursor | VS Code |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| claude mcp add cloudscope -- npx -y cloudscope-mcp | Install | Install |
> Azure is auto-detected from your az login session. GCP requires BigQuery billing export setup (see below).
Supported Providers
| Provider | Status |
| -------- | ------------------------------------------------------------------------------------------------------------ |
| Azure | ✅ Supported |
| GCP | ✅ Supported |
| AWS | Use AWS's official server |
Prerequisites
Azure
- Azure CLI installed and logged in (az login)
- **Cost Management Reader** role on the subscription
GCP
- gcloud CLI installed and logged in (gcloud auth application-default login)
- Billing export to BigQuery enabled — this is a one-time manual setup step, not enabled by default (the detailed export is recommended for resource-level cost queries)
- **BigQuery Data Viewer** + **BigQuery Job User** roles on the dataset project
- Note: BigQuery on-demand queries cost $6.25 per TiB scanned (pricing). The first 1 TiB/month is free. Billing export tables are small — typical CloudScope queries cost
Advanced: Service Principal (CI/CD & automated environments)
| Variable | Description |
| --------------------- | ------------------------------ |
| AZURE_TENANT_ID | Azure AD tenant ID |
| AZURE_CLIENT_ID | App registration client ID |
| AZURE_CLIENT_SECRET | App registration client secret |
Set these alongside AZURE_SUBSCRIPTION_ID in the env block above.
GCP
GCP requires a BigQuery billing export table. Find your table name in **GCP Console > Billing > Billing export > BigQuery export**.
Set GOOGLE_CLOUD_PROJECT to your GCP project ID. Override with GCP_PROJECT_ID if your billing dataset lives in a different project.