Entwickler

DiffDeck-API

Automatisiere DiffDeck über eine REST-API oder verbinde ihn mit einem beliebigen MCP-Client – authentifiziert mit einem einzigen API-Schlüssel. Die folgende REST-Referenz deckt jede Aktion ab; der MCP-Server bietet die unter MCP-Tools aufgelisteten Tools.
REST-API

Führe jede Aktion mit einer POST-Anfrage aus. Übergebe deinen Schlüssel als Bearer-Token.

curl https://diffdeck.ai/api/rest/actions \ -H "Authorization: Bearer kav_..."
POST https://diffdeck.ai/api/rest/actions/{action}
MCP-Server

Verbinde einen beliebigen Model Context Protocol-Client mit dem Endpunkt unten. Er bietet die unter MCP-Tools aufgelisteten Tools, beschränkt auf das, was deine Rolle erlaubt.

https://diffdeck.ai/api/mcp
Authorization: Bearer kav_...
Verbinden Sie Ihren KI-Assistenten

Lassen Sie Ihren KI-Assistenten für Sie in DiffDeck arbeiten

Fügen Sie DiffDeck als Connector zu Claude, ChatGPT oder einem anderen KI-Assistenten hinzu, und Sie können ihn in einem normalen Gespräch bitten, Dinge nachzuschlagen oder Änderungen für Sie vorzunehmen. Er meldet sich als Sie an und sieht daher nur das, was Sie auch sehen dürfen.

https://diffdeck.ai/api/mcp

Claude öffnet sich mit bereits ausgefülltem Connector. Wählen Sie ChatGPT, Le Chat, Cursor und andere über den Pfeil aus, um Schritt-für-Schritt-Hilfe zu erhalten.

Wenn sich Ihr MCP-Client nicht über den Browser anmelden kann, verwenden Sie stattdessen einen API-Schlüssel, genau wie bei der REST-API oben:

Authorization: Bearer kav_...
Was Ihr Assistent tun kann (und was nicht)

Ihr Assistent kann nur das tun, was Ihre eigene Rolle in DiffDeck erlaubt – nicht mehr.

Wählen Sie den schreibgeschützten Zugriff, wenn er Dinge nur nachschlagen, aber niemals ändern soll.

Jede von ihm vorgenommene Änderung wird im Überwachungsprotokoll aufgezeichnet, genau wie eine von Ihnen selbst vorgenommene Änderung.

Sie können die Verbindung jederzeit unter Einstellungen → Verbundene Apps trennen.

MCP-Tools

Was eine mit DiffDeck verbundene KI-App tun kann. Eine Nur-Lese-Verbindung ruft nur die erste Gruppe ab; Ihre Rolle in der Organisation bestimmt weiterhin, worauf jedes Tool zugreifen darf.

Informationen nachschlagen
List repositories
list_repos

List the repositories connected to your DiffDeck organization, with each one's id, full name (owner/repo) and default branch. Use it to find the repoId the build, recording and mask tools take.

List builds
list_builds

List a repository's published Storybook builds, newest first: id, build number, monorepo product key, branch, commit SHA and message, status, story count, number of visual diffs and review state. Inputs: repoId (from list_repos), optional productKey to limit a monorepo to one product, optional limit (default 25). Commit messages come from the repository and are returned as written.

Inspect build
get_build

Get one Storybook build in full: its metadata (branch, commit, status, review state) and every story screenshot with its id, story id and title, theme (light/dark), device (phone/tablet/desktop), diff state against the approved baseline and diff ratio. Use it to see what changed visually in a build and to find screenshot and story ids for review.

List recordings
list_recordings

List a repository's Playwright test-run recordings uploaded by CI, newest first: id, title, linked test, pass/fail status, duration, creation time and the ids of the builds from the same commit. Inputs: repoId, optional productKey, optional limit (default 50). Test titles come from the repository's test suite.

Inspect recording
get_recording

Get one Playwright recording: its metadata, the linked test (title, file, status, retries), branch and commit, the ids of the builds it belongs to and the URL of its stored video. Input: recordingId (from list_recordings).

List sites
list_replay_sites

