PlanetScale MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with PlanetScale MCP or direct API to manage databases, create branches, review deploy requests, and inspect backups and insights through natural language.

PlanetScale logoPlanetScale
Oauth2

PlanetScale is a MySQL-compatible database platform built for branching and scalable development. It helps teams ship schema changes safely with deploy requests, backups, and production insights.

245 Tools

Try PlanetScale now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
PlanetScale
Try asking
TOOLS

Supported Tools

Every PlanetScale action and event your agent gets out of the box.

Add a member to a team

Add a member to a team.

Assign shards to a Neki shard configuration profile

Assign shards to a Neki shard configuration profile.

Add shards to a Neki shard configuration profile

Add shards to a Neki shard configuration profile.

Cancel a change request for a Neki admin

Cancel a change request for a Neki admin.

Cancel a resize request

Cancel a resize request.

Cancel a change request

Cancel a branch resize change request.

Cancel a queued deploy request

Cancel a queued deploy request.

Cancel a change request for a Neki branch

Cancel a change request for a Neki branch.

Cancel a change request for a Neki router

Cancel a change request for a Neki router.

Cancel a change request for a Neki shard configuration profile

Cancel a change request for a Neki shard configuration profile.

Cancel a change request for a Neki sidecar

Cancel a change request for a Neki sidecar.

Check deploy request storage

Checks whether the deploy request's target branch cluster has enough storage to safely deploy the schema changes.

Close a deploy request

Close a deploy request.

Complete an errored deploy

Complete an errored deploy.

Complete a gated deploy request

Complete a gated deploy request.

Complete a revert

Complete a revert.

Open the SSO configuration portal

Return a URL for configuring the identity provider.

Create a backup

Create a backup.

Create a backup policy

Create a backup policy.

Create a bouncer

Create a bouncer.

Create a branch

Create a branch.

Create a log signature

Creates a signed token that can be used to access branch logs.

Create a database

Create a database.

Create an IP restriction entry

Create an IP restriction entry.

Create a deploy request

Create a deploy request.

Create an Insights agent run

Create an Insights agent run.

Start SSO domain verification

Enable SSO if needed and return a URL for verifying an email domain.

Create an organization team

Create an organization team.

Create a password

Create a password.

Create a billing payment method setup

Create a hosted checkout session for adding or replacing an organization's payment method.

Create a new query patterns report

Create a new query patterns report.

Create a read-only replica

Create a read-only replica.

Create role credentials

Create role credentials.

Create a router for a Neki branch

Create a router for a Neki branch.

Add shards to a Neki branch

Add shards to a Neki branch.

Create a shard configuration profile for a Neki branch

Create a shard configuration profile for a Neki branch.

Add a shard to a Neki shard configuration profile

Add a shard to a Neki shard configuration profile.

Create a switchover

Moves the primary of a Postgres branch.

Create a traffic budget

Create a traffic budget.

Create a traffic rule

Create a traffic rule.

Create a webhook

Create a webhook.

Delete a backup

Delete a backup.

Delete a backup policy

Delete a backup policy.

Delete a bouncer

Delete a bouncer.

Delete a branch

Delete a branch.

Delete a database

Delete a database.

Delete an IP restriction entry

Delete an IP restriction entry.

Delete the current billing payment method

Delete the current payment method for an organization.

Delete an SSO domain

Delete a verified or pending SSO domain.

Delete an organization team

Delete an organization team.

Delete a password

Delete a password.

Delete a query patterns report

Delete a query patterns report.

Delete a read-only replica

Delete a read-only replica.

Delete role credentials

Delete role credentials.

Delete a router from a Neki branch

Delete a router from a Neki branch.

Remove a shard from a Neki branch

Remove a shard from a Neki branch.

Delete a shard configuration profile for a Neki branch

Delete a shard configuration profile for a Neki branch.

Remove a shard from a Neki shard configuration profile

Remove a shard from a Neki shard configuration profile.

Remove shards from a Neki shard configuration profile

Remove shards from a Neki shard configuration profile.

Delete a traffic budget

Delete a traffic budget.

Delete a traffic rule

Delete a traffic rule.

Delete a webhook

Delete a webhook.

Demote a branch

Demotes a branch from production to development.

Disable organization SSO

Disable SSO and directory sync for the organization.

Disable directory sync

Disable directory sync for the organization.

Disable safe migrations for a branch

Disable safe migrations for a branch.

Dismiss a schema recommendation

