Connect to AI
Databases Bearer Token

PlanetScale REST API

Serverless MySQL database platform with branching

PlanetScale is a serverless MySQL-compatible database platform built on Vitess, offering database branching, automatic scaling, and non-blocking schema changes. Developers use PlanetScale for its Git-like workflow for database changes, allowing safe schema migrations without downtime, and its ability to scale horizontally while maintaining MySQL compatibility.

Base URL https://api.planetscale.com/v1

API Endpoints

MethodEndpointDescription
GET/organizationsList all organizations accessible to the authenticated user
GET/organizations/{organization}/databasesList all databases within an organization
POST/organizations/{organization}/databasesCreate a new database in an organization
GET/organizations/{organization}/databases/{database}Get details of a specific database
DELETE/organizations/{organization}/databases/{database}Delete a database from an organization
GET/organizations/{organization}/databases/{database}/branchesList all branches of a database
POST/organizations/{organization}/databases/{database}/branchesCreate a new branch from an existing branch
DELETE/organizations/{organization}/databases/{database}/branches/{branch}Delete a branch from a database
GET/organizations/{organization}/databases/{database}/deploy-requestsList all deploy requests for a database
POST/organizations/{organization}/databases/{database}/deploy-requestsCreate a deploy request to merge a branch
POST/organizations/{organization}/databases/{database}/deploy-requests/{number}/deployDeploy a deploy request to apply schema changes
GET/organizations/{organization}/databases/{database}/branches/{branch}/schemaGet the current schema of a database branch
GET/organizations/{organization}/databases/{database}/passwordsList all passwords (connection credentials) for a database
POST/organizations/{organization}/databases/{database}/passwordsCreate a new password for database access
DELETE/organizations/{organization}/databases/{database}/passwords/{password_id}Delete a password from a database

Code Examples

curl -X GET https://api.planetscale.com/v1/organizations/my-org/databases \
  -H 'Authorization: Bearer pscale_tkn_xxxxxxxxxxxxxxxxxxxxxx' \
  -H 'Content-Type: application/json'

Use PlanetScale from Claude / Cursor / ChatGPT

Get a hosted MCP endpoint for PlanetScale. Paste your PlanetScale API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls PlanetScale directly with your credentials — no local install, works on mobile.

create_database_branch Create a new database branch for safe schema experimentation and testing before merging to production
create_deploy_request Create and manage deploy requests to apply schema changes from development branches to production
list_databases List all databases in an organization with their configuration and status information
get_schema_diff Compare schemas between branches to review changes before deployment
manage_database_credentials Create, list, and revoke database connection credentials for secure access management

Connect in 60 seconds

Paste your PlanetScale key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.

Connect PlanetScale to your AI →

Related APIs