AI Agent Integration

Errors flow directly into your AI assistant

Connect via the Model Context Protocol (MCP) for deep AI integration, or use the CLI to pipe error data into any tool. Two ways in — same superpowers.

Claude Code — Terminal
$ claude "Show me the latest errors from Muscula"
Found 23 new errors in the last 24h
Critical: TypeError in checkout.js:142
Warning: 3 deprecation notices in api/v2
Analyzing root cause for TypeError...
Fix suggestion ready. Do you want to apply it?

How it works

Three simple steps to AI-powered error resolution.

01

Connect Muscula MCP

Run a single command in your AI tool of choice. Claude Code, Cursor, Windsurf, VS Code, or Cline.

02

Errors flow to your AI

Muscula streams real-time error data through the Model Context Protocol directly to your AI assistant.

03

AI analyzes & fixes

Your AI assistant can analyze root causes, suggest fixes, and even apply them — all with full error context.

Why MCP changes everything

AI-Native Error Reporting

Get your complete error list directly inside Claude Code, Cursor, or any MCP-compatible AI assistant. No context switching needed.

Real-time Error Feed

Your AI assistant sees errors as they happen. Ask it to analyze, prioritize, or fix them — all from your terminal.

Automated Triage

Let AI categorize and prioritize errors automatically. Focus on what matters most with intelligent severity analysis.

Context-Rich Debugging

Stack traces, user sessions, browser info — all available to your AI. Get fix suggestions with full context.

Natural Language Queries

Ask questions like 'What errors happened in checkout today?' and get instant structured answers from your AI.

Multi-Project Awareness

Your AI can access errors across all your Muscula projects simultaneously, detecting cross-service issues.

Add Muscula to your AI tool

One command. That's it. Pick your tool and paste the command.

Claude Code — Terminal
$ claude mcp add muscula -- npx -y @nicholasmuscula/muscula-mcp-server --api-key YOUR_API_KEY --log-id YOUR_LOG_ID

Or add to your MCP Servers config

For tools that use a JSON configuration file (mcp_servers.json, .cursor/mcp.json, or VS Code settings):

mcp_servers.json
{
  "mcpServers": {
    "muscula": {
      "command": "npx",
      "args": [
        "-y",
        "@nicholasmuscula/muscula-mcp-server",
        "--api-key", "YOUR_API_KEY",
        "--log-id", "YOUR_LOG_ID"
      ]
    }
  }
}
Command Line Interface

Prefer the terminal? Install the CLI.

The Muscula CLI gives you direct access to all your projects, error lists, and full stack traces. Use it standalone or pipe output into Claude Code for AI-powered analysis.

Install
$ npm install -g @muscula.com/muscula-cli

Beautiful Terminal Output

Rich, formatted output with tree views, tables, and color coding. Error data has never looked this good in a terminal.

Secure OAuth Authentication

Login via browser-based OAuth 2.1 + PKCE. Tokens stored securely in ~/.muscula-cli/config.json.

Deep Error Inspection

Full stack traces, device/browser stats, page URLs, and version breakdown — all formatted for your terminal.

Multi-Project Overview

See all your projects, logs, and error counts in a single command. Spot problems across your entire infrastructure.

muscula projects
$ muscula login
Opening browser for authentication...
Logged in successfully
$ muscula projects
Acme Corp (60213096f873ab3cc83152b4)
  ├─ Production [xK9mN2] errors: 16
  ├─ Staging [pL3qR7] errors: 2
WebShop (657ab9708d77535a63c30675)
  ├─ API Dev [BBHfsx] errors: 49
  ├─ API Prod [QrKo20] errors: 1
  ├─ Panel [0Ynxx7] errors: 0
CLI + AI

Combine CLI with Claude Code

Don't want to set up MCP? Just pipe CLI output into Claude Code. No configuration needed — it just works.

Pipe errors into Claude Code
$ muscula errors "Acme Corp" | claude "Analyze these errors and suggest fixes"

╭──────────────────────────────────────────────────────────────────╮
│ I found 3 errors in Production. Here's my analysis:             │
│                                                                  │
│ 1. Cannot read property 'id' of undefined (app.js:142)          │
│    → The user object is null when getUser() is called before     │
│      auth completes. Add a null check on line 142.              │
│                                                                  │
│ 2. Error when logging in (auth.js:89)                           │
│    → The OAuth token refresh is failing silently. The catch      │
│      block swallows the error. Re-throw after logging.          │
│                                                                  │
│ 3. TypeError: Cannot read properties of undefined               │
│    → Same root cause as #1 — cascading from the missing         │
│      null check. Fixing #1 will resolve this too.               │
│                                                                  │
│ Want me to apply the fix for #1?                                │
╰──────────────────────────────────────────────────────────────────╯
Deep dive into a specific error
$ muscula error xK9mN2 69bbb32a84068f | claude "Explain this error and fix it"

╭──────────────────────────────────────────────────────────────────╮
│ The error occurs in app.js:142 inside UserService.getUser().    │
│                                                                  │
│ Root cause: The function is called before authentication         │
│ completes, so the user object is undefined.                     │
│                                                                  │
│ I'll add a guard clause. Here's the diff:                       │
│                                                                  │
│  // app.js:140-145                                              │
│  - const userId = user.id;                                      │
│  + if (!user) {                                                 │
│  +   throw new Error('User not authenticated');                 │
│  + }                                                            │
│  + const userId = user.id;                                      │
│                                                                  │
│ Applied to app.js ✓                                             │
╰──────────────────────────────────────────────────────────────────╯
Daily error check in one line
$ muscula errors "Acme Corp" | claude "Any critical issues I should fix today?"

╭──────────────────────────────────────────────────────────────────╮
│ You have 1 critical issue:                                      │
│                                                                  │
│ The 'Cannot read property id' error hit 2 users today and is    │
│ trending up. It blocks the checkout flow — I'd fix this first.  │
│                                                                  │
│ The other 2 errors are low-priority: a login edge case and a    │
│ stale TypeError that will resolve once you fix the first one.   │
╰──────────────────────────────────────────────────────────────────╯

No MCP setup needed — just pipe and go. Works with any AI tool that reads from stdin.