Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Replay MCP server

Vendor MCP
Open markdown

The Replay MCP connector routes your AI agent's tool calls to Replay's own MCP server through Scalekit. Each user signs in to Replay once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 32 tools.

Tools
32
What they doRead · write · destructive
32 · 0 · 032 read0 write0 destructive
Users sign in with
OAuth app
Your own Replay MCP server app

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Replay MCP connection

    In AgentKit > Connections, create a Replay MCP connection and copy its redirect URI. The name you give it is the connection_name your code passes. See Configure connections.

  4. Register an OAuth app

    Replay MCP server connections use your own OAuth app. Register one with Replay MCP server and add the redirect URI you copied.

    Then enter the app's Client ID and Client Secret on the Replay MCP connection.

  5. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'replaymcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Replay MCP:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'replaymcp_annotations',
    toolInput: { recordingId: 'YOUR_RECORDINGID' },
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • replaymcp_annotationsInspect the annotations in a recording.Read-only

    Annotations

    Inspect the annotations in a recording. Annotations are timestamped records attached by the runtime and integrations (e.g. Cypress, Playwright, React DevTools, network, localStorage). Call with no arguments to list all annotation kinds in the recording with their counts. Pass a 'kind' to return the annotation data for that kind (paginated, optionally filtered by text). For WebSocket traffic (DOMWebSocket annotations), use the WebSocketMessages tool instead.

    Inputs

    recordingIdstringrequired
    The ID of the recording to analyze.
    filterByTextstring
    Substring filter (case-insensitive) on annotation contents. Only applies when a kind is provided.
    kindstring
    Annotation kind to return data for. When omitted, lists all annotation kinds in the recording with their counts.
    limitinteger
    Pagination page size (default 25). Only applies when a kind is provided.default 25
    offsetinteger
    Pagination offset. Only applies when a kind is provided.default 0
  • replaymcp_consolemessagesShow console API messages (console.log, console.warn, console.error, etc.).Read-only

    ConsoleMessages

    Show console API messages (console.log, console.warn, console.error, etc.). Note: console errors are distinct from runtime exceptions — use UncaughtException and ReactException for those. Start with mode 'summary' for an overview with message counts and the last errors/warnings. Use 'messages' to browse the full paginated list (filter by level, text, node_modules visibility). Use 'message-detail' with a point reference for full detail on a single message including stack trace. Call RecordingOverview first for broader context.

    Inputs

    recordingIdstringrequired
    The ID of the recording to analyze.
    filterByTextstring
    Substring filter on message text (messages mode only)
    levelstring
    Filter by console message level (messages mode only). 'all' shows all levels.one of errorwarninginfologalldefault all
    limitinteger
    Pagination page size (default 25, messages mode only)default 25
    modestring
    Analysis mode: summary (overview with counts and last errors, default), messages (paginated filtered list), message-detail (full detail for a single message by point)one of summarymessagesmessage-detaildefault summary
    offsetinteger
    Pagination offset (messages mode only)default 0
    pointstring
    Point reference for message-detail mode (e.g. 'Point:42'). Required for message-detail.
    showNodeModulesboolean
    When true, include messages originating from node_modules/library code (messages mode only, default false).default false
  • replaymcp_describepointDescribes the application state at a code execution point.Read-only

    DescribePoint

    Describes the application state at a code execution point. Shows the containing function with executed/not-executed annotations, variable values, and timestamps. Use dependencyChain=true to trace the full causal chain back to the origin event. Get execution points from other tools (ConsoleMessages, ReactRenders, ReduxActions, Logpoint, etc.).

    Inputs

    pointstringrequired
    The execution point to describe.
    recordingIdstringrequired
    The ID of the recording to analyze.
    dependencyChainboolean
    If true, show the full dependency chain from this point back to its origin source.
    describeLibraryCodeboolean
    Whether to describe library code.
  • replaymcp_evaluateEvaluates an expression at a code execution point.Read-only

    Evaluate

    Evaluates an expression at a code execution point. Use for ad-hoc value inspection beyond what DescribePoint shows. Expressions must be synchronous and immediately inspectable. Do not use async functions or promises; replay cannot inspect their eventual results. Defaults to frame scope; use global scope explicitly when needed. String results are returned in full up to maxStringLength characters (default 100000); longer strings end with a truncation notice giving the stringOffset to read the next part. String results longer than about 8,000 characters are read by evaluating the expression a second time, so use a single, side-effect-free expression to get the full text.

    Inputs

    expressionstringrequired
    A synchronous JavaScript expression to evaluate. Do not use async functions or promises; their eventual results cannot be inspected in replay.
    pointstringrequired
    The execution point at which to evaluate the expression. Get point references from tools such as DescribePoint, ConsoleMessages, ReactRenders, ReduxActions, or Logpoint.
    recordingIdstringrequired
    The ID of the recording to analyze.
    maxStringLengthinteger
    When the result is a string, the maximum number of characters to return (default 100000).default 100000
    scopestring
    Evaluate in the selected scope. Frame scope can read local variables at code execution points; global scope evaluates against the page global.one of frameglobaldefault frame
    stringOffsetinteger
    When the result is a string, the character offset to start returning from. Use the offset given in a truncation notice to read the next part.default 0
  • replaymcp_executiondelayComputes execution delays for functions based on their source length and the delay before the first breakpoint in each function executes.Read-only

    ExecutionDelay

    Computes execution delays for functions based on their source length and the delay before the first breakpoint in each function executes. Each breakpoint is attributed to the innermost function covering it, and each function's weight is computed as its source length minus the sum of its children's lengths.

    Inputs

    pathstringrequired
    The path of the source file within the recording.
    recordingIdstringrequired
    The ID of the recording to analyze.
  • replaymcp_getpointcomponentGets the React component being rendered at a code execution point.Read-only

    GetPointComponent

    Gets the React component being rendered at a code execution point.

    Inputs

    pointstringrequired
    The execution point at which to get the rendered React component.
    recordingIdstringrequired
    The ID of the recording to analyze.
  • replaymcp_getstackGets the call stack at a code execution point.Read-only

    GetStack

    Gets the call stack at a code execution point. Use to understand execution context. Pair with DescribePoint for full state.

    Inputs

    pointstringrequired
    The execution point at which to get the call stack.
    recordingIdstringrequired
    The ID of the recording to analyze.