Dismiss a schema recommendation.

Enable organization SSO

Enable the SSO add-on and return a URL for verifying an email domain.

Open the directory sync portal

Return a URL for configuring directory sync.

Enable safe migrations for a branch

Enable safe migrations for a branch.

Enable force cutover for a deploy request

Enable force cutover for a deploy request.

Get the admin for a Neki branch

Get the admin for a Neki branch.

Get a change request for a Neki admin

Get a change request for a Neki admin.

Get a backup

Get a backup.

Get a backup policy

Get a backup policy.

Get a bouncer

Get a bouncer.

Get a branch

Get a branch.

Retrieve a branch anomaly

Retrieve a branch anomaly.

Get a branch change request

Get a branch change request.

Get table storage metrics by keyspace

Get table storage metrics by keyspace.

Get time-series metrics

Retrieve time-series metrics for a database branch.

Retrieve a branch query

Retrieve a branch query.

List queries for an error fingerprint

List queries for an error fingerprint.

Get time-series metrics for SQL queries

Get time-series metrics for SQL queries.

Retrieve a query tag

Retrieve a query tag.

Get a branch resize request

Get a branch resize request.

Get a branch schema

Get a branch schema.

Get table storage metrics

Get table storage metrics.

Get time-series metrics grouped by query tags

Get time-series metrics grouped by query tags.

Get current user

Get the user associated with the current OAuth access token.

Get a database

Get a database.

Get an IP restriction entry

Get an IP restriction entry.

Get database throttler configurations

Get database throttler configurations.

Get the data topology for a Neki branch

Get the data topology for a Neki branch.

Get the default postgres role

Get the default postgres role.

Get the default shard configuration profile for a Neki branch

Get the default shard configuration profile for a Neki branch.

Get a deployment

Get the deployment for a deploy request.

Get the deploy queue

The deploy queue returns the current list of deploy requests in the order they will be deployed.

Get a deploy request

Get a deploy request.

Get deploy request throttler configurations

Get deploy request throttler configurations.

Get an Insights agent run

Get an Insights agent run.

Get current metric values

Get current metric values.

Get current tablet metrics

Get current tablet metrics.

Get an invoice

Get an invoice.

Get invoice line items

Get the line items for an invoice.

Get a maintenance schedule

Get a maintenance schedule.

Get a change request for a Neki branch

Get a change request for a Neki branch.

Get an organization

Get an organization.

Get the current billing payment method

Get the current payment method for an organization.

Get an organization member

Get an organization member by a user ID or membership ID returned by `list_organization_members`.

Get organization SSO status

Get SSO add-on status, identity provider connection state, directory sync, and verified domains.

Get an SSO domain

Get a registered SSO email domain and its verification state.

Get an organization team

Get an organization team.

Get a team member

Get a team member.

Get a password

Get a password.

Get a billing payment method setup

Get the state of a billing payment method setup.

Download a finished query patterns report

Download a finished query patterns report.

Show the status of a query patterns report

Show the status of a query patterns report.

Retrieve query statistics

Retrieve query statistics.

Retrieve a summary of query statistics

Retrieve a summary of query statistics.

Get a read-only replica

Get a read-only replica.

Get a role

Get a role.

Get a router for a Neki branch

Get a router for a Neki branch.

Get a change request for a Neki router

Get a change request for a Neki router.

Get a schema recommendation

Get a schema recommendation.

Get a shard for a Neki branch

Get a shard for a Neki branch.

Get a shard configuration profile for a Neki branch

Get a shard configuration profile for a Neki branch.

Get a change request for a Neki shard configuration profile

Get a change request for a Neki shard configuration profile.

Get a shard in a Neki shard configuration profile

Get a shard in a Neki shard configuration profile.

Get a sidecar for a Neki branch

Get a sidecar for a Neki branch.

Get a change request for a Neki sidecar

Get a change request for a Neki sidecar.

Get a switchover

Get a switchover.

Get time-series tablet metrics

Get time-series tablet metrics.

Get a traffic budget

Get a traffic budget.

Get a webhook

Get a webhook.

Lint a branch schema

Lint a branch schema.

List change requests for a Neki admin

List change requests for a Neki admin.

List parameters for a Neki admin

List parameters for a Neki admin.

List admin size SKUs for a Neki branch

List admin size SKUs for a Neki branch.

List audit logs

List audit logs.

List backup policies

List backup policies.

List backups

List backups.

Get bouncer resize requests

