@jadenrazo/cloudcost-mcp 0.5.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +112 -0
- package/MIGRATION.md +40 -0
- package/STABILITY.md +71 -0
- package/package.json +11 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [1.0.0] - 2026-04-15
|
|
8
|
+
|
|
9
|
+
First stable release. No breaking API changes from 0.5 — this version ratifies the existing surface as SemVer-locked. See [`MIGRATION.md`](./MIGRATION.md) for details.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **`STABILITY.md`**: Formal stability contract defining the SemVer-locked public surface (11 MCP tools, CLI binaries, package entry points) and the change-classification policy.
|
|
13
|
+
- **`MIGRATION.md`**: 0.x → 1.0 migration guide and forward-looking support policy.
|
|
14
|
+
- **Smoke integration tests**: Live-API smoke coverage for AWS Bulk Pricing, Azure Retail Prices, and GCP Cloud Billing Catalog, gated behind `RUN_INTEGRATION=1`. New `integration-smoke` CI job runs on manual dispatch and weekly schedule (Mondays 12:00 UTC).
|
|
15
|
+
- **Publish workflow gates**: `npm audit --audit-level=high` and `npm test` now run before `npm publish`, preventing broken or vulnerable releases.
|
|
16
|
+
|
|
17
|
+
### Security
|
|
18
|
+
- Resolved transitive advisories via npm `overrides`:
|
|
19
|
+
- `hono` → `^4.12.12` (GHSA-26pp-8wgv-hjvm, GHSA-r5rp-j6wh-rvv4, GHSA-xf4j-xp2r-rqqx, GHSA-wmmm-f939-6g9c, GHSA-xpcf-pg52-r92g)
|
|
20
|
+
- `@hono/node-server` → `^1.19.13` (GHSA-92pp-h63x-v22m)
|
|
21
|
+
- `path-to-regexp` → `^8.4.0` (GHSA-j3q9-mxjg-w52f, GHSA-27v5-c462-wpq7)
|
|
22
|
+
- `vite` → `^7.3.2` (GHSA-4w7w-66w2-5vf9, GHSA-v2wj-q39q-566r)
|
|
23
|
+
- `npm audit --audit-level=high` now reports zero vulnerabilities.
|
|
24
|
+
|
|
25
|
+
### Packaging
|
|
26
|
+
- `STABILITY.md`, `MIGRATION.md`, and `CHANGELOG.md` are now included in the published npm tarball.
|
|
27
|
+
|
|
28
|
+
## [0.4.0] - 2026-03-28
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
- **Multi-IaC support**: CloudFormation (JSON/YAML), Pulumi (stack export), and Bicep/ARM template parsing via unified `IaCParser` interface with auto-format detection
|
|
32
|
+
- **`analyze_plan` tool**: Parse `terraform plan -json` output for precise before/after cost-of-change analysis
|
|
33
|
+
- **`compare_actual` tool**: Parse `.tfstate` files to compare actual infrastructure costs against estimates
|
|
34
|
+
- **`price_trends` tool**: Historical pricing with SQLite-backed price snapshots, change tracking, and trend queries
|
|
35
|
+
- **`detect_anomalies` tool**: Cost anomaly detection with budget checks, price change alerts, concentration risk, and right-sizing hints
|
|
36
|
+
- **API Gateway pricing**: AWS REST/HTTP/WebSocket, Azure API Management, GCP API Gateway
|
|
37
|
+
- **WAF pricing**: AWS WAFv2, Azure WAF Policy
|
|
38
|
+
- **OpenSearch pricing**: AWS OpenSearch Domain with per-instance-type tables
|
|
39
|
+
- **Messaging pricing**: AWS SNS/MQ Broker, Azure Service Bus/Event Hubs, GCP Pub/Sub
|
|
40
|
+
- **ML/AI pricing**: AWS SageMaker endpoints (40+ instance types), GCP Vertex AI (confidence: low)
|
|
41
|
+
- **Expanded Redis**: Full Azure Redis Cache and GCP Redis Instance support
|
|
42
|
+
- **ESLint + Prettier**: Flat config ESLint with TypeScript rules, Prettier formatting enforced
|
|
43
|
+
- **Coverage thresholds**: 70%+ statement/branch/function/line coverage enforced via vitest
|
|
44
|
+
- **Performance benchmarks**: Parsing, pricing cache, and calculator benchmarks via `vitest bench`
|
|
45
|
+
- **CI hardening**: Security audit job, Prettier format check, concurrency groups, job timeouts
|
|
46
|
+
- **SECURITY.md**: Vulnerability reporting policy and security design documentation
|
|
47
|
+
- **ARCHITECTURE.md**: Layered architecture documentation with extension guides
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
- Refactored `bulk-loader.ts` (929 -> 708 lines) into focused modules: csv-parser, fallback-data
|
|
51
|
+
- Refactored `resource-extractor.ts` (778 -> 299 lines) into per-provider extractors
|
|
52
|
+
- Refactored `retail-client.ts` (614 -> 499 lines) with extracted fallback-data
|
|
53
|
+
- Replaced ~40 `any` types in pricing modules with proper TypeScript interfaces
|
|
54
|
+
- Updated CI pipeline with security audit job and format checking
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
- picomatch HIGH severity vulnerability (ReDoS + method injection)
|
|
58
|
+
- Unused imports and variables across codebase (ESLint cleanup)
|
|
59
|
+
|
|
60
|
+
### Security
|
|
61
|
+
- Resolved picomatch 4.0.0-4.0.3 vulnerability via npm audit fix
|
|
62
|
+
- Added `npm audit --audit-level=high` to CI pipeline
|
|
63
|
+
|
|
64
|
+
## [0.3.0] - 2026-03-14
|
|
65
|
+
|
|
66
|
+
### Added
|
|
67
|
+
|
|
68
|
+
- `what_if` MCP tool for hypothetical pricing scenarios (change instance types, regions, commitment levels; see cost delta without modifying Terraform)
|
|
69
|
+
- Multi-currency support on `estimate_cost`, `compare_providers`, `what_if`: USD, EUR, GBP, JPY, CAD, AUD, INR, BRL
|
|
70
|
+
- Spot/preemptible instance pricing model via `CLOUDCOST_PRICING_MODEL` or per-scenario in `what_if`
|
|
71
|
+
- Cost projections over 3/6/12/36-month horizons with reserved instance comparisons (`src/calculator/projection.ts`)
|
|
72
|
+
- Tag-based cost attribution and `group_by` report option for grouping by team, environment, or any resource tag
|
|
73
|
+
- Budget alerts via `CLOUDCOST_BUDGET_MONTHLY`, `CLOUDCOST_BUDGET_PER_RESOURCE`, `CLOUDCOST_BUDGET_WARN_PCT`
|
|
74
|
+
- Terraform module expansion: referenced modules (`source = "..."`) resolved during parsing; controlled by `CLOUDCOST_RESOLVE_MODULES`
|
|
75
|
+
- Resource dependency graph via `include_dependencies` option on `analyze_terraform`
|
|
76
|
+
- OpenTofu `.tofu` file support alongside `.tf` files
|
|
77
|
+
- Data transfer cost integration (inter-region and internet egress) via `CLOUDCOST_INCLUDE_DATA_TRANSFER`
|
|
78
|
+
- FOCUS-compliant export format. Pass `format: "focus"` to `compare_providers`
|
|
79
|
+
- Live GCP Cloud Billing Catalog API client with automatic fallback to bundled data
|
|
80
|
+
- Container Registries, Secrets Management, and DNS resource types across all three providers
|
|
81
|
+
- GitHub Actions composite action for posting cost estimates as PR comments
|
|
82
|
+
- `currency` input on the GitHub Actions composite action
|
|
83
|
+
|
|
84
|
+
### Changed
|
|
85
|
+
|
|
86
|
+
- GCP pricing now attempts the live Cloud Billing Catalog API first and falls back to bundled data; `pricing_source` reflects `"live"` or `"bundled"` accordingly
|
|
87
|
+
- `compare_providers` `format` parameter now accepts `focus` in addition to `markdown`, `json`, and `csv`
|
|
88
|
+
- `analyze_terraform` `include_dependencies` option now returns a full dependency adjacency list alongside the resource inventory
|
|
89
|
+
|
|
90
|
+
### Fixed
|
|
91
|
+
|
|
92
|
+
- Variable references that were not resolved when a `terraform.tfvars` file contained complex expressions are now handled with a safe fallback rather than surfacing a parse error
|
|
93
|
+
- Concurrent pricing fetches for the same AWS region no longer trigger duplicate CSV downloads; a single in-flight request is now shared across callers
|
|
94
|
+
|
|
95
|
+
## [0.1.0] - 2026-03-09
|
|
96
|
+
|
|
97
|
+
### Added
|
|
98
|
+
|
|
99
|
+
- Six MCP tools exposed over stdio: `analyze_terraform`, `estimate_cost`, `compare_providers`, `get_equivalents`, `get_pricing`, and `optimize_cost`
|
|
100
|
+
- Multi-cloud cost analysis across AWS, Azure, and GCP from a single Terraform codebase
|
|
101
|
+
- HCL/Terraform parsing via `@cdktf/hcl2json` with full variable resolution, including `terraform.tfvars` support
|
|
102
|
+
- Real-time pricing from public APIs with no API keys or cloud credentials required (AWS Bulk Pricing CSV/JSON, Azure Retail Prices REST API)
|
|
103
|
+
- Streaming ingestion of the AWS EC2 bulk pricing CSV (~267 MB) line-by-line to avoid loading the full file into memory; all on-demand prices for a region are extracted in one pass
|
|
104
|
+
- Bundled GCP pricing data covering Compute Engine, Cloud SQL, Cloud Storage, Persistent Disk, and infrastructure services across all major regions
|
|
105
|
+
- Graceful fallback to built-in pricing tables with size-interpolation when live sources are unavailable; every price includes a `pricing_source` field (`live`, `fallback`, or `bundled`) for transparency
|
|
106
|
+
- SQLite-backed pricing cache (`better-sqlite3`) at `~/.cloudcost/cache.db` with a configurable TTL (default 24 hours), shared across all tools per server lifetime
|
|
107
|
+
- Cross-provider resource and instance type mapping covering 70+ AWS instance types (including Graviton/ARM families), 40+ Azure VM sizes, and 20+ GCP machine types with full bidirectional lookup
|
|
108
|
+
- Support for five resource categories: compute, database, storage, networking, and Kubernetes, across all three providers
|
|
109
|
+
- Reserved instance and savings plan pricing analysis within the `optimize_cost` tool alongside right-sizing and cross-provider switching recommendations
|
|
110
|
+
- Cost reports in Markdown, JSON, and CSV formats with per-resource monthly and yearly breakdowns and confidence scores
|
|
111
|
+
- Three-layer configuration system: built-in defaults → `~/.cloudcost/config.json` → `CLOUDCOST_*` environment variables
|
|
112
|
+
- ESM-only package targeting Node.js 20+, built with `tsup` and tested with `vitest`
|
package/MIGRATION.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Migration Guide
|
|
2
|
+
|
|
3
|
+
## 0.x → 1.0
|
|
4
|
+
|
|
5
|
+
**There are no breaking API changes.** v1.0 ratifies the existing v0.5 surface as stable under [Semantic Versioning](https://semver.org/). If your integration works on v0.5.x it will work on v1.0.0 without modification.
|
|
6
|
+
|
|
7
|
+
### What's new in 1.0
|
|
8
|
+
|
|
9
|
+
- Formal stability contract — see [`STABILITY.md`](./STABILITY.md).
|
|
10
|
+
- Security advisories in transitive dependencies (hono, `@hono/node-server`, path-to-regexp, vite) resolved via npm overrides.
|
|
11
|
+
- Smoke integration tests against live provider pricing APIs, runnable via `RUN_INTEGRATION=1` and scheduled weekly in CI.
|
|
12
|
+
- Hardened npm publish workflow (tests + audit gate releases).
|
|
13
|
+
|
|
14
|
+
### Locked-in public surface
|
|
15
|
+
|
|
16
|
+
The following are now SemVer-locked. Any breaking change to them requires a 2.0.
|
|
17
|
+
|
|
18
|
+
- MCP tools: `analyze_terraform`, `estimate_cost`, `compare_providers`, `get_equivalents`, `get_pricing`, `optimize_cost`, `what_if`, `analyze_plan`, `compare_actual`, `price_trends`, `detect_anomalies`
|
|
19
|
+
- CLI binaries: `cloudcost-mcp`, `cloudcost`
|
|
20
|
+
- Node engines: `>=20.0.0`
|
|
21
|
+
|
|
22
|
+
### Node.js
|
|
23
|
+
|
|
24
|
+
Node 20 remains the minimum. No change from v0.5.
|
|
25
|
+
|
|
26
|
+
### Support policy going forward
|
|
27
|
+
|
|
28
|
+
- Latest minor: security + bug fixes.
|
|
29
|
+
- Previous minor: security fixes only, 6 months after a new minor ships.
|
|
30
|
+
- Deprecations: a tool or input field marked deprecated in a minor must stay for at least one more minor before removal in the next major.
|
|
31
|
+
|
|
32
|
+
### Pinning
|
|
33
|
+
|
|
34
|
+
Once on v1.0 you can safely pin with a caret range:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
"@jadenrazo/cloudcost-mcp": "^1.0.0"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
This accepts bugfixes, pricing refreshes, and additive features, and will not pull in breaking changes.
|
package/STABILITY.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Stability Policy
|
|
2
|
+
|
|
3
|
+
Starting with v1.0.0, CloudCostMCP follows [Semantic Versioning](https://semver.org/). This document defines the **stable public surface** covered by that guarantee — changes to anything listed here are breaking and require a major version bump.
|
|
4
|
+
|
|
5
|
+
## Stable surface (SemVer-locked)
|
|
6
|
+
|
|
7
|
+
### MCP tools
|
|
8
|
+
|
|
9
|
+
The following 11 tools and their input schemas are locked. Their names, required fields, and the type shape of their output are stable. See `src/tools/*.ts` for the Zod schemas.
|
|
10
|
+
|
|
11
|
+
| Tool | Purpose |
|
|
12
|
+
| ------------------- | ------------------------------------------------------------------------- |
|
|
13
|
+
| `analyze_terraform` | Parse Terraform HCL and extract a resource inventory |
|
|
14
|
+
| `estimate_cost` | Estimate monthly/yearly cost for a Terraform resource set on one provider |
|
|
15
|
+
| `compare_providers` | Full multi-cloud cost comparison with savings analysis |
|
|
16
|
+
| `get_equivalents` | Map Terraform resource types and instance sizes across providers |
|
|
17
|
+
| `get_pricing` | Direct pricing lookup for a service/resource/region |
|
|
18
|
+
| `optimize_cost` | Right-sizing and reserved-pricing recommendations |
|
|
19
|
+
| `what_if` | Scenario cost modeling without modifying source files |
|
|
20
|
+
| `analyze_plan` | Cost-of-change analysis from a Terraform plan JSON |
|
|
21
|
+
| `compare_actual` | `.tfstate` vs planned cost drift detection |
|
|
22
|
+
| `price_trends` | Historical pricing trend query |
|
|
23
|
+
| `detect_anomalies` | Budget and concentration-risk anomaly detection |
|
|
24
|
+
|
|
25
|
+
### CLI
|
|
26
|
+
|
|
27
|
+
The `cloudcost-mcp` and `cloudcost` binaries and their documented flags in the README are stable.
|
|
28
|
+
|
|
29
|
+
### Package entry points
|
|
30
|
+
|
|
31
|
+
- `main`: `dist/index.js`
|
|
32
|
+
- `types`: `dist/index.d.ts`
|
|
33
|
+
- `bin`: `cloudcost-mcp`, `cloudcost`
|
|
34
|
+
- Node engine: `>=20.0.0`
|
|
35
|
+
|
|
36
|
+
## Not stable (may change in any release)
|
|
37
|
+
|
|
38
|
+
- Internal parser implementations under `src/parsers/`
|
|
39
|
+
- Pricing adapter internals under `src/pricing/aws`, `src/pricing/azure`, `src/pricing/gcp`
|
|
40
|
+
- The on-disk SQLite cache schema (cache is rebuilt on upgrade)
|
|
41
|
+
- Bundled fallback pricing tables under `data/`
|
|
42
|
+
- Log line format and log levels
|
|
43
|
+
- Exit codes beyond `0` (success) and `1` (failure)
|
|
44
|
+
- Benchmark scripts and unreleased helper modules
|
|
45
|
+
|
|
46
|
+
## Change classification
|
|
47
|
+
|
|
48
|
+
| Change | Bump |
|
|
49
|
+
| ------------------------------------------------ | ----- |
|
|
50
|
+
| Remove or rename a tool | Major |
|
|
51
|
+
| Remove a required input field from a tool schema | Major |
|
|
52
|
+
| Change the type of an existing output field | Major |
|
|
53
|
+
| Raise the minimum Node.js version | Major |
|
|
54
|
+
| Add a new tool | Minor |
|
|
55
|
+
| Add an optional input field | Minor |
|
|
56
|
+
| Add a new output field | Minor |
|
|
57
|
+
| Add a new provider/region/resource | Minor |
|
|
58
|
+
| Bugfix | Patch |
|
|
59
|
+
| Performance improvement | Patch |
|
|
60
|
+
| Pricing data refresh | Patch |
|
|
61
|
+
| Dependency bump without API change | Patch |
|
|
62
|
+
|
|
63
|
+
## Deprecation
|
|
64
|
+
|
|
65
|
+
Before a tool or field is removed in a future major, it will be marked deprecated in its description for at least one minor release, with the replacement documented in `CHANGELOG.md`.
|
|
66
|
+
|
|
67
|
+
## Support policy
|
|
68
|
+
|
|
69
|
+
- The latest minor line receives security and bug fixes.
|
|
70
|
+
- The previous minor line receives security fixes only, for 6 months after the next minor is released.
|
|
71
|
+
- CVE reports: see `SECURITY.md`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jadenrazo/cloudcost-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "MCP server for multi-cloud cost analysis of Terraform, CloudFormation, Pulumi, and Bicep/ARM codebases",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,10 @@
|
|
|
39
39
|
"!dist/**/*.map",
|
|
40
40
|
"data",
|
|
41
41
|
"README.md",
|
|
42
|
-
"LICENSE"
|
|
42
|
+
"LICENSE",
|
|
43
|
+
"STABILITY.md",
|
|
44
|
+
"MIGRATION.md",
|
|
45
|
+
"CHANGELOG.md"
|
|
43
46
|
],
|
|
44
47
|
"main": "dist/index.js",
|
|
45
48
|
"types": "dist/index.d.ts",
|
|
@@ -71,6 +74,12 @@
|
|
|
71
74
|
"yaml": "^2.8.3",
|
|
72
75
|
"zod": "^3.24.4"
|
|
73
76
|
},
|
|
77
|
+
"overrides": {
|
|
78
|
+
"hono": "^4.12.12",
|
|
79
|
+
"@hono/node-server": "^1.19.13",
|
|
80
|
+
"path-to-regexp": "^8.4.0",
|
|
81
|
+
"vite": "^7.3.2"
|
|
82
|
+
},
|
|
74
83
|
"devDependencies": {
|
|
75
84
|
"@eslint/js": "^10.0.1",
|
|
76
85
|
"@types/better-sqlite3": "^7.6.13",
|