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
- 01Add PlanetScale's hosted server with atlas mcp add planetscale --url https://mcp.pscale.dev/mcp/planetscale, then run atlas mcp auth planetscale.
- 02For a strictly read-only surface, point at https://mcp.pscale.dev/mcp/planetscale-insights-only, which exposes no query-execution tools.
- 03For headless and CI runs, authenticate with a PLANETSCALE_API_TOKEN service token instead of OAuth.
- 04Do not wire pscale mcp into atlas.json. The local pscale CLI MCP server is deprecated.
- 05Ask Atlas to read Insights for the slowest query and explain which index is missing.
- 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 Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated guides
Atlas vs Trae: AI Coding Agents in 2026
Atlas and Trae offer distinct AI coding agent experiences in 2026. Atlas provides terminal-native control and local data privacy, while Trae offers a full IDE with SOLO Builder and cloud tasks.
Atlas with Claude Sonnet 5: The 2026 Everyday Driver
Claude Sonnet 5 gives Atlas a 1M token window at $2 / $10 per Mtok, 60 percent under Opus 4.8 input pricing. Why it is the default for long agentic sessions in 2026.
Atlas with Qwen3 Coder Plus: Agentic Coding on a 1M Window in 2026
Qwen3 Coder Plus in Atlas: a 1,048,576 token window at $1 / $5 per Mtok, post-trained for agentic coding, with ollama pull qwen3-coder:30b as the local counterpart.
Atlas vs Devin: AI Coding Agents Compared for 2026
Atlas and Devin offer distinct AI coding experiences in 2026. Atlas provides a terminal-native TUI with local control, while Devin is a cloud-managed engineer with SWE-1.7.
Atlas with DeepCoder 14B (Ollama): RL-Tuned for First-Attempt Diffs in 2026
DeepCoder 14B (Ollama) is a 9.0GB RL-tuned coder with a 128K context, built for first-attempt correctness. Free (self-hosted). Atlas setup and tradeoffs for 2026.
Atlas with Code Llama 7B (Ollama): A 3.8GB Local Coder in 2026
Code Llama 7B (Ollama) is Meta's 2023 code model at 3.8GB with a 16K context, Free (self-hosted). Atlas setup, the :code and :python tags, and 2026 tradeoffs.
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): the 2026 offline small_model slot
Llama 3.2 1B (local via Ollama) in Atlas: a 1.3GB CPU-friendly pull with a 128,000 token window, Free (self-hosted), best wired to small_model, not model.