MCP

Contents

The PostHog MCP server exposes Replay Vision through a set of tools your AI coding agent can call directly – design and create scanners, scan sessions on demand, read and search results, and manage alerts, backfills, and scouts without leaving your editor.

This works in any MCP client – Cursor, Codex, Claude Code, Windsurf, VS Code, and others.

What you can do

  • Design and create a scanner from your editor – describe what to look for in natural language and have the agent draft the scanner config, project its monthly credit spend, and create it.
  • Ask a one-off question about sessions you already have – scan a few recordings against a prompt without leaving a scheduled scanner behind.
  • Read observations as part of a coding task – pull the structured result and the model's reasoning into context as the agent works, and turn a real finding into a task.
  • Run the rest of the product – alerts, backfills, scouts, and the credit budget all have tools too.

The tools, by job

Replay Vision's MCP tools are all prefixed vision-. They fall into a few groups – see the overview for what scanners and observations are.

Scanners

  • vision-scanners-list – list every scanner in the project, with its config and credit figures.
  • vision-scanners-counts – count the project's scanners, in total and by type, and how many are enabled.
  • vision-scanners-get – read one scanner's config.
  • vision-scanners-draft – draft a full scanner config from a goal like "find where users get stuck during onboarding". Nothing is saved. Give it a monthly credit budget and it also picks sampling, model, and a credit limit to fit.
  • vision-scanners-suggest-tags – suggest tags for a classifier, grounded in your product data or the scanner's own observations. Nothing is saved.
  • vision-scanners-create – create a new scanner.
  • vision-scanners-update – edit an existing one.
  • vision-scanners-duplicate – copy a scanner into a new, disabled scanner, so you can try a variant without touching the original. Observations and alerts aren't copied.
  • vision-scanners-delete – remove one.

Sizing and spend

  • vision-scanners-estimate – project a proposed scanner's monthly observation volume and credit spend before you commit to it.
  • vision-quota-get – check the organization's credit budget: the limit, what's used, what's left, and the projected spend for the period.
  • vision-quota-spend-series-get – credit spend per day for the current period, across every project in the organization.

Call the first two before vision-scanners-create to avoid creating a scanner that would immediately blow the budget. Both speak credits: the estimate returns estimated_credits_per_month, and the quota tool returns remaining.

Scanning on demand

  • vision-scanners-inline-scan – answer a one-off question about specific sessions. Pass session IDs and a prompt, and no scheduled scanner is created. Prefer this over creating a scanner when you only have a question about recordings you already have.
  • vision-scanners-scan-session – run an existing scanner against one session now, bypassing its sampling and schedule.
  • vision-scanners-scan-sessions – run an existing scanner against up to 200 sessions now. Sessions it has already observed are skipped.
  • vision-observations-retry – re-run a failed or ineligible observation. It costs credits like any scan.
  • vision-requests-create – scan up to 200 sessions with a saved scanner or an inline question, and get back one request ID. An idempotency_key makes retries safe. See scan sessions from your backend.
  • vision-requests-get – read a request's status and each session's state and answer.

Scans run asynchronously. Poll vision-scanners-observations-list until each observation leaves pending or running, or poll vision-requests-get until the request is completed.

To scan sessions every time an event happens, have your agent build a workflow with a Replay Vision step instead. The workflow MCP tools create it as a draft.

Backfills

  • vision-scanners-backfills-estimate – count the sessions a backfill over a past window would scan, and the most it could cost.
  • vision-scanners-backfills-create – run a scanner over recordings from a past window of up to 365 days. It takes the estimate's credit total as a ceiling, and is rejected if the window now costs more.
  • vision-scanners-backfills-list and vision-scanners-backfills-get – check progress.
  • vision-scanners-backfills-cancel – stop a backfill. Scans already started finish and are billed, and a canceled backfill can't be resumed.
  • vision-scanners-backfills-resume – resume a backfill that paused when the quota ran out.

Reading observations

For one session, across every scanner:

  • vision-observations-list – every observation any scanner produced on one session.
  • vision-observations-get – fetch one observation in full, by ID.

For one scanner, across sessions:

  • vision-scanners-observations-list – a paginated list of the scanner's observations.
  • vision-scanners-observations-get – fetch one of the scanner's observations by ID.

List tools return a compact row per observation: its ID, session, status, and a one-line summary of what the scanner found, or why it found nothing. Fetch a row in full with vision-observations-get to read the whole result and its reasoning.

Across scanners:

  • vision-observations-search – search observations by meaning, like "users confused by the pricing page". It matches what the scanner wrote, so it finds sessions described in different words. Scope it to one scanner or search them all.
  • vision-scanners-watch-feed – rank recent observations by how worth watching their recordings are, with the reason each made the list.

