# Error monitoring for Replit apps with BugTape

**Answer:** To see the browser errors real users hit in a published Replit app, ask Replit Agent to add BugTape's script tag (or `npm install @bugtape/sdk`), publish, then connect your coding agent to BugTape's hosted MCP server. Replit's own Monitoring tool and Monitoring Agent watch your deployment's server logs, HTTP errors and latency. BugTape adds the browser side: what the user did, the failed request, the console and the stack, grouped into one issue. We have not yet run a Replit-specific end-to-end test, so this page marks which steps come from Replit's docs.

No account: `npx -y bugtape --help` prints the commands and does not sign you in. The demo MCP at https://app.bugtape.ai/demo/mcp needs no sign-in. Your own workspace needs one.

Page owner: Jaco Veldsman, hi@bugtape.ai. Last checked 2026-11-02. Replit facts come from Replit's own docs on 2 November 2026, linked in each section.

## Facts

| | |
|---|---|
| In your app | One `<script type="module">` tag with your `bt_live_` key, or `npm install @bugtape/sdk` |
| Server code | `npm install @bugtape/node` or `pip install bugtape`, with `BUGTAPE_KEY` in Replit Secrets |
| What BugTape catches | Uncaught browser errors, failed and hung requests, and reports from the optional bug button. Server SDKs catch uncaught exceptions |
| What your agent reads | Report text, timeline, the failed request, console and stack for one occurrence (`get_repro_context`). Replay is rebuilt from DOM events, not video |
| MCP server | `https://app.bugtape.ai/mcp`, OAuth or a `bt_pat_` token |
| Tested by BugTape in Replit | Not yet. The script tag and the agent connection are BugTape's standard steps |
| Cost | Free plan, no card, 150 credits a month. Agent reads cost 2 credits on Free and Prepaid credits, free on Pro |

## What Replit already gives you

Replit's [Monitoring](https://docs.replit.com/cloud-services/deployments/monitoring-a-deployment) shows a deployment's uptime, requests, HTTP status codes, response times, CPU and memory, with 30 days of logs. Its [Monitoring Agent](https://docs.replit.com/features/publishing/monitoring-agent) watches application error logs, HTTP errors and latency, and can auto-fix; Replit bills those runs as Agent usage. Its [Feedback widget](https://docs.replit.com/features/publishing/feedback-widget) adds a button to your published app that sends visitor feedback to Agent.

Keep them. Those tools see your server. A JavaScript error in a visitor's browser, or a request that hangs on their connection, may never reach your server logs. BugTape records those in the browser and groups repeats into one issue.

If you use Replit's Feedback widget, hide BugTape's button with `showButton: false` so your users see one button. Automatic capture still works.

## Step 1: add BugTape to the front end

[Start free](/console/register?utm_source=bugtape_seo&utm_campaign=integrations-replit), create a project and copy your `bt_live_` key from Setup. Then ask Replit Agent:

> Add this script tag to the head of the app's index.html.

```html
<script type="module">
  import { init } from 'https://app.bugtape.ai/bugtape.mjs';
  init({ apiKey: 'bt_live_your_key_here', privacy: 'strict' });
</script>
```

If your app uses a bundler, ask Agent to run `npm install @bugtape/sdk` and call `init` once where the app starts. The `bt_live_` key can only send reports, so it is safe in browser code. It cannot open MCP or read anything.

`privacy: 'strict'` turns page text into solid blocks and drops query strings and request and response bodies before anything leaves the browser. Form fields are masked in every mode.

## Step 2: add BugTape to the server (optional)

Replit [Secrets](https://docs.replit.com/replit-workspace/workspace-features/secrets) are exposed to your code as environment variables, on every deployment type except Static. Add a secret named `BUGTAPE_KEY` with a key from **Setup → Node.js** or **Setup → Python**, and set it under the published app's production secrets too.

For Node.js:

```js
import * as bugtape from '@bugtape/node';
bugtape.init({ service: 'api' });
```

For Python:

```python
import bugtape
bugtape.init(service="api")
```

Server reports carry the route, service and release. They have no replay or console.

## Step 3: publish and check

Publish the app, open it in a browser and trigger a test error, such as a button that throws. The issue appears in BugTape with the replay and the console. A sample from the Setup page does not prove your app is installed. A report from your own published app does.

## Step 4: connect your coding agent

If you work on the code in Claude Code, Cursor or Codex, connect your git repository through Replit's [Git pane](https://docs.replit.com/replit-workspace/workspace-features/git-interface) and run:

```bash
npx -y bugtape connect claude   # or cursor, codex
```

Click Allow once, then ask: "Using BugTape, list my projects." When real errors arrive, ask your agent to read the top issue and open a pull request. You review it.

## Step 5: or connect Replit Agent itself (from Replit's docs, not yet tested)

Replit's [MCP docs](https://docs.replit.com/build/connect-via-mcp) describe adding a remote server: open **MCP Servers**, click **+ Add MCP server**, enter a display name and the server URL, then **Test & save**, which runs any OAuth sign-in. For BugTape the URL is `https://app.bugtape.ai/mcp`. BugTape supports OAuth with dynamic client registration, which Replit's docs say it detects. We have not confirmed this flow in Replit yet.

## FAQ

### Does Replit have error monitoring?

Replit's Monitoring and Monitoring Agent cover your deployment's logs, HTTP errors and latency. BugTape adds browser errors, failed requests and a short replay for each issue.

### Do I need Replit Agent to use BugTape?

No. Any published web app that loads the script tag sends reports. You can read them in the BugTape console or with any coding agent that speaks MCP.

### Is the bt_live_ key safe in the browser?

Yes. A capture key can only send reports. Agent access uses separate OAuth grants or `bt_pat_` tokens.

### Has BugTape tested this in Replit?

Not end to end yet. The script tag, server SDKs and agent connection are BugTape's standard steps. The Replit Agent connector steps come from Replit's docs.

### Does it cost anything?

The Free plan is $0 with no credit card and includes 150 credits a month. Each agent read of a bug costs 2 credits on Free and Prepaid credits. Reads are free on Pro.

## See also

[All integrations](/integrations/) · [Error monitoring for AI builders](/integrations/ai-builders/) · [Error monitoring for v0 apps](/integrations/v0/) · [Lovable](/integrations/lovable/) · [BugTape for vibe coders](/vibe-coders/) · [Python docs](/docs/python/) · [Node.js docs](/docs/node/)

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