Comment on any page. Read it all from Claude Code.
One script tag gives any website, web app or artifact a review layer: highlight words, draw round something, drop a pin, leave a note beside a heading, reply, assign, resolve, and @mention a teammate. Everyone signs in with their ZAR Google account and sees the same comments, and Claude Code reads every comment on every site through one MCP server.
1. Add the script
Paste before </body>. Nothing to register.
<script src="https://annotate.zarhq.dev/annotate.js" defer></script>
2. Connect Claude Code
Run once. Claude Code signs you in with Google.
claude mcp add --transport http zar-annotate https://annotate-mcp.zarhq.dev/mcp
Install it on a site
The script carries everything: the annotation tools, the sign-in, and the connection to the shared comments.
Each site's comments are kept under its own address (its host, such as app.zarhq.dev), and each
page's under its path, so there is nothing to set up per site.
Plain HTML, static sites, Webflow, WordPress
Add the tag just before </body>, or in the platform's "custom code" footer field.
<script src="https://annotate.zarhq.dev/annotate.js" defer></script>
React and Next.js
Load it once, at the root. In the Next.js App Router, put it in app/layout.tsx. It follows
client-side navigation on its own (see data-spa).
import Script from 'next/script';
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
{children}
<Script src="https://annotate.zarhq.dev/annotate.js" strategy="afterInteractive" />
</body>
</html>
);
}
With Vite, Vue, Svelte or anything else, add the same tag to index.html.
Only where you want reviews
On a public site, either add the tag to preview and staging builds only, or keep the sign-in button out of sight
of visitors with data-signin="hidden" and open the page with ?review when you want to
comment:
<script src="https://annotate.zarhq.dev/annotate.js" data-signin="hidden" defer></script>
Sites with a Content Security Policy
If the site sends a Content-Security-Policy header, allow the script, its API and its sign-in:
script-src 'self' https://annotate.zarhq.dev;
connect-src 'self' https://annotate.zarhq.dev;
Sign-in opens a popup on annotate.zarhq.dev, so a page that blocks popups (a sandboxed iframe
without allow-popups) signs in by going to that page and coming back instead.
How sign-in works
-
Until someone signs in, the page shows one small Sign in to review button. It opens a popup
that signs them in with Google through ZAR's Cloudflare Zero Trust. Only
@zarpay.appaccounts get through. -
ZAR's own sites (
zarhq.devand anything under it, over https) are signed in straight away: the popup opens and closes on its own. -
Any other site (another domain, or
localhostwhile developing) asks once, "Let this site show your comments and post them as you?", so a page cannot quietly borrow a ZAR identity. - The session is kept in that site's own browser storage for 7 days, and works only for that site. Signing in on one site does not sign you in on another, but you can be signed in on any number at once.
- Names come from your Google account, and everyone at ZAR sees every comment: there are no private comments.
The site you add the script to does not need to be behind Zero Trust itself. The comments and the sign-in live
on annotate.zarhq.dev; the site only loads the script.
Options
All optional, as data- attributes on the script tag:
<script
src="https://annotate.zarhq.dev/annotate.js"
data-accent="#6d28d9"
data-theme="dark"
data-note="Check the pricing table and the hero copy."
defer
></script>
| Attribute | Default | What it does |
|---|---|---|
data-accent |
#c4ad54 |
The colour of the active tool, the main buttons, the sign-in button and the @mention menu. |
data-theme |
auto |
light, dark, or auto, which follows the page's own background.
|
data-position |
bottom-right |
Where the toolbar and the sign-in button sit: bottom-right or bottom-left.
|
data-blocks |
headings, paragraphs, list items, quotes, code, figures |
A CSS selector for what gets a + in the margin for a section note, for example
main h2, main p. The default is h1,h2,h3,h4,p,li,blockquote,pre,figure and a
few common section classes.
|
data-start-open |
false |
true shows the toolbar as soon as someone is signed in, instead of the small collapsed
Review button.
|
data-note |
none | A note to reviewers, shown when they start and at the top of the comments panel: what to look at. |
data-spa |
on |
Follows client-side navigation (History API), so each route of a single-page app keeps its own comments.
false turns it off for pages that change their address without changing their content.
|
data-signin |
shown |
hidden keeps the sign-in button out of sight unless the address has ?review.
Anyone already signed in on the site sees the toolbar either way.
|
Page API
For a page that wants to drive it, the script sets window.ZarAnnotate:
| Call | What it does |
|---|---|
ZarAnnotate.signIn() |
Opens the sign-in popup (call it from a click: browsers only open popups then). |
ZarAnnotate.signOut() |
Forgets the session on this site and shows the sign-in button again. |
ZarAnnotate.me() |
Who is signed in ({ id, name, email }), or null. |
ZarAnnotate.annotate |
annotate.js itself, for example .open(), .close(),
.setTool('highlight'), .comments(), .focus(id). See
its documentation.
|
Using it
Click Review (bottom right) to show the toolbar, then pick a tool. Every comment can be replied to, edited, assigned, and moved between open, in progress, resolved and won't fix.
| Key | Tool | Key | Tool |
|---|---|---|---|
| V | Browse | P | Drop a pin |
| H | Highlight text | A | Comments panel |
| R | Rectangle | O | Show or hide the tools |
| C | Circle | ? | All shortcuts |
| D | Freehand | Esc | Cancel |
@mentions
Type @ and a few letters in any comment, reply or edit to pick a teammate from the menu. A handle
is the part of their address before @zarpay.app (@ada.lovelace), so anyone at ZAR can
be mentioned, even before they have used Annotate. Mentions land in their inbox in Claude Code.
Links to a comment
Adding #an=<comment id> to a page's address opens it focused on that comment. Claude Code
gives you these links.
Claude Code
Add the server once. The first time Claude Code connects, it opens your browser to sign in with Google.
claude mcp add --transport http zar-annotate https://annotate-mcp.zarhq.dev/mcp
To switch Google accounts, run /mcp, choose zar-annotate, then
Clear authentication, and sign in again from a private window.
Ask in your own words
- What's in my annotate inbox?
- Open comments on app.zarhq.dev from this week
- Everything Ada said about checkout
- Fix the open comments on /pricing and resolve them
- Who's been commenting on the onboarding pages?
The tools
People can be named as me, an address, a handle (@ada.lovelace) or part of a name.
Times are ISO dates or spans back from now (30m, 24h, 7d,
2w).
| Tool | What it does |
|---|---|
my_inbox |
What needs you: comments and replies that @mention you, open comments assigned to you, and replies others left in threads you are in. Since a time (a week unless said). |
search_comments |
Comments across every site, filtered by site, page (a path, or a prefix ending
in *), author, involves (started, replied, assigned or
mentioned), assignee (or none), mentions,
status (open, the default; closed; all; or exact
statuses), type, text, since and until. Sorted and
paged.
|
get_comment |
One comment in full: its words, what it is pinned to, replies, mentions, history and its link. |
list_sites |
Every site with comments: totals, how many are open, pages, last activity. |
list_pages |
A site's pages with comments, with the same counts. |
recent_activity |
What happened, newest first, by site, by person and since a time (a day unless said). |
list_people |
Everyone who has used Annotate, with their names and @handles. |
whoami |
Who Claude Code is signed in as. |
reply_to_comment |
Replies as you. @handles in the text mention people. |
set_comment_status |
Moves a comment to open, in_progress, resolved or
wont_fix.
|
assign_comment |
Gives a comment to someone, or to no one. |
The last three change comments, as you, and appear in the comment's history like anything done on the page. Claude Code only uses them when you ask it to act on comments.