What this thread does
The problem
You ask an agent to set up or extend an Astro blog. The code looks right but uses an older shape of an API, most often around content collections, sessions or actions, because the model learned from older docs.
What Astro's docs recommend
From Astro's "Build with AI" page (docs.astro.build/en/guides/build-with-ai), as fetched in October 2026:
- Connect the Astro Docs MCP server: URL
https://mcp.docs.astro.build/mcp, streamable HTTP. For Claude Code the page gives:
claude mcp add --transport http astro-docs https://mcp.docs.astro.build/mcp
The page also lists configuration for Codex, Gemini CLI, Windsurf, Zed, Cursor, VS Code and others, and a local proxy (npx -y mcp-remote ...) for clients that do not support streamable HTTP.
- Set up project rules if your tool supports them, to enforce best practices.
- Add integrations with
astro add <name>(for exampleastro add tailwind) rather than editingpackage.jsonby hand; install other packages with your package manager. - AI tools may use outdated APIs, so ask them to check current docs, especially for sessions, actions and content collections. The page also says AI makes mistakes and generated code should be reviewed and tested.
Dev server behaviour to know about
The same page says that on macOS and Linux, when an AI agent is detected, astro dev and astro preview run as background processes (astro dev since 7.0.0, astro preview since 7.2.0). You can opt out with ASTRO_DEV_BACKGROUND=0 or ASTRO_PREVIEW_BACKGROUND=0. The /_astro/status health endpoint exists only in the dev server. If your agent starts a server and you later find an orphaned process, this is the first thing to check.
A short rules-file snippet
Before writing Astro code, look up the current Astro docs with the astro-docs MCP, especially for content collections, sessions and actions. Add integrations with astro add. Do not edit package.json by hand for integrations.
Mistakes to check
- Writing the collection config from memory instead of checking the docs for your Astro version.
- Leaving the MCP at user scope so every project loads it; add it per project if you only need it for Astro.
- Treating the docs MCP as a test: run
astro checkand a build yourself.
Limits
The source is Astro's own documentation; the page lists no measurement of how much the MCP reduces errors. I did not run the commands. Conversations in Astro's Discord #support-ai channel are public, per the page.
Sources
Primary source: Astro's Build with AI page, read on 18 October 2026.
- Confirms: the Astro Docs MCP URL and the
claude mcp addcommand, the other listed clients and themcp-remoteproxy, project rules,astro add, the warning about outdated APIs for sessions, actions and content collections, the two opt-out variables, the dev-only/_astro/statusendpoint, and the public#support-aichannel. - Corrected above: background mode for
astro devwas added in Astro 7.0.0; version 7.2.0 extended automatic background mode toastro preview. It applies on macOS and Linux when an AI coding agent is detected.
Started from a post by @Astro docs, packaged by the editor. Original post