Skip to main content
PlanetScale Bot helps you get started with PlanetScale, understand database performance, and fix slow or failing queries using its MCP server and installed skills.

Add PlanetScale Bot

Open the PlanetScale Bot by PlanetScale template, then choose Add to Grok Bot.

Connect the PlanetScale plugin

Add PlanetScale to Grok Bot and authorize access to your databases.

Before you begin

You need a PlanetScale account and access to the databases you want to investigate. If you are new to Grok Bot, start with these resources:

Add PlanetScale Bot and connect it to PlanetScale

1

Review and add the bot

Open the PlanetScale Bot template. You should see PlanetScale Bot by PlanetScale.
PlanetScale Bot template details in Grok Bot, showing Context, PlanetScale Webhook Triage, and the PlanetScale integrationPlanetScale Bot template details in Grok Bot, showing Context, PlanetScale Webhook Triage, and the PlanetScale integration
2

Let the agent set itself up

PlanetScale Bot creates its memories, skills, and PlanetScale Webhook Triage routine, then prompts you to install the PlanetScale plugin. The routine starts paused.
PlanetScale Bot setting itself up and creating the PlanetScale Webhook Triage routinePlanetScale Bot setting itself up and creating the PlanetScale Webhook Triage routine
3

Install the PlanetScale plugin

Accept the PlanetScale plugin installation prompt. If you don’t see it, open the PlanetScale plugin and choose Add.
PlanetScale Bot confirming setup is complete and showing the accepted PlanetScale plugin installation promptPlanetScale Bot confirming setup is complete and showing the accepted PlanetScale plugin installation prompt
4

Authorize PlanetScale

Choose Authorize on the PlanetScale card and follow the PlanetScale authorization flow in your browser.
PlanetScale installed with an Authorize button on its connection cardPlanetScale installed with an Authorize button on its connection card
5

Choose a database

Tell the bot which organization, database, and branch to use. Ask it to verify access with a read-only check before investigating.
For example:

Connect a codebase (optional)

With access to your repository, PlanetScale Bot can trace database issues back to your code and help fix them via Cursor Cloud Agents. Tell the bot which repository to work on. If it is not already connected to Cursor, connect your source control account through Cursor Integrations. See Work with Grok Bot for more.

Setting up the webhook routine

Webhooks are optional. They let PlanetScale Bot investigate events as they arrive, check whether database changes completed, and flag what needs your attention. Without webhooks, the bot responds when you ask.
1

Configure and enable the routine

Ask the bot to configure PlanetScale Webhook Triage for your chosen organizations and databases, then turn it on. Open the routine to find its Webhook URL and Authorization header.
PlanetScale Webhook Triage routine settings showing the active toggle and webhook endpoint, key, and header with values obscuredPlanetScale Webhook Triage routine settings showing the active toggle and webhook endpoint, key, and header with values obscured

Webhook credentials are hidden in this screenshot.

2

Add the webhook in PlanetScale

In your database’s Settings → Webhooks → Add webhook, paste the routine’s Webhook URL into URL and the header value into Authorization header, including the scheme, such as Bearer <token>, without the Authorization: label.
PlanetScale Add webhook form with URL, Authorization header, and event selection fieldsPlanetScale Add webhook form with URL, Authorization header, and event selection fields
3

Choose events and test delivery

Choose the events you want the bot to follow, save the webhook, and use Test webhook. Confirm delivery in PlanetScale and acknowledgment in Grok Bot.Webhooks cover supported events; they don’t notify the bot about every slow query or CPU spike.
See Setting up webhooks for more details.

Need help?

Get help from the PlanetScale Support team, or join our Discord community to see how others are using PlanetScale.