Get bouncer resize requests.

List bouncers

List bouncers.

List branch anomalies

List branch anomalies.

Get bouncer resize requests

Get bouncer resize requests.

Get branch change requests

Get branch change requests.

List branches

List branches.

List branch queries

List branch queries.

List branch query errors

List branch query errors.

List query tags

List query tags.

List query statistics grouped by tag

List query statistics grouped by tag.

Get branch resize requests

Get branch resize requests.

List available cluster sizes

List available cluster sizes for an organization.

List IP restriction entries

List IP restriction entries.

List database regions

List database regions.

List databases

List databases.

List deploy operations

List deploy operations for a deploy request.

List deploy request reviews

List deploy request reviews.

List deploy requests

List deploy requests for a database.

List cluster extensions

List cluster extensions.

List generated query patterns reports

List generated query patterns reports.

List Insights agent runs

List Insights agent runs.

List Insights Agent schedules

List Insights Agent schedules.

Get invoices

Get the invoices for an organization.

List maintenance schedules

List maintenance schedules.

List maintenance windows

List maintenance windows.

List change requests for a Neki branch

List change requests for a Neki branch.

List organization members

List organization members.

List organizations

When using a service token, returns the list of organizations the service token has access to.

List organization SSO domains

List email domains registered for organization SSO.

List team members

List team members.

List teams in an organization

List teams in an organization.

List cluster parameters

Returns the parameters for a branch.

List passwords

List passwords.

List available Postgres versions

List the published Postgres versions available to the requested engine.

List read-only regions

List read-only regions for the database's default branch.

Get read-only replica change requests

Get read-only replica change requests.

List read-only replicas

List read-only replicas.

List regions for an organization

List regions for an organization.

List roles

List roles.

List change requests for a Neki router

List change requests for a Neki router.

List parameters for a Neki router

List parameters for a Neki router.

List routers for a Neki branch

List routers for a Neki branch.

List router size SKUs for a Neki branch

List router size SKUs for a Neki branch.

List schema recommendations

List schema recommendations.

List change requests for a Neki shard configuration profile

List change requests for a Neki shard configuration profile.

List extensions for a Neki shard configuration profile

List extensions for a Neki shard configuration profile.

List parameters for a Neki shard configuration profile

List parameters for a Neki shard configuration profile.

List shard configuration profiles for a Neki branch

List shard configuration profiles for a Neki branch.

List shards for a Neki shard configuration profile

List shards for a Neki shard configuration profile.

List shards for a Neki branch

List shards for a Neki branch.

List change requests for a Neki sidecar

List change requests for a Neki sidecar.

List parameters for a Neki sidecar

List parameters for a Neki sidecar.

List sidecars for a Neki branch

List sidecars for a Neki branch.

List switchovers

List switchovers.

List traffic budgets

List traffic budgets.

List traffic budgets affecting a query fingerprint

List traffic budgets affecting a query fingerprint.

List webhooks

List webhooks for a database.

Get OAuth token info

Inspect whether the current OAuth access token is active and return its scopes and expiry.

Promote a branch

Promotes a branch from development to production.

Queue a deploy request

Queue a deploy request.

Reassign objects owned by one role to another role

Reassign objects owned by one role to another role.

Remove a member from an organization

Remove a member from an organization.

Remove a member from a team

Remove a member from a team.

Renew a password

Renew a password.

Renew role expiration

Renew role expiration.

Reset default credentials

Reset default credentials.

Reset a role's password

Reset a role's password.

Review a deploy request

Review a deploy request by either approving or commenting on the deploy request.

Run maintenance for a Postgres branch

Run maintenance for a Postgres branch.

Run maintenance for a Neki shard configuration profile

Run maintenance for a Neki shard configuration profile.

Run maintenance for selected Neki shard configuration profiles

Run maintenance for selected Neki shard configuration profiles.

Set the default shard configuration profile for a Neki branch

Set the default shard configuration profile for a Neki branch.

Skip revert period

Skips the revert period for a deploy request.

Test a webhook

Sends a test event to the webhook.

Update the admin for a Neki branch

Update the admin for a Neki branch.

Update auto-apply for deploy request

Enables or disabled the auto-apply setting for a deploy request.

Update auto-delete branch for deploy request

Enables or disabled the auto-delete branch setting for a deploy request.

Update a backup

Update a backup.

Update a backup policy

Update a backup policy.

Upsert a bouncer resize request

Upsert a bouncer resize request.

