---
title: "PlanetScale Integration"
description: "Manage PlanetScale databases, branches, and schema changes"
---
The PlanetScale integration provides access to manage PlanetScale databases, branches, and schema changes through the Integrate MCP server.

## Installation

The PlanetScale integration is included with the SDK:

```typescript
import { planetscaleIntegration } from "integrate-sdk/server";
```

## Setup

### 1. Create a PlanetScale OAuth App

1. Go to [Auth Developer Portal](https://auth.planetscale.com)
2. Create a new OAuth application
3. Configure your redirect URI
4. Note your Client ID and Client Secret

### 2. Configure the Integration on Your Server

Add the PlanetScale integration to your server configuration. The integration automatically reads `PLANETSCALE_CLIENT_ID` and `PLANETSCALE_CLIENT_SECRET` from your environment variables:

```typescript
import { createMCPServer, planetscaleIntegration } from "integrate-sdk/server";

export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [
    planetscaleIntegration({
    }),
  ],
});
```

You can override the environment variables by passing explicit values:

```typescript
planetscaleIntegration({
  clientId: process.env.CUSTOM_PLANETSCALE_ID,
  clientSecret: process.env.CUSTOM_PLANETSCALE_SECRET,
});
```

### 3. Client-Side Usage

The default client automatically includes all integrations. You can use it directly:

```typescript
import { client } from "integrate-sdk";

await client.authorize("planetscale");
// Use client.planetscale methods after connecting
```

If you're using a custom client, add the integration to the integrations array:

```typescript
import { createMCPClient, planetscaleIntegration } from "integrate-sdk";

const customClient = createMCPClient({
  integrations: [planetscaleIntegration()],
});
```

## Configuration Options

<AutoTypeTable
  path="../src/integrations/planetscale.ts"
  name="PlanetScaleIntegrationConfig"
/>


## Tools

### `planetscale_get_current_user`

Get current user

_No parameters._

### `planetscale_list_organizations`

List organizations

_No parameters._

### `planetscale_get_organization`

Get organization

_No parameters._

### `planetscale_list_databases`

List databases

_No parameters._

### `planetscale_get_database`

Get database

_No parameters._

### `planetscale_list_branches`

List branches

_No parameters._

### `planetscale_get_branch`

Get branch

_No parameters._

### `planetscale_list_deploy_requests`

List deploy requests

_No parameters._

### `planetscale_get_deploy_request`

Get deploy request

_No parameters._

## Notes

- Category: Infrastructure
- Authentication mode: OAuth
