Home

Guide

How to give Claude Code your production errors

Paste logs, connect an error tracker over MCP (BugTape, Sentry, PostHog, Datadog), send issues to the agent, and check the fix after a release.

Short answer: Connect an error tracker to Claude Code over MCP, so the agent reads the captured evidence itself. For BugTape, run npx -y bugtape connect claude and click Allow once. Claude Code can then read the ranked inbox, pull the stack, the failed request, the console and the user's steps for one issue, and record the pull request it opens. A person reviews that pull request. Pasting a stack trace into the chat also works, but it carries less and can carry secrets.

No account yet: claude mcp add --transport http bugtape-demo https://app.bugtape.ai/demo/mcp connects a read-only sample project. It needs no sign-in.

Page owner: Jaco Veldsman, hi@bugtape.ai. Last checked 2026-10-26. I build BugTape. The facts about other tools come from their own docs, linked where they appear, all checked on 26 October 2026.

What Claude Code needs to fix a production bug

A coding agent finds the cause more easily when it reads the evidence directly. A summary in your own words drops the details the agent uses to find the cause. These are the parts that matter:

  • The stack trace, with file names and line numbers from the release that failed.
  • The failed request: method, URL, status and timing.
  • The console around the error, including warnings that came first.
  • The steps the user took before it broke.
  • The release that produced the failure, so the agent reads the right code.
  • How many users hit it, so you and the agent fix the right bug first.

BugTape records the browser part of this as a replay rebuilt from DOM events. It is not a screen video. On servers, BugTape records the error, stack, route pattern, service and release. Servers have no replay or console.

Four ways to get the evidence to the agent

WayWho starts itWhat Claude Code getsWatch out for
Paste a stack trace and logsYou, for each bugWhat you copiedMissing context, and secrets in the paste
Connect an error tracker over MCPYou, onceThe tracker's evidence, read on requestEach vendor exposes different data
Send issues to the agentBugTape, or you with Send to agentThe next issue, without askingLive waiting needs Pro or prepaid credits
Check the fix after a releaseBugTapeA regression alert if the failure returnsYou must mark the issue fixed first

1. Paste a stack trace and logs by hand

This works for a single bug. Copy the stack trace and the log lines into the chat, or attach a log file. You lose the steps before the error, the request that failed, and how many people hit it. Pasted logs often hold tokens, emails or customer data. Remove them before you paste.

2. Connect an error tracker's MCP server

MCP lets Claude Code call another tool. Claude Code adds an HTTP server with claude mcp add --transport http <name> <url> (Claude Code MCP docs, checked 26 Oct 2026).

To connect BugTape, run one command:

npx -y bugtape connect claude

You get a link and a code. Open the link on any machine, check the code, and click Allow. This works when the agent's machine has no browser. If you prefer the Claude Code CLI with OAuth:

claude mcp add --transport http bugtape https://app.bugtape.ai/mcp

Then run /mcp in Claude Code and choose BugTape. The full steps are on Install in Claude Code.

BugTape is one of several trackers with an MCP server. Pick the one that already holds your errors:

  • Sentry hosts a server at https://mcp.sentry.dev/mcp for "searching errors, analyzing performance, triaging issues, reading documentation, and managing projects" (Sentry MCP, checked 26 Oct 2026).
  • PostHog says its server can pull "the stack trace, error message, and metadata so the agent can suggest code changes" (PostHog MCP docs, checked 26 Oct 2026).
  • Datadog lists error tracking tools such as search_datadog_error_tracking_issues and get_datadog_error_tracking_issue (Datadog MCP tools, checked 26 Oct 2026). Datadog says the server "is under significant development" (Datadog MCP Server, checked 26 Oct 2026).
  • Jam lets an agent open a Jam recording and read its console logs, network requests and user events (Jam MCP docs, checked 26 Oct 2026). A person records a Jam. It does not capture failures on its own.

If Sentry, PostHog or Datadog already monitors your stack, their servers are a good place to start. BugTape fits when you want the replay, the failed request, the console and the user's steps kept with each issue, and the next issue handed to the agent with listen or Send to agent. Sentry, PostHog and Datadog also capture errors automatically, group repeats and flag regressions. BugTape and Sentry · BugTape vs PostHog.

3. Send issues to the agent automatically

