Create a service token
- In the PlanetScale dashboard, open your organization’s Settings -> Service tokens.
- Create a token and copy the token ID and token value. The value is shown once.
- 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
- Open Integrations and choose PlanetScale.
- Paste the token ID and token value, pick the tenant, and connect.
- 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.