Aggregate stats, rather than the rows themselves:

  • vision-scanners-observations-stats – one scanner's status mix and success rate, distinct sessions covered, rating totals, and per-type distributions (monitor verdict counts, classifier tag rankings, scorer score summary and histogram).
  • vision-scanners-variants-list – compare an experiment scanner's variants side by side: observation and people counts, median session length, and the rate each variant was sampled at, with the latest observations. If the scanner has a variant analysis scout, it also returns the scout's per-variant digests and the differences between variants. Experiment scanners only.

Rating results

  • vision-observations-label-create – rate an observation thumbs up or down, optionally with written feedback. It's the same shared rating the app records, and ratings steer how the scanner judges later sessions. Ask your agent to record your verdict, not its own reading of the result.
  • vision-observations-label-delete – remove a rating.

Acting on findings

  • vision-observations-create-task – create a PostHog task from an observation's finding, so it can be triaged and fixed. It doesn't start a coding agent.
  • vision-observations-signal-reports-list – list the inbox reports an observation's signals were grouped into.
  • vision-scanners-self-driving-stats – what a scanner that emits signals has led to: signals emitted, reports it contributed to, and pull requests opened and merged from them.

Impact cohorts

  • vision-scanners-impact-get – get affected sessions and users for a scanner over a trailing window. Monitors count verdict-yes observations. Classifiers require a tag parameter. Scorers require min_score and/or max_score.
  • vision-scanners-affected-cohort-create – save the affected users as a static cohort. Same qualifiers as the impact tool. The cohort is a dated snapshot and doesn't live-update.

Alerts

  • vision-alerts-list and vision-alerts-get – read a scanner's alerts.
  • vision-alerts-create, vision-alerts-update, and vision-alerts-delete – manage them. A new alert notifies nobody until it has a destination.
  • vision-alerts-destinations-create and vision-alerts-destinations-delete – add or remove a Slack or webhook destination.
  • vision-alerts-events-list – an alert's history of checks, firings, and resolutions.
  • vision-alerts-reset – reset a broken alert and run a fresh check. Only broken alerts can be reset.

Scouts

  • vision-scanners-scouts-create – create a scout that watches one scanner on a schedule and files a report each run.
  • vision-scanners-scout-reports-list and vision-scanners-scout-reports-get – read the reports a scanner's scouts have filed.

Each tool needs the same access as the matching action in the app: read tools need read access to scanners and session recordings, and alert tools need alert access. Tools that run the model, such as creating or updating a scanner, drafting one, scanning, or searching, also need your organization to have accepted AI data processing.

Agent skills

PostHog also publishes three Replay Vision agent skills: instructions that teach an agent how to use these tools well. They ship in the PostHog AI plugin for Claude Code, Codex, Cursor, and Gemini CLI, so an agent with the plugin installed picks them up when the task calls for them.

  • designing-replay-vision-scanners – designs a scanner that produces trustworthy observations: one visible question, the right type, a query that selects only sessions able to answer it, and a prompt that asks for on-screen proof.
  • creating-replay-vision-scanners – creates a scanner and sizes it safely, estimating its spend and checking the budget before it goes live.
  • exploring-replay-vision-observations – pulls a scanner's observations, summarizes patterns across sessions, drills into recordings, and turns real issues into tasks or insights.

Example prompts

Try these with your MCP-enabled agent:

  • How many users were affected by my "Dead-end pages" monitor in the last 30 days?
  • Create a cohort from the users my "User intent" classifier tagged as support_seeking.
  • Create a Replay Vision scanner that flags sessions where users get stuck on the /checkout page, narrow to enterprise customers, and start at 25% sampling. Estimate the cost first.
  • Scan session abc123 with the "Dead-end pages" scanner and tell me what it found, including the reasoning.
  • List the last 20 observations from my "Frustration score" scanner and summarize what's driving high scores.
  • Find every Replay Vision observation for session abc123 and give me a one-line summary of each.
  • How many Replay Vision credits do we have left this period, and which scanner is spending the most?
  • How many users did my "Dead-end pages" monitor affect in the last 14 days? Save them as a cohort.
  • Show me the last 10 observations from my "Dead-end pages" scanner. I'll tell you which ones it got wrong, then record my ratings with feedback.
  • Which recordings should I watch this week?
  • Find sessions where users seemed confused by the pricing page.
  • Backfill my "Checkout errors" scanner over the last 30 days. Show me the estimate first.
  • Set up an alert that posts to Slack whenever my "Dead-end pages" monitor answers yes.

See the MCP server docs for client setup, and the Replay Vision overview for product concepts.

Still have questions?

Was this page useful?