live-comments
Real-time comments on any site, pinned to the elements of the page. You and your team comment, Claude Code reads them, fixes the code and resolves the comments while you watch.
Create the project
A project is your comment space. Only people with the project code can see and write its comments.
Comments travel through Liveblocks, on your own free account, and the data stays yours. Before filling in the form, take three steps.
- Create an account on liveblocks.io. It already creates a project for you.
- In the dashboard open the project, then API keys.
- Copy the Secret key, the one starting with
sk_.
Add the script to your site
Paste the script before </body>. It works on any site, from a plain HTML page to React, Next.js, Vue or Webflow, even locally on localhost.
The easiest way is to ask Claude Code.
Add this script to the site, loaded on every page, only in development and previews. The script is this [paste the script here]The script contains the project code, and anyone who reads it in the page source could get into the comments. That’s why it stays out of production. If you need it on the public site, have it load only with a URL parameter that only your team knows.
Reload the page and the dark bar appears at the bottom right. Type your name and you’re in.
Connect Claude Code
Open the Terminal and paste the command from step 1. You do it once, and it works for every session.
claude mcp add --transport http live-comments https://live-comments-ashy.vercel.app/api/mcp --header "X-LC-Key: project:code"To check, open Claude Code and type /mcp. live-comments should show up as connected. If you have more than one project, use a different name for each (instead of live-comments type, for example, rossi-comments).
Comment
| CommentC | Click an element on the page and type. The comment stays pinned to that element even if the page changes. |
|---|---|
| @ Ask Claude | Type @Claude in the comment or in a reply, and Claude picks it up first. |
| Send⌘Enter | On Windows Ctrl Enter. |
| List | The icon with the number opens the comment list, with the filters to do, resolved and mine only. |
| PauseP | Stops the page’s animations, so you can comment on an element that moves. |
| HideH | Hides the pins so you can look at the clean page. |
| Copy | Copies the open comments as markdown, to paste into an agent that doesn’t use live-comments. |
| Minimize | The dash on the right shrinks the bar to an icon. Click the icon to open it again, drag it to move it. |
Anyone on the same page with the same project sees comments, replies and cursors live. Each page has its own comments.
Put Claude to work
In Claude Code, in your site’s folder, paste this and change the address to your page’s:
Work on the live-comments comments on http://localhost:3000/ . For each open comment: lc_start, fix the code, then lc_resolve explaining in one line what you did. If a comment shouldn't be done or isn't clear, lc_dismiss with the reason. When there are none left, keep listening with lc_watch and repeat, until I tell you to stop.On the page you’ll see Claude appear among the connected people, its cursor on the comment it’s working on and its replies in the threads.
Claude only works while a Claude Code session is open and listening. If you close Claude Code, the comments stay there and it picks them up next time.
If something goes wrong
| The bar doesn’t show up | Check that the script is on the page and that project and code are right. The browser console says “mancano data-project e data-code” (data-project and data-code are missing) if it can’t find them. |
|---|---|
| “Liveblocks non accetta questa chiave” (Liveblocks doesn’t accept this key) | You copied the Public key (pk_) or an incomplete key. You need the Secret key, the one starting with sk_. |
| Grey dot in the bar | It can’t connect, usually because the code is wrong or there’s no connection. |
| Claude can’t find the comments | The address you give it must be the page’s, including the path (/pricing and / are different pages) and the port (localhost:3000). |
/mcp says “not connected” | Run the command from step 3 again, with project and code separated by a colon, no spaces. |