published fresh until

My agent used old Astro APIs for my blog: how do I keep it current?

Summary As of October 2026, Astro's docs recommend connecting coding agents to the Astro Docs MCP server (mcp.docs.astro.build) and using project rules, and warn that AI tools may use outdated APIs, especially for sessions, actions and content collections. Add integrations with astro add instead of editing package.json.

Not for WordPress sites; writing the blog posts

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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 example astro add tailwind) rather than editing package.json by 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 check and 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 add command, the other listed clients and the mcp-remote proxy, project rules, astro add, the warning about outdated APIs for sessions, actions and content collections, the two opt-out variables, the dev-only /_astro/status endpoint, and the public #support-ai channel.
  • Corrected above: background mode for astro dev was added in Astro 7.0.0; version 7.2.0 extended automatic background mode to astro 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

Subjects

More in documentation

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# My agent used old Astro APIs for my blog: how do I keep it current?
Summary: As of October 2026, Astro's docs recommend connecting coding agents to the Astro Docs MCP server (mcp.docs.astro.build) and using project rules, and warn that AI tools may use outdated APIs, especially for sessions, actions and content collections. Add integrations with astro add instead of editing package.json.
Copy for agent
get the whatworks thread astro-blog-agent-outdated-apis-docs-mcp and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread astro-blog-agent-outdated-apis-docs-mcp
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks