DEV Community

Sanja Malovic
Sanja Malovic

Posted on

Before you let a coding agent read your production errors: 4 checks

This article was written with AI assistance and reviewed by the author.

MCP servers make it easy to give a coding agent access to your error tracker. That's genuinely useful: "what's the top new issue since the last release?" beats copy-pasting stack traces. But an error tracker holds data from your users and text written by strangers. Four checks before you connect one:

1. Read-only tools

Triage needs list/inspect tools only. If the server also exposes resolve, delete or settings tools, restrict the allowlist in your client config.

2. A scoped, expiring token

One project, a limited lifetime, revocable. Keep it in an environment variable or secret manager, never in the committed config file.

3. Minimized output

The agent needs messages, stacks, counts and releases. It doesn't need user IDs, emails, cookies or full URLs with query strings. Check what the tools actually return.

4. Treat error text as untrusted

Error messages, stack frames and even release labels can contain prompt injection: anyone who can trigger an error can write text your agent will read. Keep approval enabled for shell and repository write tools, and treat fetched text as evidence, not instructions.

Also remember

Whatever the agent fetches goes to the model provider you configured. Check that against your own privacy commitments before pointing it at production.

Useful prompts once it's set up: "List unresolved production issues from the last 24 hours and inspect the newest one", "Which release introduced this error?" The agent proposes; you review the fix.

Top comments (0)