# Using Atlas with PlanetScale in 2026

> PlanetScale's hosted MCP server, launched in January 2026, lets Atlas read Insights for the slowest query and turn the fix into a branch and deploy request.

Atlas works with PlanetScale through PlanetScale's hosted MCP server, launched in January 2026, which lets Atlas read Insights for the slowest query and turn the fix into a branch and deploy request. Add it with atlas mcp add planetscale --url https://mcp.pscale.dev/mcp/planetscale, then run atlas mcp auth planetscale. A read-only variant and a CI service token path both exist.

## What PlanetScale's hosted MCP server gives Atlas

PlanetScale's hosted MCP server, launched in January 2026, gives Atlas access to Insights, PlanetScale's query performance data. Atlas can read Insights for the slowest query, explain which index is missing, and turn that fix into a branch and a deploy request rather than a suggestion in a chat window.

Query performance work usually splits across two tools: a PlanetScale dashboard where you find the slow query in Insights, and an editor where you write the schema change that fixes it. PlanetScale's hosted MCP server collapses that split. Insights is where the evidence lives, ranking queries by what they actually cost, and the MCP server puts Insights directly in the agent's context. From there the fix is an index, and PlanetScale's branch and deploy request model is how you ship an index safely. The result is one terminal session running from a slow query in Insights to a reviewable PlanetScale deploy request, with no dashboard visit at all.

## Connecting Atlas to PlanetScale

Connecting Atlas to PlanetScale takes 2 commands. Run atlas mcp add planetscale --url https://mcp.pscale.dev/mcp/planetscale to add PlanetScale's hosted server, then run atlas mcp auth planetscale to authenticate. The server is hosted by PlanetScale, so there is no local process to install or keep running.

The add command registers the hosted endpoint with Atlas so its tools are available in every session in that workspace. The auth command runs the OAuth flow and stores the credentials, which means you authenticate once rather than on each invocation. Because PlanetScale hosts the server at https://mcp.pscale.dev/mcp/planetscale, new tools land on the endpoint without you upgrading anything locally. Verify the connection by asking Atlas something small and read-only first, such as which query Insights currently ranks slowest, before you hand it any schema work.

## The Insights-only URL for a strictly read-only surface

For a strictly read-only surface, point Atlas at https://mcp.pscale.dev/mcp/planetscale-insights-only instead. That endpoint exposes 0 query-execution tools, so Atlas can read PlanetScale Insights and reason about slow queries while having no mechanical path to execute a query against your database.

Capability scoping is stronger than prompt-level caution, because a tool the agent does not have is a tool the agent cannot misuse. The planetscale-insights-only endpoint is exactly that kind of scoping. It exposes no query-execution tools, so the worst case for a confused agent is a wrong explanation rather than a wrong query against production. Use it when the task is genuinely diagnostic, for example when you want Atlas to survey the slowest queries and tell you which indexes are missing, and reach for the full https://mcp.pscale.dev/mcp/planetscale endpoint only when the job actually requires more.

## Headless and CI authentication with PLANETSCALE_API_TOKEN

Headless and CI setups authenticate to PlanetScale with a PLANETSCALE_API_TOKEN service token instead of OAuth. A CI runner has no browser to complete an interactive flow, so in 2026 the service token is the supported path when Atlas runs unattended inside a pipeline rather than in a developer's terminal.

Keep PLANETSCALE_API_TOKEN in your CI provider's secret store, never in a file that gets committed. The token is a service credential, which means it is not tied to a human's session and does not expire when someone leaves a laptop. That is what makes it right for automation and also what makes it worth scoping carefully. If the CI job only needs to read Insights, consider pairing PLANETSCALE_API_TOKEN with the planetscale-insights-only endpoint so the pipeline has no query-execution tools available even in principle.

## Do not wire the deprecated pscale CLI MCP server into atlas.json

