Let your coding agent set it up
Copy one prompt into Claude Code, Cursor or Codex to install the feedback tool and widget, wire context, and open a pull request.
PreviewView as Markdown
Paste the prompt below into your coding agent (Claude Code, Cursor, Codex or similar) from the root of your repository. It installs the SDKs, wires trusted context, adds a kill switch and opens a pull request for you to review. It does not deploy anything.
You need a server key (mlp_sk_…) and, for web apps, a publishable key (mlp_pk_…). Don’t paste keys into the prompt; the agent will reference environment variables.
The prompt
Add Most Loved Product feedback to this repository and open a pull request. Do not deploy.
Docs: https://mostlovedproduct.com/llms-full.txt
1. Find our MCP server. If it uses the official MCP TypeScript SDK, install @mostlovedproduct/mcp
and call registerFeedbackTool(server, { key: env.MLP_SERVER_KEY, product: "<Product>", profile: "proactive" }).
If it is a hand-written JSON-RPC handler, create a handler with createFeedbackHandler(...), add handler.tool to tools/list and route
tools/call for handler.tool.name to handler.call(args, callInfo).
2. Use profile "conservative" instead if this server is listed in ChatGPT or Claude's app directory.
3. Pass trusted context from the server, never from the model: trust ("authenticated" when the caller
is signed in, otherwise "anonymous"), our own opaque user id and plan, app version and env, and any
experiment flags we already compute. Never pass emails, names or conversation text.
4. Add an enabled() kill switch read from an env var named FEEDBACK_KILL_SWITCH, and give the tool
its own rate-limit bucket if this server has rate limiting.
5. If this repo has a web front end, install @mostlovedproduct/web and call init({ key: <publishable key env var>,
user, flags, app }) once on the client, using the same opaque user id.
6. Read MLP_SERVER_KEY and the publishable key from environment variables or our secrets setup. Add
them to .env.example with empty values. Never commit real keys.
7. Add a short note to the README on how to turn feedback off.
8. Open a pull request titled "Add agent and user feedback (Most Loved Product)" summarising what
changed and listing the environment variables to set.
What to check in the pull request
- The tool name is
submit_feedbackand the description was not rewritten. - Context comes from your server’s request info, not from tool arguments.
- No keys are committed.
.env.examplehas empty values. - The kill switch works: set
FEEDBACK_KILL_SWITCH=1and the tool still answers, with “could not be recorded”. - For directory-listed servers, the profile is
conservative.
Agent-readable docs
Coding agents can read everything here as plain text:
- /llms.txt: index of the docs
- /llms-full.txt: every docs page in one file
- Every docs page as Markdown, for example /docs/mcp.md
Something wrong or missing on this page?