No description
Find a file
Kate 79a7eaf213 Add Scaleway provider
Scaleway billing v2beta1: X-Auth-Token auth with SCW_SECRET_KEY,
paginated invoice listing with billing-period date filters (and an
optional SCW_DEFAULT_ORGANIZATION_ID scope), and pdf downloads that
arrive as a JSON std.File wrapper with base64 content. No per-invoice
line items (usage lives in the separate consumption API), so
get_invoice returns the invoice object. Verified end-to-end against a
local mock of the API.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 17:02:02 +02:00
src Add Scaleway provider 2026-07-13 17:02:02 +02:00
.gitignore Initial commit: MCP server for cloud provider invoices 2026-07-13 16:40:40 +02:00
flake.nix Initial commit: MCP server for cloud provider invoices 2026-07-13 16:40:40 +02:00
package-lock.json Initial commit: MCP server for cloud provider invoices 2026-07-13 16:40:40 +02:00
package.json Initial commit: MCP server for cloud provider invoices 2026-07-13 16:40:40 +02:00
README.md Add Scaleway provider 2026-07-13 17:02:02 +02:00
tsconfig.json Initial commit: MCP server for cloud provider invoices 2026-07-13 16:40:40 +02:00

cloud-billing-mcp

MCP server for fetching invoices and billing data from cloud providers. Currently supported: DigitalOcean, OVHcloud, and Scaleway. The provider layer is pluggable — adding a provider means implementing one interface in src/providers/.

Tools

Tool Description
list_providers Supported providers, whether each is configured, supported formats
list_invoices Invoices with ids, periods, amounts (DO includes a current-invoice preview)
get_invoice Itemized line items for an invoice
get_invoice_summary Totals, taxes, credits, billing address
download_invoice Save an invoice as pdf, csv, json, or html to disk; returns the path
get_balance Account balance and month-to-date usage
list_billing_history Billing events: invoices, payments, credits

All tools are read-only with respect to the provider account. Formats and optional capabilities (balance, billing history) vary per provider — check list_providers: DigitalOcean does pdf/csv/json, OVH does pdf/html/json, Scaleway does pdf/json. OVH and Scaleway support date-filtered listing. Scaleway has no per-invoice line items (usage lives in its separate consumption API), so get_invoice returns the invoice object itself.

Configuration

Environment variables:

  • DIGITALOCEAN_ACCESS_TOKEN — DigitalOcean API token; the billing:read scope is sufficient (create one under API → Tokens in the control panel).
  • OVH_APPLICATION_KEY / OVH_APPLICATION_SECRET / OVH_CONSUMER_KEY — OVH API credentials; create them at https://www.ovh.com/auth/api/createToken with GET rights on /me/bill*.
  • OVH_ENDPOINT — OVH region: ovh-eu (default), ovh-ca, or ovh-us.
  • SCW_SECRET_KEY — Scaleway secret key (an IAM API key with BillingReadOnly permissions).
  • SCW_DEFAULT_ORGANIZATION_ID — optional Scaleway organization filter for invoice listing.
  • CLOUD_BILLING_DOWNLOAD_DIR — where download_invoice saves files (default ~/Downloads).
  • DIGITALOCEAN_API_URL / OVH_API_URL / SCW_API_URL — API base URL overrides, for testing.

Usage

npm install
npm run build

# stdio (default) — for MCP client configs
node dist/index.js

# Streamable HTTP at http://127.0.0.1:8791/mcp
node dist/index.js --http

Claude Code registration:

claude mcp add cloud-billing -e DIGITALOCEAN_ACCESS_TOKEN=dop_v1_... -- node /path/to/cloud-billing-mcp/dist/index.js

Or with Nix: nix run .# (package exposes the cloud-billing-mcp binary).

Adding a provider

  1. Implement the Provider interface from src/providers/types.ts (list/detail/summary/download; getBalance and listBillingHistory are optional capabilities).
  2. Register it in src/providers/index.ts.

The provider enum on every tool and the list_providers output are derived from the registry automatically.