MCP Server
The Model Context Protocol (MCP) is an open standard for connecting AI assistants to external data sources. Scout’s hosted MCP server gives your agent direct access to your application’s performance data with zero infrastructure on your end.
Server URL: https://scoutapm.com/mcp
Connecting
- Add the Scout MCP server to your AI tool’s configuration. For example, in Claude Code:
claude mcp add --transport http scout https://scoutapm.com/mcp
Other MCP clients like Claude Desktop use a JSON configuration file. Add the following to your config (e.g., claude_desktop_config.json):
{
"mcpServers": {
"scout": {
"url": "https://scoutapm.com/mcp"
}
}
}
-
When your agent first connects, you’ll be redirected to Scout’s OAuth authorization page. Log in (if needed) and approve access.
-
Start asking your agent about your app’s performance.
Authentication uses OAuth 2.0, so your credentials are never shared with the MCP client. The server is read-only — your agent can query data but cannot modify anything.
Available Tools
Once connected, your agent has access to the tools below. All tools are read-only. Expand any tool to see its full description and parameters — this is the same information your agent sees when deciding which tool to call.
Most data-fetching tools take an app_id (from list_apps) and an ISO8601 from/to timeframe. endpoint_id and job_id values are Base64 URL-encoded identifiers returned by get_app_endpoints and get_app_jobs respectively.
Apps & Organizations
list_orgsList organizations you can access.
List organizations accessible to the authenticated user. Returns org names, IDs, and metadata. Optionally filter by active_since timestamp or only include active orgs.
Parameters
active_since(string, optional) — ISO8601 timestamp; only return orgs updated since this time.active_only(boolean, optional) — If true, only return active orgs (not disabled or deleted). Defaults to false.
list_appsList applications you can access.
List Scout APM applications accessible to the authenticated user. Returns app names, IDs, and last reporting timestamps. Optionally filter by org_id or active_since timestamp.
Parameters
org_id(integer, optional) — Filter to a specific organization. If omitted, lists apps from all your organizations.active_since(string, optional) — ISO8601 timestamp; only return apps that have reported since this time. Defaults to 30 days ago.
get_usageBilling and usage for the current period.
Get billing and usage data for the current billing period for a Scout APM organization. Returns billing period dates, pricing style, APM transaction counts (with limit if applicable), node counts (for per-node pricing), error counts (if the error monitoring addon is enabled), and log bytes used (if the logs integration is enabled).
Parameters
org_id(integer, required) — The organization ID.
Metrics
Available app/endpoint metrics: apdex, response_time, response_time_95th, errors, throughput, queue_time. Minute-level metrics are retained for 30 days, which is also the maximum timeframe per request.
get_app_metricsTime-series metrics for an application.
Get time-series metrics data for a Scout APM application. Returns data points over the specified time range with automatic time-step selection.
Note: response_time_95th is pre-aggregated per minute, so values at coarser time steps are call-count-weighted averages of per-minute p95s, not a true p95 across all requests.
Parameters
app_id(integer, required) — The application ID.metric_type(string, required) — One ofapdex,response_time,response_time_95th,errors,throughput,queue_time.from(string, required) — Start time in ISO8601 format (max 30 days ago).to(string, required) — End time in ISO8601 format.
get_endpoint_metricsTime-series metrics for a specific endpoint.
Get time-series metrics data for a specific endpoint within an application. Same metric notes as get_app_metrics.
Parameters
app_id(integer, required) — The application ID.endpoint_id(string, required) — Base64 URL-encoded endpoint identifier fromget_app_endpoints.metric_type(string, required) — One ofapdex,response_time,response_time_95th,errors,throughput,queue_time.from(string, required) — Start time in ISO8601 format.to(string, required) — End time in ISO8601 format.
get_job_metricsTime-series metrics for a background job.
Get time-series metrics data for a specific background job within an application. Available job metrics: throughput, execution_time, latency, errors, allocations. Minute-level metrics are retained for 30 days.
Parameters
app_id(integer, required) — The application ID.job_id(string, required) — Base64 URL-encoded job identifier fromget_app_jobs.metric_type(string, required) — One ofthroughput,execution_time,latency,errors,allocations.from(string, required) — Start time in ISO8601 format.to(string, required) — End time in ISO8601 format.
Endpoints
get_app_endpointsList endpoints with performance metrics.
Get endpoints for a Scout APM application with their performance metrics. Returns endpoint names, response times, throughput, error rates, and 95th-percentile data — useful for identifying slow or problematic endpoints. Each endpoint includes an endpoint_id for use with other tools. Results are sorted (default: most time consumed first) and paginated; use limit/offset with the returned total_count and has_more to fetch additional pages.
Parameters
app_id(integer, required) — The application ID.from(string, required) — Start time in ISO8601 format.to(string, required) — End time in ISO8601 format.sort_by(string, optional) — Descending sort:time_consumed(default),response_time,throughput, orerror_rate.limit(integer, optional) — Max endpoints to return (default 50, max 200).offset(integer, optional) — Number of endpoints to skip, for pagination (default 0).
Background Jobs
get_app_jobsList background jobs with performance metrics.
Get all background jobs for a Scout APM application with their performance metrics. Returns job names, queues, throughput, execution time, latency, and time consumed — useful for identifying slow or problematic jobs. Each job includes a job_id for use with other tools.
Parameters
app_id(integer, required) — The application ID.from(string, required) — Start time in ISO8601 format.to(string, required) — End time in ISO8601 format.
Traces
get_app_endpoint_tracesRecent traces for an endpoint (slowest first).
Get recent traces for a specific endpoint within an application. Traces are ordered by total call time (slowest first) and limited to 100 results. Traces are retained for 7 days, which is also the maximum lookback. Use get_app_trace to get full trace details including spans.
Parameters
app_id(integer, required) — The application ID.endpoint_id(string, required) — Base64 URL-encoded endpoint identifier fromget_app_endpoints.from(string, required) — Start time in ISO8601 format (max 7 days ago).to(string, required) — End time in ISO8601 format.
get_app_job_tracesRecent traces for a background job (slowest first).
Get recent traces for a specific background job within an application. Traces are ordered by duration (slowest first) and limited to 100 results. Traces are retained for 7 days, which is also the maximum lookback. Use get_app_trace to get full trace details including spans.
Parameters
app_id(integer, required) — The application ID.job_id(string, required) — Base64 URL-encoded job identifier fromget_app_jobs.from(string, required) — Start time in ISO8601 format (max 7 days ago).to(string, required) — End time in ISO8601 format.
get_app_traceFull span tree for a single trace.
Get full details of a specific trace, including all spans and timing data. Use this after get_app_endpoint_traces or get_app_job_traces to dive into a specific slow request or job. Returns a span-tree structure with operation details, timings, and backtraces. Regular traces are retained for 7 days.
For saved insight traces from get_app_insights_history, also pass trace_type — saved traces live in separate tables and are retained long after regular traces expire.
Parameters
app_id(integer, required) — The application ID.trace_id(integer, required) — The trace ID fromget_app_endpoint_traces,get_app_job_traces, orget_app_insights_history.trace_type(string, optional) —SavedRequestorSavedSlowJobwhen fetching a saved insight trace. Omit for regular endpoint/job traces.
Errors
get_app_error_groupsGrouped exceptions with counts and recency.
Get error groups (exceptions) for a Scout APM application. Returns grouped errors with counts, last occurrence, and request details. Optionally filter by endpoint, or pass an error_group_id to get details for a specific group. Maximum lookback is 30 days.
Parameters
app_id(integer, required) — The application ID.from(string, required) — Start time in ISO8601 format (max 30 days ago).to(string, required) — End time in ISO8601 format.endpoint_id(string, optional) — Base64 URL-encoded endpoint identifier to filter errors by endpoint.error_group_id(integer, optional) — Get details for a specific error group.
Insights
get_app_insightsLive N+1, memory bloat, and slow query insights.
Get performance insights for a Scout APM application. Automatically identifies N+1 queries, memory bloat, and slow queries. This is a snapshot derived from recent traces (retained for 7 days) and is cached for 5 minutes.
Parameters
app_id(integer, required) — The application ID.insight_type(string, optional) —n_plus_one,memory_bloat, orslow_query. Omit for all types.limit(integer, optional) — Max insights per type to return (default 20).
get_app_insights_historyHistorical insights, retained indefinitely.
Get historical performance insights (N+1 queries, memory bloat, slow queries, anomalies) for a Scout APM application, filtered by date range. Unlike get_app_insights (a live snapshot of recent traffic), this queries persisted insights history, retained indefinitely — use it for past months or reports.
Each row is the deduplicated latest state of a recurring insight (one per type + endpoint), so there are no recurrence counts, and last_seen_at only advances when the insight re-exceeded detection thresholds. Each row links to a saved trace — pass the trace id and type to get_app_trace for full span detail. Results are sorted newest-first and paginated.
Parameters
app_id(integer, required) — The application ID.insight_type(string, optional) —n_plus_one,memory_bloat,slow_query, oranomaly. Omit for all types.from(string, optional) — Start time in ISO8601 format. Omit to query from the beginning of history.to(string, optional) — End time in ISO8601 format. Omit to query up to now.date_filter(string, optional) — Howfrom/toapply.active(default): insights active during the range.first_seen: only insights first seen within the range.limit(integer, optional) — Max insights to return (default 20, max 100).offset(integer, optional) — Number of insights to skip, for pagination (default 0).
Anomalies
get_app_anomaly_eventsAnomaly events overlapping a timeframe.
List anomaly events for a Scout APM application that overlap a timeframe. Returns events with metric, direction, severity, baseline/current values, and smart-monitor / deploy associations. Filter by state, metric, or endpoint. Maximum lookback is 30 days.
Parameters
app_id(integer, required) — The application ID.from(string, required) — Start time in ISO8601 format (max 30 days ago).to(string, required) — End time in ISO8601 format.state(string, optional) —open,closed, orall(default all).metric(string, optional) — Filter by metric:response_time,response_time_p95,throughput,error_rate,job_call_time, orjob_throughput.endpoint(string, optional) — Filter by endpoint name (exact match).
get_app_anomaly_eventDetails of a single anomaly event.
Get details of a single anomaly event by ID, including joined smart-monitor and deploy context. Use after get_app_anomaly_events to dig into a specific event.
Parameters
app_id(integer, required) — The application ID.anomaly_event_id(integer, required) — The anomaly event ID.
Setup
get_scout_setup_instructionsFramework-specific install & config steps.
Get Scout APM setup instructions for a specific framework or library. Returns detailed installation and configuration steps. This tool requires no authentication.
Parameters
framework(string, required) — One ofrails,django,flask,fastapi,bottle,falcon,starlette,dash,hug,celery,dramatiq,huey,rq,sqlalchemy.