# CloudScope MCP server

> Lets an AI client analyze Azure and GCP cloud spending, detect anomalies, forecast costs, and identify idle resources for optimization.

- Repository: https://github.com/alexpota/cloudscope-mcp
- Page: https://hostedmcp.org/servers/alexpota/cloudscope-mcp
- Transport: stdio
- Stars: 1
- License: MIT
- Latest version: 0.3.3

## Install

### Claude Code

```sh
claude mcp add --env 'AZURE_CLIENT_SECRET=<YOUR_AZURE_CLIENT_SECRET>' --env 'GOOGLE_APPLICATION_CREDENTIALS=<YOUR_GOOGLE_APPLICATION_CREDENTIALS>' cloudscope-mcp -- npx -y cloudscope-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "cloudscope-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cloudscope-mcp"
      ],
      "env": {
        "AZURE_CLIENT_SECRET": "<YOUR_AZURE_CLIENT_SECRET>",
        "GOOGLE_APPLICATION_CREDENTIALS": "<YOUR_GOOGLE_APPLICATION_CREDENTIALS>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "cloudscope-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "cloudscope-mcp"
      ],
      "env": {
        "AZURE_CLIENT_SECRET": "<YOUR_AZURE_CLIENT_SECRET>",
        "GOOGLE_APPLICATION_CREDENTIALS": "<YOUR_GOOGLE_APPLICATION_CREDENTIALS>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"cloudscope-mcp","type":"stdio","command":"npx","args":["-y","cloudscope-mcp"],"env":{"AZURE_CLIENT_SECRET":"<YOUR_AZURE_CLIENT_SECRET>","GOOGLE_APPLICATION_CREDENTIALS":"<YOUR_GOOGLE_APPLICATION_CREDENTIALS>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "cloudscope-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cloudscope-mcp"
      ],
      "env": {
        "AZURE_CLIENT_SECRET": "<YOUR_AZURE_CLIENT_SECRET>",
        "GOOGLE_APPLICATION_CREDENTIALS": "<YOUR_GOOGLE_APPLICATION_CREDENTIALS>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add cloudscope-mcp --env 'AZURE_CLIENT_SECRET=<YOUR_AZURE_CLIENT_SECRET>' --env 'GOOGLE_APPLICATION_CREDENTIALS=<YOUR_GOOGLE_APPLICATION_CREDENTIALS>' -- npx -y cloudscope-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.cloudscope-mcp]
command = "npx"
args = ["-y", "cloudscope-mcp"]

[mcp_servers.cloudscope-mcp.env]
AZURE_CLIENT_SECRET = "<YOUR_AZURE_CLIENT_SECRET>"
GOOGLE_APPLICATION_CREDENTIALS = "<YOUR_GOOGLE_APPLICATION_CREDENTIALS>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'AZURE_CLIENT_SECRET=<YOUR_AZURE_CLIENT_SECRET>' -e 'GOOGLE_APPLICATION_CREDENTIALS=<YOUR_GOOGLE_APPLICATION_CREDENTIALS>' cloudscope-mcp npx -- -y cloudscope-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "cloudscope-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cloudscope-mcp"
      ],
      "env": {
        "AZURE_CLIENT_SECRET": "<YOUR_AZURE_CLIENT_SECRET>",
        "GOOGLE_APPLICATION_CREDENTIALS": "<YOUR_GOOGLE_APPLICATION_CREDENTIALS>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `AZURE_CLIENT_SECRET` | no | yes | Service principal client secret. Optional; required only when using ClientSecretCredential. |
| `GOOGLE_APPLICATION_CREDENTIALS` | no | yes | Path to GCP service account JSON key file. Optional; falls back to Application Default Credentials (gcloud auth). |
| `AZURE_CLIENT_ID` | no | no | Service principal client ID. Optional; required only when using ClientSecretCredential. |
| `AZURE_SUBSCRIPTION_ID` | no | no | Azure subscription ID to query for cost data. Optional; auto-detected from az login session if not set. |
| `AZURE_TENANT_ID` | no | no | Azure tenant ID for service principal authentication. Optional; falls back to DefaultAzureCredential (e.g. az login) if unset. |
| `GCP_BILLING_ACCOUNT_ID` | no | no | GCP billing account ID (format: XXXXXX-XXXXXX-XXXXXX). Optional; needed only for budget monitoring. |
| `GCP_BILLING_TABLE` | no | no | Fully-qualified BigQuery billing export table (project.dataset.table_name). Required for GCP cost queries. |
| `GCP_PROJECT_ID` | no | no | Override GCP project ID if the billing dataset lives in a different project than GOOGLE_CLOUD_PROJECT. |
| `GOOGLE_CLOUD_PROJECT` | no | no | GCP project ID. Recommended to set explicitly in the MCP client env block — may not be inherited from gcloud shell configuration. |

## Tools (15)

- `get_cost_summary`
- `get_cost_by_tag`
- `compare_periods`
- `top_spending_resources`
- `get_cross_subscription_costs`
- `get_cross_project_costs`
- `detect_anomalies`
- `check_budgets`
- `get_cost_forecast`
- `list_recommendations`
- `find_idle_resources`
- `find_untagged_resources`
- `get_current_date`
- `list_subscriptions`
- `list_projects`

## FAQ

### Does this modify my cloud resources?

No, CloudScope is read-only and cannot create, modify, or delete any cloud resources.

### Do I need a service principal for local use?

No, you can use az login for Azure or gcloud auth application-default login for GCP for local environments.

### Does the Azure Cost Management API cost money?

No, the Azure Cost Management API is free to use.
