astrotation
Visual feedback for AI coding agents on Astro sites, providing live annotations with source file:line, CSS selector, Tailwind classes, and computed styles.
README
Astrotation
Visual feedback for AI coding agents on Astro sites. Annotate elements
right on your dev page; agents (Claude Code etc.) receive annotations live
over MCP — with the exact Astro source file:line, CSS selector, Tailwind
classes and computed styles attached.
Dev-only. Nothing ships to production builds.
Why Astro-native
file:lineprecision. Astro dev stamps elements withdata-astro-source-file/data-astro-source-loc— annotations point at the component source line, no selector guessing.- One process. The Astro integration hosts both the toolbar UI (Dev Toolbar app) and the MCP server inside the dev server. No separate CLI, no CORS, no extra ports to babysit.
- Live both ways. Agent finishes a fix → the pin turns red (◆ feedback, "review me") in your overlay; you resolve it green after checking. Agent asks a question → you reply in the overlay.
Install
npm install -D astrotation
// astro.config.mjs
import { defineConfig } from 'astro/config';
import astrotation from 'astrotation';
export default defineConfig({
integrations: [astrotation()],
});
Register the MCP server once (any project, same port):
claude mcp add --transport http astrotation http://localhost:7133/mcp
Use
npm run dev, open the site, click the ⊕ Astrotation icon in the Astro dev toolbar.- Hover an element (press
↑/↓to select its parent/child for pixel-exact targeting) → click → type a note at the❯prompt → Enter. Pin appears. - Tell your agent to check the annotations — or put it in hands-free mode: "call astrotation_watch in a loop; for each annotation: acknowledge, fix, hand back with astrotation_feedback + a summary".
- Pins recolor live: ○ open → ◑ in progress → ◆ feedback ("done, review me"). You review the change and hit resolve in the panel (✓ green) — or reply with more notes and the agent iterates. Agent questions show in the annotation thread; reply inline. Hit clear done to tidy resolved/dismissed pins.
MCP tools
| Tool | Purpose |
|---|---|
astrotation_list |
All annotations (filter by status, page) |
astrotation_get |
One annotation, full detail (thread, source, styles, outerHTML) |
astrotation_watch |
Block until new annotations/replies, return batch |
astrotation_acknowledge |
Mark as being worked on |
astrotation_feedback |
Hand a finished fix back for review, with a summary (agent's terminal action — resolving is yours, in the overlay) |
astrotation_dismiss |
Decline with a reason |
astrotation_reply |
Ask the owner a clarifying question |
astrotation_clear |
Bulk-remove annotations by status (default: resolved+dismissed) |
Options
astrotation({
port: 7133, // MCP HTTP port
file: '.astrotation/annotations.json', // store, relative to project root
})
Add .astrotation/ to your .gitignore (session artifacts, not source).
Annotation payload
{
"id": "a1b2c3d4",
"page": "/", "url": "http://localhost:4321/", "viewport": "1440x900",
"element": "p",
"selector": "section#hero > div > p",
"sourceFile": "src/components/Hero.astro", "sourceLoc": "49:8",
"classes": "max-w-xs",
"section": "Hero", // nearest heading — where on the page
"role": null, // explicit role / aria-label if present
"styles": "display: block; font-size: 14px; …",
"text": "Senior product designer across…",
"selectedText": null,
"outerHTML": "<p class=\"max-w-xs\">Senior product designer…</p>",
"box": { "x": 980, "y": 620, "w": 320, "h": 120 },
"comment": "make this column wider",
"status": "pending",
"thread": []
}
License
MIT © Dmytro Karpushyn
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.