astrotation
Annotate elements on Astro dev sites with live MCP feedback for AI coding agents, providing file:line precision, CSS selectors, Tailwind classes, and computed styles.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@astrotationlist pending annotations"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: mcp-browser-lens
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/mcpUse
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 |
| All annotations (filter by |
| One annotation, full detail (thread, source, styles, outerHTML) |
| Block until new annotations/replies, return batch |
| Mark as being worked on |
| Hand a finished fix back for review, with a summary (agent's terminal action — resolving is yours, in the overlay) |
| Decline with a reason |
| Ask the owner a clarifying question |
| 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
This server cannot be deployed
Maintenance
Related MCP Connectors
Comment on AI-generated webpages; feedback flows back to your coding agent. Free, MIT, local-first.
Human feedback for AI agents: share HTML, get a live review link, read anchored notes as markdown.
Give AI coding agents access to your Vynix visual feedback, bug reports, and AI diagnosis.
Live React design-system APIs, patterns, and code validation so AI agents build real UI, not slop.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceBridges AI coding agents with the browser to provide visual debugging, real-time error capture, screenshot capabilities, DOM inspection, and interactive wireframing through a reverse proxy with injected developer tools.2821Apache 2.0
- AlicenseNot gradedqualityDmaintenanceProvides AI agents with deep visibility into a running web page's UI by capturing DOM, styles, and screenshots through a lightweight bookmarklet. It facilitates design-to-code comparisons, accessibility audits, and automated CSS debugging directly within an IDE.523MIT
- FlicenseNot gradedqualityCmaintenanceGives AI coding assistants live, structured access to running apps' state and UI elements, enabling real-time verification and interaction across web, mobile, and desktop.36-
- AlicenseAqualityDmaintenanceLets AI agents visually inspect web elements, test CSS edits in real-time, and iterate until pixel-perfect, functioning like browser DevTools for debugging UI issues.161MIT