# How do I connect error monitoring to Claude Code with an MCP server?

Pick an error tracker that offers a remote HTTP MCP server, run claude mcp add --transport http <name> <url>, then run /mcp inside Claude Code to sign in. Check with claude mcp list, which should show Connected. Start with a read-only question such as listing unresolved issues. Only connect servers you trust, because content they return can carry prompt injection.

Canonical page: https://bugsly.dev/solutions/error-monitoring-mcp-claude-code. Last updated 2026-11-13. All solutions: https://bugsly.dev/solutions (list as JSON: https://bugsly.dev/solutions.json).

## Why it happens

Without a connection, debugging with an AI coding assistant means copying stack traces out of a dashboard and pasting them into chat. The assistant only sees what you paste, so it misses the other occurrences of the error, the release it started in, and how many users it touches. Claude Code's own documentation describes the pattern: connect a server when you find yourself copying data into chat from another tool, such as an issue tracker or a monitoring dashboard.

The Model Context Protocol (MCP) is the open standard that lets an assistant call tools on another system. An error tracker with an MCP server exposes tools such as list issues, read one issue, and read its recent events. Claude Code calls them directly, so the question becomes "what is the top unresolved error this week and which file throws it?" instead of a copy-paste session.

The setup is the same for any tracker that publishes a remote HTTP MCP server, which Claude Code's documentation calls the recommended transport for cloud services. The steps below do not depend on one vendor. The part that does vary is what the server returns: what data is redacted, which tools can change state, and what rate limits apply. Check those before you connect, because the assistant will act on whatever comes back.

## Connect any remote MCP error tracker to Claude Code

1. **Choose a remote HTTP server and read what its tools can do.** Find the tracker's MCP URL in its documentation. Prefer a hosted HTTP endpoint over a local process, because the vendor can apply redaction and rate limits on its side. Before connecting, read the tool list and note which tools only read and which change state, such as resolving or ignoring an issue. If the server offers a token with a narrower scope than your whole account, plan to use that.
2. **Add the server.** Run the add command once in a terminal. The name is yours to choose; the URL is the vendor's endpoint. Claude Code's documentation gives this exact syntax for remote HTTP servers. If the vendor gives you a static token instead of browser sign-in, the same command accepts a --header option.

```
claude mcp add --transport http <name> <url>

# static token variant
claude mcp add --transport http <name> <url> \
  --header "Authorization: Bearer <token>"
```

3. **Authenticate with /mcp.** Start Claude Code and run /mcp. A server that uses OAuth shows as needing authentication; choose it and complete sign-in in the browser, where you should see a consent screen listing what you are granting. When you later remove a server, Claude Code deletes the tokens it stored, but it does not revoke them at the issuing service, so revoke them in the tracker's settings too.

```
/mcp
```

4. **Verify the connection.** Back in a shell, claude mcp list prints a health status next to each server, such as Connected, Needs authentication or Failed to connect. A failure line includes the HTTP status the server returned, which usually points to a wrong URL or an expired token. Inside Claude Code, /mcp shows the same status and how many tools the server exposes.

```
claude mcp list
claude mcp get <name>
```

5. **Pick the scope deliberately.** Claude Code's documentation says each add command writes to local scope unless you pass --scope project or --scope user. Project scope stores the server in a .mcp.json file at the project root that you can commit, so the whole team gets the same entry, while each person still signs in themselves. Use user scope if you want the tracker in every project on your machine. Avoid committing a literal token into .mcp.json.

```
claude mcp add --transport http <name> --scope project <url>
```

6. **Ask a first question that cannot change anything.** Begin with a read-only request and watch which tools Claude Code calls. Ask for the unresolved issues of one project sorted by newest, and for the evidence behind the top one. If the first answers match your dashboard, widen the task. Keep tools that change state, such as resolve or ignore, behind Claude Code's permission prompt rather than allowing them in advance.
7. **Treat tool output as untrusted input.** Claude Code's documentation warns you to verify that you trust each MCP server, because servers that fetch external content can expose you to prompt injection. An error tracker is exactly such a source: an error message, a URL or a form field in an event is text written by your users or by anyone who can trigger an error. A hostile string in an event can try to instruct the assistant. Keep write tools gated and review any command or diff before it runs.

What to check on any error-tracking MCP server before you connect it

