Skip to main content

Fix production errors from your editor.

Patchly works the same way in every coding agent. The MCP server gives your agent the tools: list issues, read the repair note, post a patch comment. The skill tells it when and how to use them. Claude Code, Cursor and Codex get the same server and the same skill; only the install step differs.

Still need the SDK? The one-prompt setup works in any agent that can edit your code, including Lovable, Bolt and Replit. This page is for the next step: handing production errors back to your agent.

1. Create an Agent API token

In Dashboard → Settings → Agent API Tokens, create a token and copy it; it is shown once. Tokens expire after 90 days and can be limited to one project or to specific capabilities (issues:read, issues:write, github:write, projects:write). Treat it like a password. Below, replace YOUR_PATCHLY_TOKEN with it.

Choose Read-only and a single project for agents that only need to inspect errors. Read-only tokens can list projects and read issues, but cannot resolve or ignore issues, propose patches, report outcomes, post GitHub comments, or create projects. The hosted MCP server hides write tools for these tokens; the local server rejects write calls.

2. Connect your agent

Every agent gets the same @patchly/mcp server and the same Patchly skill. Pick yours:

Connect the MCP server

Add the server with the Claude Code CLI. The user scope makes it available in every project and keeps the token out of your repository.

terminal
claude mcp add --transport stdio --scope user \
  --env PATCHLY_API_TOKEN=YOUR_PATCHLY_TOKEN \
  patchly -- npx -y @patchly/mcp

Add the Patchly skill

Claude Code loads skills from ~/.claude/skills/ for every project, or from .claude/skills/ inside one project.

terminal
mkdir -p ~/.claude/skills/patchly
curl -fsSL https://patchly.cc/patchly-skill.md -o ~/.claude/skills/patchly/SKILL.md

Reference: Claude Code MCP docs

3. Ask for a fix

Restart your agent so it picks up the server, then ask in plain words:

Fix the latest production error in my Patchly project.

The agent calls list_issues, reads the repair note, changes the code locally and shows you the diff. Once you approve, it posts the patch on the GitHub issue and marks it as proposed.

Terminal session in which a coding agent such as Claude Code, Cursor or Codex lists open Patchly issues, reads the repair note for TypeError #42, applies the fix and marks the issue as patch proposed
The same loop in any agent: find the issue, read the cause, apply the fix, report back.

MCP tools

ToolWhat it does
list_projectsnoneThe projects your token can access
list_issuesproject_idIssues for a project; filter by status, environment or release
get_issueissue_idStack trace, breadcrumbs, release and the repair note with its patches
get_repair_noteissue_idJust the suggested fix
post_commentissue_id, commentPosts a comment on the linked GitHub issue
mark_patch_proposedissue_idMarks the issue as patch proposed
resolve_issueissue_id, statusSets the issue's status
report_fix_outcomeissue_id, outcomeRecords whether the suggested fix worked

None of these tools push code or merge anything. Your agent edits files on your machine, and you decide what gets committed.

Ready to connect?

Create an Agent API token, pick your agent above, and ask it for a fix.

Create an Agent API token
Report a bug
    Agent skills — Patchly