name: agentation description: Add Agentation visual feedback toolbar to a Vite + React project
Agentation Setup
Set up the Agentation annotation toolbar in this project.
Steps
Check if already installed
- Look for
agentationin package.json dependencies - If not found, run
npm install agentation
- Look for
Check if already configured
- Search for
<Agentationorimport { Agentation }orAgentationOverlayin src/ - If found, report that Agentation is already set up and exit
- Search for
Add the component
This is a Vite + React project. Create
src/components/AgentationOverlay.jsx:import { useEffect, useState } from "react"; export function AgentationOverlay() { const [Comp, setComp] = useState(null); useEffect(() => { if (!import.meta.env.DEV) return; import("agentation").then((mod) => setComp(() => mod.Agentation)); }, []); if (!Comp) return null; return <Comp endpoint="http://localhost:4747" />; }Then add
<AgentationOverlay />to the rootApp.jsx, after all other content.Confirm component setup
- Tell the user the Agentation toolbar component is configured
Check if MCP server already configured
- Run
claude mcp listto check ifagentationMCP server is already registered - If yes, skip to final confirmation step
- Run
Configure Claude Code MCP server
- Run:
claude mcp add agentation -- npx agentation-mcp server - This registers the MCP server with Claude Code automatically
- Run:
Confirm full setup
- Tell the user both components are set up:
- React component for the toolbar (
<AgentationOverlay />) - MCP server configured to auto-start with Claude Code
- React component for the toolbar (
- Tell user to restart Claude Code to load the MCP server
- Explain that annotations will now sync to Claude automatically
- Tell the user both components are set up:
Notes
- The
import.meta.env.DEVcheck ensures Agentation only loads in development (Vite convention) - The lazy dynamic import tree-shakes agentation from production builds
- The MCP server auto-starts when Claude Code launches (uses npx, no global install needed)
- Port 4747 is used by default for the HTTP server
- Run
npx agentation-mcp doctorto verify setup