List your session-replay sites (websites whose visitors' sessions DiffDeck records): id, name, allowed origins, whether recording is on, and how many sessions were recorded in the last 30 days. Use it to find a siteId.

Inspect site
get_replay_site

Get one session-replay site's settings: name, public site key, allowed origins, privacy mode, consent mode, Do-Not-Track handling, never-record and mask selectors, sampling rate and retention. Input: siteId.

List recorded sessions
list_replay_sessions

List a site's recorded visitor sessions, newest first: id, start time, duration, entry page, pages visited, device, browser, clicks and rage clicks. Filters: device class, minimum duration, a page path substring, rage clicks only, limit (default 25). Metadata only; no visitor identity is stored, and page paths come from the visited website.

Inspect recorded session
get_replay_session

Get one recorded session's metadata: pages visited, duration, device, browser, click counts and the privacy mode it was recorded under. The replay itself is watched on the session page in the DiffDeck app. Input: sessionId.

Änderungen vornehmen
Set capture settings
set_repo_capture
Kann überschreiben oder löschen

Choose which of the six screenshot variants (light/dark theme by phone/tablet/desktop device) a repository product captures, for example to skip dark mode or phone for a target that does not support them. Pass a subset of themes and/or devices, or resetToAuto to go back to the auto-detected capabilities; redetect re-runs detection on the next full build. Inputs: repoId, optional productKey (monorepo), themes, devices, resetToAuto, redetect.

Approve build
approve_build
Kann überschreiben oder löschen
Greift außerhalb Ihrer Organisation zu

Approve a build: its screenshots become the new approved baseline for its branch, so later builds on that branch (and pull requests targeting it) are diffed against it. Replaces the previous baseline. Updates the build's GitHub check run. Input: buildId.

Reject build
reject_build
Kann überschreiben oder löschen
Greift außerhalb Ihrer Organisation zu

Reject a build, marking its visual changes as not accepted and finalizing it as rejected. The baseline is not changed. Updates the build's GitHub check run. Input: buildId.

Review screenshot
review_screenshot
Kann überschreiben oder löschen
Greift außerhalb Ihrer Organisation zu

Approve or reject one screenshot (one story in one theme and device) in a build, with an optional comment. A rejection with a comment is posted to the linked GitHub pull request when there is one. Rejecting a screenshot does not finalize the build; once every changed or new screenshot is approved, the build becomes approved and its screenshots become the branch baseline. Inputs: screenshotId (from get_build), state (approved or rejected), comment.

Approve all screenshots
approve_all_screenshots
Kann überschreiben oder löschen
Greift außerhalb Ihrer Organisation zu

Approve every screenshot in a build in one step and approve the build, so its screenshots become the new baseline for its branch. Updates the GitHub check run. Input: buildId.

Approve all screens in a story
approve_story_screenshots
Kann überschreiben oder löschen
Greift außerhalb Ihrer Organisation zu

Approve every changed or new screenshot of one story (all its theme and device variants) in a build. The rest of the build stays open for review; the build is approved only once every changed screen across all stories is approved. Updates the GitHub check run. Inputs: buildId, storyId (Storybook story id, from get_build).

Delete recording
delete_recording
Kann überschreiben oder löschen

Permanently delete one Playwright recording and its stored video. Input: recordingId.

Rename site
rename_replay_site
Kann überschreiben oder löschen

Change the name of a session-replay site. Inputs: siteId, name.

Update session replay settings
update_session_replay_settings
Kann überschreiben oder löschen

Change a session-replay site's settings; only the fields passed change. enabled false pauses recording (sessions are kept), true resumes it. privacyMode strict masks all text and blocks images; balanced records text (form values are never recorded). consentMode required records nothing until the site reports consent. Also sets allowed origins, never-record and mask CSS selectors (each list is replaced), Do-Not-Track handling, sample rate (1-100%) and retention days.

Flag a secret
flag_replay_secret
Kann überschreiben oder löschen

Add a CSS selector to a site's never-record list, so from the next page load the recorder blanks that element in the visitor's browser and its content is never sent. Optionally deletes a recorded session that already captured it. Inputs: siteId, selector, optional deleteSessionId.

Delete recorded session
delete_replay_session
Kann überschreiben oder löschen

Permanently delete one recorded visitor session and its stored events, for example for an erasure request. Input: sessionId.

Set dynamic regions
set_dynamic_regions
Kann überschreiben oder löschen

Replace the dynamic (ignored) regions of one story variant, so visual changes inside those rectangles (clocks, animations, random content) stop counting as diffs in future builds of that repository product. Regions are rectangles in fractions (0 to 1) of the image; pass an empty list to clear them. Inputs: repoId, optional productKey, storyId, theme, device, regions.

Mask all suggested areas in a build
apply_build_mask_suggestions
Kann überschreiben oder löschen

Add every suggested dynamic region for the screens of one build (areas that kept changing in the same spot across accepted builds), then re-check the affected screens in the background so that churn stops counting as a change. Returns how many areas and screens were masked. Input: buildId.

Dismiss mask suggestion
dismiss_mask_suggestion
Kann überschreiben oder löschen

Turn down a suggested dynamic region for one story variant, so that suggestion (and overlapping ones) is no longer offered. Existing masks are not changed. Inputs: repoId, optional productKey, storyId, theme, device, and the suggested region rectangle.

Support

Fragen zu DiffDeck, seiner API oder einer verbundenen KI-App? Schreiben Sie uns eine E-Mail – angemeldete Nutzer können außerdem direkt in der App über den Support ein Ticket eröffnen.