The local pscale CLI MCP server is deprecated in 2026, so do not wire pscale mcp into atlas.json. Use PlanetScale's hosted server at https://mcp.pscale.dev/mcp/planetscale instead. Older setup guides that tell you to run a local pscale MCP process predate the hosted launch in January 2026.

This trips people up because the pscale CLI is still a normal part of a PlanetScale workflow, and the instinct is to assume its MCP subcommand is current too. It is not. The local pscale CLI MCP server is deprecated, and adding pscale mcp to atlas.json points Atlas at a path PlanetScale is no longer investing in. Registering the hosted server with atlas mcp add planetscale gives you the supported surface, including Insights, and it stays current without you managing a local binary version.

## The daily workflow: from slow query to deploy request

The PlanetScale loop with Atlas starts with 1 prompt. Ask Atlas to read Insights for the slowest query and explain which index is missing. Once the diagnosis holds up, let Atlas open the branch, apply the schema change, and summarize the deploy request before you promote it.

Split the PlanetScale work into diagnosis and schema change, and review between the two. In the diagnosis half, Atlas reads Insights, identifies the slowest query, and explains which index is missing. You judge that explanation, which is far easier than reviewing an index definition cold. In the change half, Atlas opens the PlanetScale branch, applies the schema change on the branch, and summarizes the resulting deploy request. Promotion stays yours. A PlanetScale deploy request is a review gate by design, and an agent that summarizes a deploy request accurately has done its job without ever needing to promote one.

## Setup

1. Add PlanetScale's hosted server with atlas mcp add planetscale --url https://mcp.pscale.dev/mcp/planetscale, then run atlas mcp auth planetscale.
2. For a strictly read-only surface, point at https://mcp.pscale.dev/mcp/planetscale-insights-only, which exposes no query-execution tools.
3. For headless and CI runs, authenticate with a PLANETSCALE_API_TOKEN service token instead of OAuth.
4. Do not wire pscale mcp into atlas.json. The local pscale CLI MCP server is deprecated.
5. Ask Atlas to read Insights for the slowest query and explain which index is missing.
6. Let Atlas open the branch, apply the schema change, and summarize the deploy request before you promote it.

## FAQ

### how to connect Atlas to PlanetScale MCP server

Run atlas mcp add planetscale --url https://mcp.pscale.dev/mcp/planetscale, then run atlas mcp auth planetscale. PlanetScale's hosted MCP server launched in January 2026.

### how do I give an AI agent read-only access to PlanetScale

Point Atlas at https://mcp.pscale.dev/mcp/planetscale-insights-only. That endpoint exposes no query-execution tools, so Atlas can read Insights but cannot execute queries.

### is the pscale CLI MCP server still supported

No. The local pscale CLI MCP server is deprecated, so do not wire pscale mcp into atlas.json. Use the hosted server at https://mcp.pscale.dev/mcp/planetscale.

### how do I authenticate PlanetScale MCP in CI

Headless and CI setups use a PLANETSCALE_API_TOKEN service token instead of OAuth, because a CI runner has no browser to complete an interactive flow.

### can an AI agent find my slowest PlanetScale query

Yes. Ask Atlas to read Insights for the slowest query and explain which index is missing. PlanetScale's hosted MCP server exposes Insights to Atlas directly.

### can Atlas create a PlanetScale deploy request

Yes. Let Atlas open the branch, apply the schema change, and summarize the deploy request. Promoting the deploy request stays a human decision.

### when did PlanetScale launch its MCP server

PlanetScale launched its hosted MCP server in January 2026. It lets Atlas read Insights for the slowest query and turn the fix into a branch and deploy request.

---

Canonical HTML: https://runatlas.sh/resources/integrations/planetscale
Source of truth: aeo_pages row `/resources/integrations/planetscale` (segment: Integrations) (this file is generated from it, never hand-edited).
Licence: Atlas is proprietary with a free core. It is not open source and there is no public source repository.
