Review a page and let Codex fix it.

Reviewers pin comments on your site. Codex reads them over MCP with the page, element and conversation attached, makes the change, and replies in the thread.

What you need

  • A site with the pinthread script tag. Sign up free and the install guide take a few minutes.
  • An agent token from Agent access in the dashboard. Store it as PINTHREAD_TOKEN, never in your repository.
  • Codex with access to your repository.
<script src="https://pinthread.dev/embed.js"
  data-project="YOUR_PROJECT_KEY" defer></script>

Connect Codex

The server is https://pinthread.dev/mcp. The token decides which project Codex sees.

[mcp_servers.pinthread]
url = "https://pinthread.dev/mcp"
bearer_token_env_var = "PINTHREAD_TOKEN"

Add it to ~/.codex/config.toml. Codex reads the token from PINTHREAD_TOKEN.

Or add it from the terminal:

codex mcp add pinthread --url https://pinthread.dev/mcp --bearer-token-env-var PINTHREAD_TOKEN

A project can also keep the same table in .codex/config.toml.

Checked on 10 October 2026. Source: Codex MCP documentation. The server side (a POST-only streamable HTTP endpoint with a bearer token) is described on the MCP server page.

Tell it how to work

Add this to your AGENTS.md so every Codex session follows the same steps:

When I mention pinthread comments, use the pinthread MCP tools. List the open threads, read each one with get_thread, then make the change and check it. Reply with what you changed. Resolve a thread only when you are confident the fix is complete. If a comment is a question or needs a decision, reply and leave it open.

Or paste this prompt in a session:

Fix the open pinthread comments on /pricing. List the threads, read each one with get_thread, change the code, and check the change. Reply in each thread with what you changed. Resolve a thread only when the fix is complete. If a comment is a question, reply and leave it open.

How it works, step by step

  1. Maya opens your staging site, clicks the annual plan button, and writes: “Make it clear this is billed annually.”
  2. You tell Codex: “Fix the open pinthread comments on /pricing.”
  3. Codex calls list_threads with the page filter, then get_thread. It receives the page /pricing, the selector, the text “Choose plan”, and Maya’s words.
  4. Codex edits the component that renders the button and checks the change.
  5. With a write token it calls reply_thread (“Label now reads Choose annual plan; monthly price stays visible”) and resolve_thread. With a read token it reports the change to you and you resolve the thread in the sidebar.

How Codex reads and replies

pinthread exposes tools only. Codex uses these:

  • list_threads lists threads. Filter by status, page, assignee, priority or label.
  • get_thread reads one thread with every comment.
  • get_page_context returns the open threads on one page.
  • list_events returns new threads and replies after a cursor. Start with since: "latest".
  • reply_thread and resolve_thread need a write token.

The tool table lists all 12 tools.

Check the connection

Run codex mcp list or type /mcp in the Codex terminal UI. pinthread should appear. Then ask Codex to call whoami. It returns the project, token name and scope.

Troubleshooting

Codex cannot find the token
bearer_token_env_var names the variable. It does not hold the token. Export PINTHREAD_TOKEN in the shell that starts Codex.
HTTP 401: An agent token is required.
The request had no valid ptk_ token. Check that PINTHREAD_TOKEN is set in the environment that starts Codex, and that the token is not revoked or expired. Tokens expire after 90 days by default.
HTTP 405: Send MCP messages with POST.
The endpoint accepts only POST. Opening https://pinthread.dev/mcp in a browser or sending GET returns this. It is not a fault in your setup.
A write tool fails
reply_thread, resolve_thread and the other write tools need a write token. Call whoami to read the scope of the connection.
The list is empty
Threads are per project and per page. Call whoami to confirm the project, and list_threads with status all to see resolved threads too.

Questions

Does Codex need a plugin or extension for pinthread?

No. Codex connects to the pinthread MCP server over HTTP with an agent token. Your site only needs the pinthread script tag.

Can Codex resolve threads on its own?

Only with a write token. A read token lists and reads threads and lets Codex propose fixes. Create the token in Agent access in the dashboard.

Does this review my code with pinthread?

No. pinthread collects feedback about your running website. It does not review pull requests. Codex edits your code.

Try it

Start on the free plan, or read the general agent workflow. Pinthread carries the feedback. Codex edits your code.

Guides for other agents