# PlanetScale (MCP Server)

> Query PlanetScale databases and get insights with safe, ephemeral creds

- Type: MCP server
- Publisher: PlanetScale (official)
- Categories: Development, Data & Analytics
- Website: https://planetscale.com/docs/connect/mcp
- Transport: streamable-http
- Server URL: https://mcp.pscale.dev/mcp/planetscale
- Sign-in: oauth
- Listed: 2025-10-01

## About

PlanetScale's hosted MCP server connects AI tools to PlanetScale Vitess and Postgres databases via OAuth. Queries use short-lived credentials, reads route to replicas, and unsafe writes are blocked. It also exposes query insights, schema recommendations, billing and docs search; an insights-only endpoint omits query execution.

## Install

1. **Connect it in ChatGPT** Turn on Developer mode in ChatGPT (Settings → Security and login), open Plugins, select + and paste https://mcp.pscale.dev/mcp/planetscale as the MCP server URL, then sign in with OAuth. Add it to a chat from the composer's tools menu.

2. **Or add it to Codex or the API**

   Codex CLI:

   ```bash
   codex mcp add planetscale --url https://mcp.pscale.dev/mcp/planetscale
   codex mcp login planetscale
   ```

   config.toml:

   ```toml
   [mcp_servers.planetscale]
   url = "https://mcp.pscale.dev/mcp/planetscale"
   ```

   Responses API:

   ```python
   import os
   from openai import OpenAI
   
   client = OpenAI()
   
   response = client.responses.create(
       model="gpt-6-astra",
       tools=[{
           "type": "mcp",
           "server_label": "planetscale",
           "server_url": "https://mcp.pscale.dev/mcp/planetscale",
           "authorization": os.environ["PLANETSCALE_API_KEY"],
           "require_approval": "never",
       }],
       input="List my PlanetScale databases",
   )
   print(response.output_text)
   ```

## Tools

- `planetscale_list_databases`
- `planetscale_get_branch_schema`
- `planetscale_execute_read_query`
- `planetscale_execute_write_query`
- `planetscale_get_insights`
- `planetscale_list_query_error_patterns`
- `planetscale_list_invoices`

## Example prompts

- "List my PlanetScale databases"
- "What are the slowest queries on the main branch this week?"
- "Show the schema for the production branch"
- "Run a read query to count orders from yesterday"

## Also available as

- app: [PlanetScale](https://chatgptplugins.directory/apps/planetscale.md)

## Related

- [Chrome DevTools MCP](https://chatgptplugins.directory/mcp/chrome-devtools.md): Let coding agents control and debug a live Chrome browser
- [Playwright MCP](https://chatgptplugins.directory/mcp/playwright.md): Browser automation for agents via Playwright accessibility snapshots
- [GitHub](https://chatgptplugins.directory/mcp/github.md): Manage repos, issues, pull requests and Actions from your AI agent
- [Context7](https://chatgptplugins.directory/mcp/context7.md): Pull up-to-date, version-specific library docs into your coding agent
- [Supabase](https://chatgptplugins.directory/mcp/supabase.md): Manage Supabase databases, migrations, edge functions and logs
- [Stripe](https://chatgptplugins.directory/mcp/stripe.md): Query and act on your Stripe account and search Stripe docs from any agent

---
Source: https://chatgptplugins.directory/mcp/planetscale · Index: https://chatgptplugins.directory/llms.txt · Independent and community-run. Not affiliated with or endorsed by OpenAI. ChatGPT is a trademark of OpenAI.
