Skip to main content
CostGraph connects to PlanetScale with a service token. The token lets CostGraph read your databases, their branch cluster sizes, invoices, and metrics endpoints, so it can attribute cost and recommend rightsizing for your managed databases.

Create a service token

  1. In the PlanetScale dashboard, open your organization’s Settings -> Service tokens.
  2. Create a token and copy the token ID and token value. The value is shown once.
  3. Grant the token the accesses below.

Required accesses

Grant these at the organization level: Then grant this per database you want rightsized (Databases -> Accesses on the service token):
read_branch is granted per database, not at the organization level. Without it, CostGraph still ingests inventory and billing, but database size and cost recommendations are disabled for that database. The connect screen warns you when the token is missing read_branch.

Connect in CostGraph

  1. Open Integrations and choose PlanetScale.
  2. Paste the token ID and token value, pick the tenant, and connect.
  3. If the token is missing read_branch, CostGraph accepts the connection and shows a warning. Grant the access in PlanetScale, then reconnect or wait for the next sync.

What CostGraph does with it

  • Inventory: databases, regions, and nodes.
  • Billing: real invoice line items, mapped to each database.
  • Sizing and cost: each node is matched to its pricing (size SKU, architecture, HA topology, region) so storage and replica recommendations show real dollar savings.