Update a branch

Update a branch.

Upsert a change request for cluster size, replicas, storage, or parameters

Upsert a change request for cluster size, replicas, storage, or parameters.

Upsert a resize request

Upsert a resize request.

Update an IP restriction entry

Update an IP restriction entry.

Update database settings

Update database settings.

Update database throttler configurations

Update database throttler configurations.

Set the data topology for a Neki branch

Set the data topology for a Neki branch.

Update deploy request throttler configurations

Update deploy request throttler configurations.

Update an Insights Agent schedule

Update an Insights Agent schedule.

Update an organization

Update an organization.

Update organization member role

Update organization member role.

Update an organization team

Update an organization team.

Update a password

Update a password.

Update a read-only replica

Update a read-only replica.

Update role name

Update role name.

Update a router for a Neki branch

Update a router for a Neki branch.

Update safe migrations for a branch

Update safe migrations for a branch.

Update a shard for a Neki branch

Update a shard for a Neki branch.

Update a shard configuration profile for a Neki branch

Update a shard configuration profile for a Neki branch.

Update a shard in a Neki shard configuration profile

Update a shard in a Neki shard configuration profile.

Update a sidecar for a Neki branch

Update a sidecar for a Neki branch.

Update a traffic budget

Update a traffic budget.

Update a webhook

Update a webhook.

SETUP GUIDE

Connect PlanetScale MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["planetscale"],
  mcp: true,
});
Create a session scoped to PlanetScale and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "List all databases in my PlanetScale organization",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a PlanetScale request
SETUP GUIDE

Connect PlanetScale API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["planetscale"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to PlanetScale
3

Run PlanetScale tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "List all databases in my PlanetScale organization" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the PlanetScale tool calls through the session, and print the final answer

Why Use Composio?

AI Native PlanetScale Integration

  • Supports both PlanetScale MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for managing organizations, databases, branches, deploy requests, backups, workflows, and insights

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke PlanetScale access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access PlanetScale
  • Scoped, least privilege access to PlanetScale resources
  • Full audit trail of agent actions to support review and compliance

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

PlanetScale requires connections to go through your own OAuth app. You register it once with PlanetScale, add its client ID and secret in the Composio dashboard, and from then on everyone connects by signing in to PlanetScale as usual. Composio handles the rest of the flow and the token refresh.

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Yes. Composio is SOC 2 Type II compliant and is built to keep your PlanetScale connection and credentials secure. OAuth tokens and API keys are encrypted, and sensitive customer data is protected at rest and in transit.

Composio also undergoes independent security testing and continuously monitors its systems for security threats. You can review the latest reports and policies in the Composio Trust Center.

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

When you connect a PlanetScale account through Composio, every action runs under that account, so anything the agent creates, sends, or changes shows up in PlanetScale as done by you. Keep an approval step in your prompt for actions with side effects, such as sending or deleting, and have the agent draft first.

Exactly the ones PlanetScale lists on its consent screen when you connect. Review that screen before approving. If you connect a work account, your PlanetScale administrator may need to approve the app first, and you can revoke the access inside PlanetScale whenever you want.

Yes. Composio supports multiple connected accounts for the same app, and that works in Claude, ChatGPT, or any other assistant you connect through Composio. Give each PlanetScale connection a name such as work or personal, and the assistant uses the one you mention in the request. Each account keeps its own credentials and nothing is merged.

Composio refreshes PlanetScale tokens automatically, so day to day you do nothing. If you revoke access inside PlanetScale, or PlanetScale invalidates the session, the connection shows as expired in Composio and the agent stops acting on that account until you reconnect it, which is a single sign-in.

Composio's free Hobby plan includes 100,000 tool calls per month with no credit card, which covers most personal PlanetScale use. Paid plans add higher limits and team features. Your PlanetScale plan and its API limits still apply as usual.

Built-in connectors usually give one AI access to a limited set of apps. Many people use Composio because it lets their AI connect to more apps than it normally supports, or connect to multiple accounts for the same app (e.g. connect Claude to multiple PlanetScale accounts).

With Composio, you connect PlanetScale once and then use it across different AI assistants without setting it up separately in each one. Connect your apps to Composio once, then connect Composio to whichever AI you use, whether that's Claude, ChatGPT, Hermes, or your own custom assistant.

Start with PlanetScale.It takes 30 seconds.

Managed auth, hosted MCP servers, and every PlanetScale tool your agent needs.Free to start.

Start building