Skip to content
/
All docs pages

Reference

pinprompt MCP server

Coding agents pick up feedback at /api/mcp. It's a remote MCP server over Streamable HTTP, and it's stateless: each request is served by a fresh server instance, with no sessions.

  • Protocol: 2026-07-28 natively, and 2025-era Streamable HTTP clients (Claude Code, Cursor, the v1 SDK) through the SDK's stateless fallback. Both come from one handler (mcp-handler 2.3 on @modelcontextprotocol/server 2.3).
  • Auth: OAuth sign-in, or Authorization: Bearer pp_….
  • OAuth is the easy way: the MCP client registers itself, you click Allow in the browser, and it gets a 1-hour access token (pp_at_…) plus a rotating refresh token. On the consent page the person picks All my projects (the default for anyone with a non-client role: the token acts as them in every project they're on, with the setup tools on top) or One project, as an agent (pick the project and agent; the token then behaves exactly like that agent's pasted token).
  • Agent tokens (pasted) are scoped to one project. Create one in Project settings → Team → Agents.
  • User tokens also work and act as that person, across all of their projects. The write tools need a role with item.claim (developer or above).
  • One connection, many projects: list_projects and use_project are on every connection. On a person's connection (All my projects, or a user token) use_project stores the picked project on the connection, checked again on every call; list_feedback, get_project, create_feedback (and the setup tools' optional project) use it when no project is passed. Item-key tools never need it. A pick the person no longer reaches is cleared and the next answer says so; create_feedback and setup tools then refuse rather than fall back to another project. Messages written on a person's connection carry meta.viaApp (the sign-in's app name, or token <name> for a pasted user token), shown to the team and clients. Agent connections stay on their one project. Code: packages/core/src/services/mcp-projects.ts.
  • A missing or unknown token gets 401 with WWW-Authenticate: Bearer realm="pinprompt", resource_metadata="<base>/.well-known/oauth-protected-resource/api/mcp", which is how clients find the OAuth server.

Agent kit (Claude Code plugin, Cursor rule, AGENTS.md)

The quickest way to connect is the kit in [`integrations/`](../integrations/README.md). Project settings → Agents → Connect an agent shows each setup filled in with this server's URL.

  • Claude Code plugin (integrations/claude-code, marketplace at the repo root):
  claude plugin marketplace add veren-tech/pinprompt
  claude plugin install pinprompt@pinprompt --config pinprompt_url=https://pinprompt.example.com

It adds the MCP server (OAuth sign-in by default; a pasted token from ~/.config/pinprompt/token if present), the pinprompt-fix skill with the whole loop, /pinprompt:next, /pinprompt:fix <KEY>, /pinprompt:review, and a hook that denies creating a PR whose title lacks the claimed item's key.

  • Cursor: integrations/cursor/mcp.json → .cursor/mcp.json, integrations/cursor/rules/pinprompt.mdc → .cursor/rules/.
  • Anything else: integrations/AGENTS.md, a snippet for the repo's AGENTS.md or CLAUDE.md.

Every variant runs the same loop: list_feedback (mine: true first, to resume an item whose reporter answered) → get_spec, get_evidence screenshot and network (for bugs, or when the spec has a Network and console section) → claim_feedback (keep its spec_version) → ask_reporter and stop when unclear → fix → get_playwright_test, pass it locally and on the preview → branch pinprompt/<KEY>-<slug>, PR title <KEY>: <title> → attach_run with pr_title and spec_version → get_checks once CI ran. Review agents start with get_project for the URLs they may file on. Never merge; only people reach Done.

Connect Claude Code (OAuth, no token)

claude mcp add --transport http pinprompt https://pinprompt.example.com/api/mcp