Claude Code can wait for work. With BugTape, the agent calls subscribe_feed with urgent_critical, then listen on the project inbox. listen wakes when a new issue arrives in that feed or when a person presses Send to agent on an issue.

listen needs Pro, or prepaid credits on the workspace. On Free, press Send to agent and ask Claude Code to call list_recommended_critical. Issues sent to the agent come first in that list.

An agent that runs without a session, such as a Claude Code Routine, can take a signed webhook instead. BugTape posts the issue title, severity, report count, release and a pointer to the evidence. Webhooks · Agents.

4. Check the fix after the next release

When you mark an issue fixed, BugTape anchors it to the release. If the same failure arrives from a newer release, the issue reopens as a regression, and BugTape alerts your team and the agent. A different agent token must verify a fix than the token that proposed it.

A worked flow

  1. An issue arrives. A user's checkout request fails. BugTape files one issue with the request, console, stack and steps. Later reports of the same failure join that issue.
  2. Claude Code reads it. The agent calls list_recommended_critical, then get_repro_context for the top issue.
  3. The agent takes the work. It calls ack_bug with working, so your team sees that the agent picked it up.
  4. The agent proposes a change. It works on a fix and opens a pull request. It adds the pull request URL with ack_bug.
  5. You review the pull request. You decide whether it merges and ships. BugTape does not merge or deploy anything.

Plans and credits

MCP works on every plan, including Free. On Free and Prepaid credits, each agent read of a bug's captured events costs 2 credits. Free includes 150 credits a month. On Pro ($29 USD a month) those reads are free. A prepaid pack costs $10 USD for 2,000 credits. Detail is on Pricing.

listen (the live wait for the next bug) needs Pro, or prepaid credits on the workspace. On Free without those credits, start with list_recommended_critical. Do not start with list_bugs.

Capture keys (bt_live_ / bt_test_) are rejected for MCP. They only send reports. The agent uses OAuth or a bt_pat_ token. MCP install · MCP tools.

Before you start

BugTape records nothing until capture runs in your app: one script tag in the browser, npm install @bugtape/node, or pip install bugtape. The browser SDK captures uncaught errors, failed requests after a user action, and requests that hang. It does not catch every error. Screenshots and voice notes in the report form are not available yet. The Swift package captures handled errors and breadcrumbs only. BugTape is hosted only. If Claude Code cannot see the server, read MCP server not working.

FAQ

How do I give Claude Code my production errors?

Connect an error tracker to Claude Code over MCP. For BugTape, run npx -y bugtape connect claude, click Allow, then ask Claude Code to call list_recommended_critical and get_repro_context. For one bug, you can also paste the stack trace and logs into the chat.

Can Claude Code read Sentry errors?

Yes. Sentry hosts an MCP server, and Claude Code adds it with claude mcp add --transport http sentry https://mcp.sentry.dev/mcp (Sentry MCP and Claude Code MCP docs, checked 26 Oct 2026). Sentry covers errors and performance across your whole stack. BugTape can run next to it when you want the replay, failed request and console kept with each issue, and issues handed to the agent with Send to agent or listen.

Is it safe to give an agent production data?

Treat captured evidence as untrusted input, and keep a person reviewing every pull request. The Claude Code docs say: "Verify you trust each server before connecting it." In BugTape, form fields are masked in the browser, and elements marked data-bugtape-ignore are left out of the replay. With privacy: 'strict', page text becomes solid blocks and request and response bodies are dropped before anything leaves the browser. Server SDKs redact messages by pattern. Agent tokens reach only the projects and scopes you grant. They cannot edit, merge, delete or comment on issues. They can report progress with ack_bug and mark an issue resolved. Data is stored in Sydney, Australia, and recorded events are deleted after 7 days on Free or 30 days on Pro. BugTape is not SOC 2 certified. Trust · Privacy guide.

Does it work on the free plan?

Yes. MCP works on every plan. On Free, each agent read of a bug costs 2 credits, and Free includes 150 credits a month. On Pro, reads are free. Waiting for the next bug with listen needs Pro or prepaid credits. The demo MCP at https://app.bugtape.ai/demo/mcp needs no account.

See also

Install in Claude Code · Send console logs to Claude Code · MCP server not working · Agents · Best error tracking MCP servers · How to catch bugs users never report

Start free. No card needed.

Your team reviews the PR. Agents do not silent-ship.