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
| Method | Endpoint | Description |
|---|---|---|
| GET | /organizations | List all organizations accessible to the authenticated user |
| GET | /organizations/{organization}/databases | List all databases within an organization |
| POST | /organizations/{organization}/databases | Create 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}/branches | List all branches of a database |
| POST | /organizations/{organization}/databases/{database}/branches | Create 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-requests | List all deploy requests for a database |
| POST | /organizations/{organization}/databases/{database}/deploy-requests | Create a deploy request to merge a branch |
| POST | /organizations/{organization}/databases/{database}/deploy-requests/{number}/deploy | Deploy a deploy request to apply schema changes |
| GET | /organizations/{organization}/databases/{database}/branches/{branch}/schema | Get the current schema of a database branch |
| GET | /organizations/{organization}/databases/{database}/passwords | List all passwords (connection credentials) for a database |
| POST | /organizations/{organization}/databases/{database}/passwords | Create 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'
Connect PlanetScale to AI
Deploy a PlanetScale MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to PlanetScale through these tools:
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
Deploy in 60 seconds
Describe what you need, AI generates the code, and IOX deploys it globally.
Deploy PlanetScale MCP Server →