| Question | Why it matters | Where to look |
| --- | --- | --- |
| Is the endpoint remote HTTP with OAuth sign-in? | Browser sign-in avoids pasting a long-lived secret into a config file | The tracker's MCP documentation |
| Which tools change state? | Resolve, ignore or delete actions affect everyone on the team | The tool list, plus /mcp inside Claude Code |
| Is event data redacted before the assistant sees it? | Emails, IP addresses and extra data in events would otherwise enter the model context | The vendor's description of tool output |
| Are there rate limits? | A loop calling tools can hit an API quickly | The vendor's MCP documentation |
| Can you revoke access without the assistant? | You need a way to cut off a token you no longer trust | The tracker's settings for connections or tokens |

A criteria list, not a vendor comparison. The add, list and scope behavior is from the Claude Code MCP documentation (code.claude.com, read 2026-11-13).

## When to use Bugsly

Bugsly runs a hosted remote MCP server at https://bugsly.dev/api/mcp over Streamable HTTP. Add it with claude mcp add --transport http bugsly https://bugsly.dev/api/mcp, then run /mcp in Claude Code to sign in with OAuth 2.1 (PKCE and dynamic client registration). If you prefer a token, create a revocable bgs_ token under Settings, AI Agent / MCP and send it as an Authorization: Bearer header; tokens expire after 90 days by default and you can hold up to 20 active ones. There is also a plugin: /plugin marketplace add airdropfi/bugsly-claude-plugin, then /plugin install bugsly@bugsly-plugins.

The server exposes 16 tools. Reading tools include list_projects, list_issues, get_issue, get_issue_events, search_errors, get_usage and get_crash_free. Two are destructive, resolve_issue and ignore_issue, and the tools carry readOnlyHint and destructiveHint annotations so a client can ask before running them. On the hosted server, get_issue_events returns size-capped output with user email, IP address, username and extra data omitted, and never returns your DSN key. The limit is 60 tool calls per minute per user. You can list and revoke connections under Settings, AI Agent / MCP.

The limits: Bugsly has no per-action approval queue and no reviewable history of every agent action, so the confirmation step is whatever your client provides. For Cursor use https://github.com/airdropfi/bugsly-cursor-kit, and for Gemini CLI run gemini extensions install https://github.com/airdropfi/bugsly-gemini-extension then /mcp auth bugsly. A local npm package, @bugsly/mcp-server, exists for clients that cannot call a URL, but it does not apply the hosted server's redaction, size cap or rate limits.

## When Bugsly is not the right answer

If your tracker has no remote MCP server, a local stdio server or a copy of the trace pasted into chat still works, but you lose the vendor-side redaction and limits, so scrub what you paste. If your team cannot use a hosted closed-source service, or needs single sign-on, Bugsly is not the right tracker: it is hosted only, not self-hostable, and has no SSO or SAML.

If you need incident actions in Jira, Linear or PagerDuty from the assistant, Bugsly does not provide them. Use a tracker that does, or add those tools as separate MCP servers.

## Ask your AI assistant to do it

Connect the Bugsly MCP server (https://bugsly.dev/mcp), then paste:

> Assign to Bugsly: use list_projects to find my projects, then list_issues for the most active one sorted by newest, and get_issue on the top result. Summarize the error, the file and line it points to, and how often it occurs. Do not resolve or ignore anything; show me what you found so I can approve the next step.

## Frequently asked questions

### What is the exact command to add an MCP server to Claude Code?

For a remote HTTP server it is claude mcp add --transport http <name> <url>. Then run /mcp inside Claude Code to authenticate and claude mcp list to confirm it shows Connected.

### Is it safe to let Claude Code read my production errors?

It is safe when you connect only servers you trust and keep state-changing tools behind a confirmation prompt. Error events contain text from outside your team, so treat them as untrusted input.

### Does this work with Cursor or Gemini CLI too?

MCP is an open standard, so a remote HTTP server works in other clients, though the setup commands differ. Check your client's documentation for the exact steps.

### How do I remove the connection?

Run claude mcp remove <name>, which deletes the tokens Claude Code stored. It does not revoke them at the tracker, so revoke the token or connection in the tracker's settings as well.

## Sources

- Claude Code docs: Connect Claude Code to tools via MCP (read 2026-11-13): https://code.claude.com/docs/en/mcp

## Related

- Bugsly MCP server overview: https://bugsly.dev/mcp
- Bugsly for AI agents: https://bugsly.dev/agents
- How can I let an AI agent triage production errors safely?: https://bugsly.dev/solutions/let-ai-agent-triage-production-errors
