Claude Code Plugin

The Scout APM Claude Code plugin gives Claude purpose-built skills and an autonomous agent for working with Scout’s production data. It layers on top of a Scout MCP server to turn raw performance data into prioritized, actionable findings — with fixes proposed directly in your codebase.

Source code and full reference are on GitHub.

Prerequisites

  1. Claude Code installed
  2. A Scout APM account with at least one monitored application

Installation

1. Install the plugin

In a Claude Code session, add the Scout marketplace and install the plugin:

/plugin marketplace add scoutapp/claude-code-plugin
/plugin install scout-apm@scout-apm

2. Connect Scout’s MCP server

The plugin needs a Scout MCP server to access your performance data. The fastest path is the setup wizard:

npx @scout_apm/wizard

The wizard handles authentication and MCP configuration in one step. For manual setup or alternative options (Docker, hosted MCP), see MCP Server and Self-Hosted MCP.

If you’re already in a Claude Code session and want guided help, run /scout-setup — the plugin will detect your current state and walk you through whatever’s needed.

Skills

Skills are slash commands you can invoke explicitly with /skill-name. Claude may also auto-invoke them when your request matches (for example, asking “why is /checkout slow?” naturally triggers endpoint-deep-dive).

/perf — Performance review

A prioritized review of production performance issues across your app. Claude fetches N+1 queries, slow endpoints, background job issues, and errors, organizes them by impact, and offers to drill into traces or fix the underlying code.

Try it: /perf (or /perf my-app to target a specific app)

A typical run produces a summary like:

High impact

  • N+1 query on OrdersController#index — ~38 extra queries per request, ~480ms added latency
  • Slow query on ReportsController#monthlySELECT … FROM events averaging 1.4s

Medium impact

  • Memory bloat in ImportJob — 220MB peak on large CSVs

Want me to drill into the N+1 and propose a fix?

/scout-errors — Error triage

Ranks recent error groups by frequency and recency, pulls backtraces for the top candidates, maps the first in-repo frame to code, and proposes a root-cause fix.

Try it: /scout-errors after a deploy to catch new exceptions before they spread.

/endpoint-deep-dive — Single-endpoint investigation

Given an endpoint, pulls recent metrics and representative traces, identifies the top spans by time, finds the matching controller or handler in your repo, and summarizes where time is going.

Try it: /endpoint-deep-dive /checkout — or just ask “why is the checkout endpoint slow?” and let Claude pick the skill.

/scout-setup — Guided setup

Detects your current MCP configuration and walks you through whatever is needed to connect Scout. Useful if /perf reports no working server, or if you’re setting things up for the first time inside a session.

Performance Investigator agent

For hands-off investigations, ask Claude to investigate a performance issue and it can hand off to the Performance Investigator agent. The agent gathers data, forms hypotheses, examines traces, locates the relevant code, and proposes fixes end-to-end without manual prompting between steps.

Data access

All Scout data access through the plugin is read-only — Claude can query metrics, traces, errors, and insights, but cannot modify anything in your Scout account.