The package comes with an MCP server. Your agent asks it for the open comments and gets each one with the file and line behind the element it points at, so it goes straight to the code. Once a change is made, it marks the comment resolved, and reviewers see it resolved. Comments left on your previews come with the rest: nobody has to fetch them first.
If you set ontrackd up with npx @ontrackd/feedback init, it has already registered the MCP server itself: with Claude Code when it is installed, with Cursor and VS Code when the repository has their folder, and as a printed line for any other agent.
Give the app its secret
Copy the project’s secret from its Setup tab in the dashboard, and add it to
.env.localin the app that has the package, next to your other variables:FEEDBACK_SECRET=sk_prj_…Keep the file out of git. The secret is all your agent needs to fetch the comments left on your previews. Or run
feedback linkinstead: it signs you in by email and saves the secret for you.Add the MCP server
Run this inside the same app:
$
npx feedback-mcp init$
pnpm exec feedback-mcp init$
yarn feedback-mcp init$
bunx feedback-mcp initIt prints the line to give your agent, with this project’s paths filled in. Paste it as it is: what it prints is below. You do this once.
Ask for it
Tell your agent, in your own words or these:
Use the feedback MCP: get the open feedback as a work order, make the changes, and resolve each comment when it is done.
It gets each comment with the lines to read and change, and the components and styles involved, so it does not have to search for them. Then it edits, and resolves each comment it changed.
What init prints
A command for Claude Code, and the config other clients read.
claude mcp add feedback -- node …/dist/mcp/cli.js --root …In .cursor/mcp.json:
{
"mcpServers": {
"feedback": { "command": "node", "args": ["…/dist/mcp/cli.js", "--root", "…"] }
}
}It runs the copy of the package installed in your project, so starting it needs no token.
What your agent can do
| Tool | What it does | Parameters |
|---|---|---|
list_feedback |
The comments, each with the file and line it points at, its component, status and reply count. | status (open, resolved or all; open by default), file, route, project |
get_feedback_tasks |
The work order: which lines to read and change, and the components and styles involved. | comment_ids (every open comment when left out), project |
resolve_feedback |
Marks a comment resolved once its change is made. Reviewers see it resolved. | id, reopen (true moves it back to open), force |
search_feedback |
Finds comments by their text, route, file, component or author. | query, status, limit, project |
get_feedback_context |
The app’s project, branch and session. | project |
resolve_feedback takes only ids the server has shown in a list, a search or a work order, unless force is set, which is for when you ask for it. The MCP tools reference has every parameter.
Comments from your previews
Each time your agent reads the comments, the server also fetches what reviewers left on your previews, at most every 20 seconds. Comments left on your dev server are there already. If a fetch fails, the tool’s answer says why, and still shows the comments the server has.
Preview comments are not included when:
- The app has no secret. Add
FEEDBACK_SECRETto.env.local, as in the first step. The server reads it from the environment first, then.env.local, then.env, then whatfeedback linksaved. When the list comes back empty, its answer says how to add the secret. FEEDBACK_CLOUD_SYNCis0. That keeps the app local, on purpose.
In a monorepo
Run feedback-mcp init in any one app: it finds the others and prints one server for all of them. Add it from the repository root, so paths read from there. Each tool then takes an optional project to narrow it to one app. Each app reads its secret from its own .env.local.
Without an agent
You can get the same comments without an MCP server.
- On your dev server, open the panel from the bar. Copy task list, at its foot, copies a work order for an agent and saves it in
.feedback/tasks/. - From your previews, run
feedback pullin the app: it fetches the comments, with the secret from the first step, so your dev server’s panel and its task list include them.
$ npx feedback pull$ pnpm exec feedback pull$ yarn feedback pull$ bunx feedback pull