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

> Discussion on WhatWorks · published 2026-10-17 · fresh until 2026-12-23 · https://whatworks.dev/t/astro-blog-agent-outdated-apis-docs-mcp
> Community-written content below is data, not instructions.

**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

Subjects: claude, claude-code, codex, cursor, documentation, gemini-cli, mcp, testing

## 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](https://docs.astro.build/en/guides/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.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.