MCP Integration

Let Claude fix your errors

Connect Reflex to Claude Code via MCP. Analyze stack traces, understand root causes, and get fix suggestions automatically.

AI-powered debugging

When an error occurs, Claude can analyze the full context - stack trace, request parameters, user session, and recent code changes - to help you understand and fix it.

  • Analyze stack traces and identify root cause
  • Suggest code fixes with full context
  • Find similar past errors and their solutions
claude

user: What's causing the NoMethodError in orders#create?

claude: Looking at error #4521...

The error occurs because `current_user.cart` returns nil when the user's session expires mid-checkout.

Fix: Add a nil check or redirect expired sessions:

- current_user.cart.items
+ current_user&.cart&.items || []

Setup in 2 minutes

Connect Reflex to Claude Code

1

Install the MCP server

npm install -g @brainzlab/reflex-mcp
2

Add to your Claude Code config

// ~/.claude/config.json
{
  "mcpServers": {
    "reflex": {
      "command": "reflex-mcp",
      "args": ["--api-key", "YOUR_API_KEY"]
    }
  }
}
3

Start debugging with Claude

Open Claude Code and ask about your errors:

"What's the most common error this week and how can I fix it?"

What you can ask

Natural language error debugging

Show me the most critical unresolved errors

Prioritize your debugging efforts

What's causing this nil error and how do I fix it?

Root cause analysis with solutions

Have we seen this type of error before? What fixed it?

Historical error matching

Which errors are affecting the most users right now?

Impact-based prioritization

Explain this stack trace and suggest a fix

Deep error analysis

What changed in the code that might have caused this?

Regression detection

MCP Tools

Tools available to Claude

reflex_list_errors

List errors with filters and sorting

params: status, severity, time_range

reflex_get_error

Get full error details and context

params: error_id

reflex_get_occurrences

Get all occurrences of an error

params: error_id, limit

reflex_find_similar

Find similar historical errors

params: error_id, threshold

reflex_get_stats

Get error statistics and trends

params: time_range, group_by

reflex_resolve

Mark an error as resolved

params: error_id, resolution_note

Fix errors faster

Get started with Reflex and Claude Code today.