Docs / Agent skills

Fix production errors from your editor

The Patchly MCP server connects Claude Code or Cursor to the capture, issue, repair loop. Your agent can list open issues, read repair notes, draft fixes locally, and post patch comments without leaving the editor.

1

Generate an Agent API token

Go to Dashboard → Settings → Agent API Tokens and create a new token. Copy it immediately — it's only shown once.

Tokens are scoped to your account and give read/write access to all your projects. Treat them like passwords.
2

Add the MCP server to Claude Code

Open (or create) ~/.claude/claude_desktop_config.json and add the Patchly server under mcpServers:

~/.claude/claude_desktop_config.json

{
  "mcpServers": {
    "patchly": {
      "command": "npx",
      "args": ["-y", "@patchly/mcp"],
      "env": {
        "PATCHLY_API_TOKEN": "pat_your_token_here"
      }
    }
  }
}

Replace pat_your_token_here with the token you just generated. Restart Claude Code after saving.

3

Install the Patchly skill

Add the Patchly workflow skill so your agent knows when and how to use the MCP tools:

terminal

claude skill add https://patchly.cc/patchly-skill.md

This downloads the skill to your project's .claude/skills/ directory. The skill tells Claude when to activate (on production error mentions) and walks it through capture context → fetch issue → draft repair → post comment → mark proposed.

4

Try it out

Open Claude Code and ask it to fix a production error:

Claude Code prompt

Fix the latest Patchly error in project proj_abc123

Claude will call list_issues, fetch the repair note, draft a local fix, ask for your approval, then post the patch comment on the GitHub issue and mark it as proposed.

Claude Code terminal session showing the Patchly agent listing open issues, fetching the repair note for TypeError #42, and applying the suggested fix before marking the issue as patch proposed

Claude Code reading a Patchly issue and applying the fix — all from the terminal.

What the agent does

  1. 1.Calls list_issues to find open errors for your project
  2. 2.Calls get_issue to read the full stack trace and AI repair note
  3. 3.Reads the affected source files in your editor
  4. 4.Drafts a local fix and shows you the diff
  5. 5.Applies the fix after you approve
  6. 6.Posts a patch comment on the linked GitHub issue via post_comment
  7. 7.Marks the issue as patch proposed via mark_patch_proposed

Editor support

EditorMCP supportSkill bundleStatus
Claude CodeNativeclaude skill addFull support
CursorVia MCP configManual CLAUDE.mdMCP config
Codex / AntigravityVia MCP configManualDocumented

Cursor setup

Cursor supports MCP servers via ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project). Add the same config block:

~/.cursor/mcp.json

{
  "mcpServers": {
    "patchly": {
      "command": "npx",
      "args": ["-y", "@patchly/mcp"],
      "env": {
        "PATCHLY_API_TOKEN": "pat_your_token_here"
      }
    }
  }
}

The skill bundle auto-install (claude skill add) is Claude Code-specific. For Cursor, copy the contents of patchly-skill.md into your project's CLAUDE.md or equivalent rules file.

Codex / Antigravity setup

Both Codex and Antigravity support MCP servers via a config file. Use the same JSON block above and consult your editor's MCP setup docs for the exact config path. Once the server is running, paste the skill workflow into your project's system prompt or rules file.

MCP tools reference

ToolInputWhat it returns
list_issuesproject_idOpen issues — ID, title, event count, GitHub URL
get_issueissue_idFull issue with stack trace, source context, repair note
get_repair_noteissue_idJust the AI-generated fix suggestion
post_commentissue_id, commentGitHub comment URL
mark_patch_proposedissue_idConfirmation (updates issue state in Patchly)

No write tools that push code or open PRs — patches always land as GitHub issue comments so you stay in control.

Ready to connect?

Generate your Agent API token in the dashboard and the MCP server takes care of the rest.

Get API token →
Report a bug