Integrations

Using Atlas with PlanetScale in 2026

Updated 6 min read

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

Frequently asked questions

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.

Try SeaShell in your terminal

The terminal-native AI coding agent. Free core, single binary.

Install SeaShell

Related guides

Atlas with Claude Sonnet 5: Your 2026 Workhorse for AI-Powered Coding

Drive Atlas with Claude Sonnet 5, Anthropic's 2026 workhorse. Get 1M token context for $2/$10 per Mtok, ideal for long, agentic coding sessions in your terminal.

Atlas with Qwen3 Coder Plus in 2026

Atlas with Qwen3 Coder Plus in 2026: Harness its 1M token context and $1/Mtok input for agentic coding. Understand its prose limitations and $5/Mtok output cost.

Atlas vs Devin: Terminal AI Coding Agents in 2026

Atlas and Devin offer distinct approaches to AI coding in 2026. Compare their terminal-native TUI, sandboxed VMs, pricing, and code safety features.

Atlas with DeepCoder 14B (Ollama) in 2026

DeepCoder 14B (Ollama) provides Atlas developers a free, self-hosted model in 2026. Its 128K token context and RL tuning for first-attempt correctness are ideal for Atlas's unified diff workflow.

Atlas with Code Llama 7B (Ollama) in 2026

Explore Atlas with Code Llama 7B (Ollama), a free, self-hosted model offering 16K context. Ideal for local code generation and infill tasks in 2026.

Atlas for Fiber in 2026

Atlas is a terminal-native AI coding agent for Fiber in 2026. It knows fasthttp reuses buffers, tests handlers with app.Test(), and diffs every edit first.

Atlas with Llama 3.2 1B (local via Ollama) in 2026

In 2026, drive Atlas's background tasks with Llama 3.2 1B (local via Ollama). This 1.3GB model offers a 128,000 token window and free self-hosted operation for offline housekeeping.

Atlas vs Cosine: Choosing Your AI Coding Agent in 2026

Compare Atlas and Cosine AI coding agents for 2026. Atlas offers terminal-native TUI, explicit change review, and BYO model keys. Cosine features its Lumen models and a 30.08% SWE-bench record.

Browse this resource hub