Then run /mcp in Claude Code, pick pinprompt and choose Authenticate. A browser opens on pinprompt (sign in with the magic link if you aren't already). The consent page shows the app's name and where it sends you back (127.0.0.1:<port>, an app on your computer). Pick the project and either an existing agent or New agent… (for example "Claude Code on Victor's laptop"), then click Allow access. Claude Code finishes sign-in and refreshes the token by itself from then on.

You need a role that may manage agents on that project (developer or owner). The connection shows under Project settings → Agents → Connected apps, with when it was last used, and Disconnect ends it at once. Revoking the agent's token there disconnects its apps too.

Connect claude.ai (custom connector)

Settings → Connectors → Add custom connector, URL https://pinprompt.example.com/api/mcp, no client ID or secret. claude.ai registers itself, opens the same consent page (it sends you back to claude.ai), and keeps the connection fresh. It needs a public HTTPS URL, so this works once pinprompt is hosted, not against localhost.

Cursor and other clients that implement MCP authorization work the same way: add the URL, sign in when asked. Clients must use an https or loopback (http://127.0.0.1:…) redirect; custom schemes such as cursor:// are refused.

For OAuth, PINPROMPT_BASE_URL must be the URL clients use: tokens are bound to <PINPROMPT_BASE_URL>/api/mcp (RFC 8707) and every metadata URL is built from it, never from the request's Host.

EndpointWhat
GET /.well-known/oauth-protected-resource/api/mcpRFC 9728 resource metadata (also at /.well-known/oauth-protected-resource)
GET /.well-known/oauth-authorization-serverRFC 8414 server metadata
POST /api/oauth/registerRFC 7591 dynamic registration, public clients (token_endpoint_auth_method: none)
GET /api/oauth/authorizeCode flow with PKCE S256 and resource; parks the request and opens /oauth/consent
POST /api/oauth/tokenauthorization_code (60 s single-use codes) and refresh_token (rotating; reuse revokes the connection)
POST /api/oauth/revokeRFC 7009; revoking a refresh token ends the whole connection

Set up projects from Claude (admin mode)

On the consent page, All my projects (workspace owners and anyone with a non-client role; the default) connects the app as the person instead of an agent. Those connections get ten setup tools on top of the ones below (which include list_projects and use_project): get_project_settings, get_workspace, create_project, update_project (site URLs, network capture, review script, preview_hosts such as a Sanity Studio, stricter masking, repo, Figma, CMS, rules, setup done), invite_people (no owners, ≤10, links are emailed and never returned), change_role (members or pending invites; not to or from owner), cancel_invite, edit_brief, set_evidence_retention (longer only) and check_fix_setup. Definitions: packages/spec/src/mcp-admin.ts; handlers: apps/web/src/server/mcp/admin-tools.ts, which call the same core services as the settings pages, so roles apply as usual.

The services refuse, for these connections only, what deletes, lowers protection, costs money or needs a secret, with a link to the settings page: deleting or archiving projects or feedback, removing people, owner changes, agent tokens, turning on fix rounds or raising their cap, CI files, production feedback, lower masking, skipping spec approval, shorter retention. Connecting integrations has no tool. Every change carries viaApp: <app name> in its event and shows in Activity. People see and disconnect these connections, and the project each is working in, under Account → Apps connected as you. Guide: Set up from Claude.

Connect Claude Code with a pasted token

claude mcp add --transport http pinprompt http://localhost:3000/api/mcp \
  --header "Authorization: Bearer pp_…"
claude mcp list          # pinprompt: http://localhost:3000/api/mcp (HTTP) - ✓ Connected

Add --scope project to write it to the repo's .mcp.json so the whole team gets it. Each person then puts their own token in the header, for example "Authorization": "Bearer ${PINPROMPT_TOKEN}", with the token in their environment.

Other clients (Cursor, Windsurf, Claude Desktop through mcp-remote) take the same URL and header.

Tools

ToolInputWhat it does
list_feedbackstatus? (default agent_ready, or open; with mine, default open), kind?, priority?, limit (1–50, default 20), cursor?, mine?One line per item, highest priority first, then oldest first: FB-1188 design P2 "ProductCard spacing on tablet" /collections/single-origin. With open or mine, each line also shows its status and assignee. mine: true keeps only items you're assigned, have a live run on (claimed or PR attached; released runs don't count) or asked the reporter about, unless a person has since assigned the item to someone else. A line where you asked something ends with · waiting on the reporter (1 open question), · reporter answered, 1 question still open, or · reporter answered: claim_feedback again (answered since your last claim: answered items go back to Agent ready and the claim lapses), and the result then says which item to re-claim. · reassigned: not yours to work on marks one a person gave to someone else. When more items match, the result ends with next_cursor: <cursor>; call again with cursor set to it for the next page (the last page has no next_cursor). Cursors are opaque, stable when items are filed between calls, and a cursor the server didn't issue is an isError result. Callers that never send cursor see the same first page as before.
get_specidThe rendered agent prompt (Where: file:line, selector, URL, breakpoint; Observed; In the reporter's own words: the note exactly as pinned, with contact details and secrets scrubbed, fenced as untrusted, left out when it matches Observed; Expected; Done when; Constraints; Project notes; When done), then the feedback-spec/v1 JSON. If you asked the reporter something, a third block gives your last question, the answer (fenced as untrusted reporter text, also folded into the spec), whether it's new since your last claim, and either "Re-claim needed: … Call claim_feedback" (only for an answer newer than your last claim), "It's in 'Agent ready': claim_feedback … before you work on it", "No re-claim needed", "Still in 'Question'", that a person assigned it to someone else, or that it left the agent queue. The answerer's name is cleaned to one line.
get_evidenceid, kind (screenshot default, styles, dom, console, transcript, network)A screenshot comes back as an MCP image block (base64 + mimeType). Other kinds come back as text. network is the page's requests and console errors in the two minutes before the report, failed and slow first, redacted. When there's no blob for that kind, it falls back to the spec's dom_snippet or console_errors, or says what evidence exists.
claim_feedbackidClaims an agent-ready item and opens a run: "Claimed FB-1188 (run run_…, spec version 2)", plus a spec_version: 2 line to pass to attach_run. The version is also recorded on the claim. Claiming again with the same agent changes nothing and returns the version recorded at the first claim; if the spec was re-drafted since, it adds "The spec changed since you claimed: it's at version 3 now. get_spec(…)". If another agent holds it, you get isError: "FB-1188 is already claimed by Claude Code. …" After the reporter answers a question you asked, the item stays yours: an agent stays assigned, and a person connected through All my projects keeps it for 30 minutes, during which anyone else claiming it gets "FB-1188 is held for <you>, which asked the reporter and is going on with the answer. Anyone can claim it in N minutes."
post_updateid, messageAdds a progress note to the item's thread.
ask_reporterid, question, options (≤4)Asks the reporter. The item moves to Question until they answer.
attach_runid, pr_url, preview_url?, branch?, summary?, pr_title?, spec_version?Attaches the PR to your claimed item, which moves it to To check so the reporter verifies on the preview. Never merge. It warns but never refuses: Warning: The PR title doesn't contain FB-1188. … when pr_title lacks the key, and Warning: The spec changed since you worked from version 2: it's now version 3. … when spec_version (or, if you don't send it, the version recorded at claim) is behind the item's, and Warning: FB-1188 has no spec version 9: … (code spec_version_unknown) when it's ahead. runs has no title column, so the title, the version and the warning codes go on the run's thread message (meta.prTitle, meta.specVersion, meta.warnings) and the item.run_attached event.
release_feedbackid, reasonGives a claimed item back to Agent ready, with the reason in the thread.
create_feedbacktitle, kind, priority? (default P2), url, selector?, source? (file:line), observed, expected, acceptance (1–10 strings), evidence_note?, force?Files a finding as a new item in the agent's project, with the agent as reporter. It always lands in Needs triage: an agent can't send its own finding to agents; a person routes it (routeSpec's verdict is kept as a hint). The URL must be one of the project's staging/preview URLs. If an open item matches closely (duplicate score ≥ 0.7), nothing is filed and that item comes back: "Not filed: this looks like FB-1193 …"; pass force: true to file anyway. Needs an agent token.
get_projectproject? (slug or key; user tokens only)The project's feedback URLs: staging URL, preview pattern, production (marked view-only when feedback isn't allowed there), plus repo, base branch, framework, whether agents may open PRs and the people-only kinds. create_feedback refuses any other URL. Patterns are host[/path]; * matches within one host label. An agent token always gets its own project (naming another is "Project FB not found"); a user token gets every project where its role reads agent specs, or the one it names. No members, CMS settings or secrets.
get_checksidThe latest CI run of the item's acceptance checks (POST /api/v1/items/:id/checks, from the get_playwright_test file): passed, failed and skipped counts, the spec version it ran against (and a warning when the spec has moved on since), who reported it, PR, preview, CI and commit links, how many earlier runs there were, then one line per AC with the first lines of a failing assertion. The per-AC lines are fenced as untrusted, since assertion messages carry page text. "No CI checks reported for FB-1188 yet. …" before the first run.
get_playwright_testidThe item's acceptance checks as a ready-to-run Playwright test (FB-1188.spec.ts), as a code block, plus which checks are asserted and which are test.fixme. Measurable checks (visibility, text, CSS values and spacing within ±1px, containment and inset, line count, overflow, link targets and status) are real assertions; the rest are test.fixme with the check text, never fake passes. Tests are titled AC-n · …, so CI results map back to the item. Same file as GET /api/v1/items/:id/playwright. See Playwright checks.

Errors are tool results with isError: true and a plain message: "Item FB-9 not found", "FB-1188 is claimed by someone else", "FB-1190 isn't claimed". Input that fails the frozen zod schemas, such as an id that isn't like FB-1188, comes back as an input validation error.

There are two more entries:

  • Resource template spec://{key}: the spec as markdown. Listing it shows the open agent items.
  • Prompt fix_feedback(id?): the whole loop as numbered steps. Leave id empty to take the top agent-ready item.

Suggested CLAUDE.md snippet for client repos

## pinprompt feedback

When asked to fix pinprompt feedback (or "the next agent-ready item"), use the `pinprompt` MCP server:

1. `list_feedback` (agent-ready, highest priority first), then `get_spec <key>` and read it fully.
   `get_evidence <key> screenshot` to see what the reporter saw.
2. `claim_feedback <key>` before touching code. If it's already claimed, pick another item.
3. If the spec is ambiguous, `ask_reporter` with up to 4 short options and stop. Don't guess.
4. Fix it within the spec's constraints (e.g. other breakpoints unchanged, tokens not raw px).
5. `get_playwright_test <key>`: save it in the repo's Playwright tests (e.g. `tests/acceptance/FB-1188.spec.ts`),
   make it pass locally and with `PINPROMPT_BASE_URL=<preview>`, keep the `AC-n · …` titles, don't delete
   or fake the `test.fixme` ones. Then the usual checks (typecheck, lint, tests).
6. Open a PR whose title references the key and whose body lists each AC and how you verified it.
7. `attach_run <key>` with the PR URL, preview URL (if known), branch, a one-line summary, `pr_title` and the
   `spec_version` claim_feedback returned. Act on any "Warning:" line. Once CI ran, `get_checks <key>`.
8. Coming back after `ask_reporter`: `list_feedback` with `mine: true`; an item marked "reporter answered: claim_feedback
   again" needs `get_spec` (the answer is in it) and `claim_feedback` before you continue.

Never merge the PR. The reporter signs off on the preview. If you can't fix it, `release_feedback` with the reason.

Review agent recipe

A review agent (kind review in Project settings → Agents) walks a preview or staging build, then files what it finds with create_feedback. Findings land in Needs triage with the agent as reporter, so the activity feed reads "Review agent filed NW-318 focus trap in booking modal", and a person decides whether a coding agent or a person fixes each one. Text it sends is treated like any reporter text: cleaned, and fenced as untrusted data in the prompt a coding agent later reads.

CLAUDE.md snippet for the review agent's repo or workspace:

## pinprompt review pass

You review the staging/preview build and file findings in pinprompt with the `pinprompt` MCP server
(an agent token for the review agent). Don't fix anything yourself.

1. `get_project` for the staging/preview URLs you may file on, then check the pages you were asked to review under them
   (accessibility, broken flows, copy, layout at 390/834/1440px).
2. Before filing, `list_feedback` with status `open` to see what's already known.
3. For each new problem, `create_feedback` with:
   - `title`: what's wrong, under 80 characters ("Focus escapes the booking modal").
   - `kind` (bug, design-deviation, copy, content, ux, a11y, perf) and `priority` (P1 only for broken flows).
   - `url` of the page, `selector` of the element, and `source` (`path/File.tsx:line`) when you know it.
   - `observed` and `expected` as plain facts; `acceptance`: 1–4 checks a coding agent can prove.
   - `evidence_note`: the tool output that shows it (axe rule id, console error, measurement).
4. If it answers "Not filed: this looks like FB-…", add your evidence with `post_update` on that item
   instead. Use `force: true` only when it's clearly a different problem.
5. Finish with a short summary listing the keys you filed.