Add visual feedback to your Next.js app.
Load pinthread with next/script in your root layout. Your team pins comments to real elements in the running app, and your coding agent reads them over MCP.
01 · Create a project
Sign up free with Google and create a project in the dashboard. Its Install tab shows the tag with your project key filled in. The Free plan costs $0 a month.
No Next.js app yet? Start one:
npx create-next-app@latest my-app02 · Add the script tag
app/layout.tsx
import Script from "next/script";
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>
{children}
<Script
src="https://pinthread.dev/embed.js"
data-project="YOUR_PROJECT_KEY"
/>
</body>
</html>
);
}Put the <Script> in the root layout, so it loads once for every route. Client-side route changes keep the widget, and pinthread shows the comments of the new page.
pages/_app.tsx
import type { AppProps } from "next/app";
import Script from "next/script";
export default function App({ Component, pageProps }: AppProps) {
return (
<>
<Component {...pageProps} />
<Script
src="https://pinthread.dev/embed.js"
data-project="YOUR_PROJECT_KEY"
/>
</>
);
}Put the <Script> in pages/_app.tsx. Every page renders through it.
Replace YOUR_PROJECT_KEY with the key from the Install tab. The key is public: it only tells the widget which project to load.
03 · Check that it works
Run npm run dev and open the app on localhost. The pinthread button shows at the edge of the page, and the project’s Install tab changes from waiting to installed. Click the button, sign in, and pin a comment to any element.
Pages on localhost and 127.0.0.1 load pinthread for every project. For a deployed site, add its address under the project’s Settings.
Troubleshooting
Two pinthread buttons appear
The tag is in more than one layout. Keep it only in the root layout or in _app.tsx.
The button shows locally but not on Vercel
Add the deployment address, such as https://my-app.vercel.app, under the project’s Settings. Local addresses work without this step.
You want feedback on previews only
Render the tag only when NEXT_PUBLIC_VERCEL_ENV is not production. The configuration page shows the code.
Connect your coding agent
pinthread is also an MCP server. Claude Code, Cursor, or Codex can read every comment with its page and element, make the change, and reply in the thread.
Questions
Does pinthread work with the Next.js App Router?
Yes. Add next/script to app/layout.tsx. The widget stays loaded when the router changes pages, and it shows the comments for the new URL.
Does pinthread slow down my Next.js pages?
No. next/script loads the widget after the page becomes interactive, so it does not block rendering. The widget code loads from pinthread.dev.
Can I use pinthread with Next.js on Vercel?
Yes. pinthread works on any host. Add each deployment address in your project's Settings, or load the tag only on preview builds.