Add Agentation visual feedback toolbar to a Next.js project
Set up the toolbar and, when requested, connect it to the user's coding agent. A visible toolbar and a healthy MCP server do not prove that browser feedback reaches the agent. Verify that final step before calling setup complete.
Inspect the project
agentation and an existing <Agentation> mount before installing.endpoint and current MCP setup. Do not
exit just because the component exists, and do not add a duplicate mount.agentation if missing, using the existing lockfile's package manager.Choose the connection mode from the request
http://localhost:4747; preserve an existing
custom port or proxy URL. Never assume the browser and agent use the same
machine when the project is remote.endpoint and explain that feedback remains
in this browser. Do not silently enable a server connection.Add or update the component
For a Next.js App Router project, render in the root layout's body after
children. For Pages Router, render after Component in pages/_app.
Preserve any existing callbacks and options.
import { Agentation } from "agentation";
// Use the actual server URL selected above for MCP sync:
{process.env.NODE_ENV === "development" && (
<Agentation endpoint="http://localhost:4747" />
)}
The package provides its own client boundary. Keep the application's root layout server-rendered unless the project has another reason to change it.
Configure the agent when MCP was requested
server subcommand:
npx -y agentation-mcp server.npx add-mcp "npx -y agentation-mcp server" is one
setup option. For Claude Code, use
claude mcp add agentation -- npx -y agentation-mcp server or the init wizard.Verify the complete connection
npx agentation-mcp doctor for service diagnostics. For a custom URL,
use doctor --http-url <url> when supported by the installed version.agentation_get_all_pending or session-scoped tools.