Official agent skill

React Devtools MCP

by sanity-io in sanity-io/ui

Inspect and profile the React component tree of a running Storybook story through chrome-devtools-mcp (React DevTools over the Chrome DevTools Protocol, via react-devtools-cdt-mcp).

OfficialMITAuto-check passedFrontend & Design

Install React Devtools MCP

skills CLI
$ npx skills add sanity-io/ui --skill react-devtools-mcp -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sanity-io/ui react-devtools-mcp --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sanity-io/ui.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/react-devtools-mcp .claude/skills/react-devtools-mcp && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
react-devtools-mcp
GitHub stars
176
Token cost
~2k tokens
SKILL.md length
451 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Inspect and profile the React component tree of a running Storybook story through chrome-devtools-mcp (React DevTools over the Chrome DevTools Protocol, via react-devtools-cdt-mcp).

  • Debugging why a @sanity/ui component re-renders
  • SKILL.md covers Setup (three processes), Workflow, Reading the output and Gotchas
  • Calls pnpm
  • Finding slow components

What it does

React Devtools MCP is an agent skill from sanity-io/ui, published by the product's own GitHub organization. Inspect and profile the React component tree of a running Storybook story through chrome-devtools-mcp (React DevTools over the Chrome DevTools Protocol, via react-devtools-cdt-mcp). Use when debugging why a @sanity/ui component re-renders, finding slow components, reading props and hooks at runtime, or investigating a perf regression in a story. Works from Cursor's MCP config and from the terminal (chrome-devtools CLI daemon), so it also works for cloud agents.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Browser testing, React components and MCP servers. It works with Chrome DevTools, React, Model Context Protocol and Storybook. The repository describes itself as: The Sanity UI design system. The licence is MIT.

When your agent uses it

  • Debugging why a @sanity/ui component re-renders
  • Finding slow components
  • Reading props and hooks at runtime
  • Investigating a perf regression in a story

Example prompts

  • “/react-devtools-mcp”

What it can do on your machine

Read from SKILL.md and the folder at commit 0930b21. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

React Devtools MCP loads about 2k tokens when it runs. Until then it costs about 121 tokens; SKILL.md has 451 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~121
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sanity-io/ui at commit 0930b21, republished under its MIT licence (© sanity-io). 451 words, ~1,967 tokens.

Download SKILL.mdSave it as .claude/skills/react-devtools-mcp/SKILL.md (or your agent's skills folder).
name
react-devtools-mcp
description
Inspect and profile the React component tree of a running Storybook story through chrome-devtools-mcp (React DevTools over the Chrome DevTools Protocol, via react-devtools-cdt-mcp). Use when debugging why a @sanity/ui component re-renders, finding slow components, reading props and hooks at runtime, or investigating a perf regression in a story. Works from Cursor's MCP config and from the terminal (chrome-devtools CLI daemon), so it also works for cloud agents.

React DevTools for agents (chrome-devtools-mcp + react-devtools-cdt-mcp)

react-devtools-cdt-mcp is not an MCP server. It is a browser library that installs a lightweight React DevTools hook in the page and registers twelve react_* tools that chrome-devtools-mcp discovers through its experimental third-party developer tools API (--categoryExperimentalThirdParty=true). chrome-devtools-mcp is the MCP server; it talks to Chrome over the Chrome DevTools Protocol.

In this repo the Storybook dev server loads react-devtools-cdt-mcp/register in the preview iframe when ENABLE_REACT_DEVTOOLS_MCP=true (plugin in apps/storybook/.storybook/main.ts). Nothing changes for pnpm dev or the static build.

Setup (three processes)

bash
# 1. Storybook with the React DevTools hook installed (port 6006, long-running)
pnpm react-devtools-mcp:storybook

# 2. Chrome with the remote debugging port open, showing one story
#    (url defaults to iframe.html?viewMode=story&id=primitives-button--default)
pnpm react-devtools-mcp:chrome
pnpm react-devtools-mcp:chrome "http://localhost:6006/iframe.html?viewMode=story&id=components-menubutton--default"
pnpm react-devtools-mcp:chrome --headless            # no display (CI, cloud VM without X)

# 3. chrome-devtools-mcp attached to that Chrome — pick ONE of:
#    a) Cursor: .cursor/mcp.json defines the `chrome-devtools` server (the workspace-installed,
#       lockfile-pinned chrome-devtools-mcp under apps/storybook/node_modules) with
#       --categoryExperimentalThirdParty=true --browserUrl=http://127.0.0.1:9222
#    b) Terminal / cloud agents (same tools, no MCP client needed):
pnpm --filter sanity-ui-storybook exec chrome-devtools start \
  --categoryExperimentalThirdParty=true --browserUrl=http://127.0.0.1:9222

Stories must be opened through iframe.html?viewMode=story&id=<story-id>. Tool discovery only looks at the top-level document; the manager UI at / embeds stories in an iframe and exposes nothing. Story ids are in http://localhost:6006/index.json (primitives-button--default, components-menubutton--default, ...).

Workflow

Every command below is shown for the CLI (CD="pnpm --filter sanity-ui-storybook exec chrome-devtools"). Through MCP the tool names are identical (list_pages, list_3p_developer_tools, execute_3p_developer_tool, take_snapshot, click, navigate_page); params is a JSON string.

bash
$CD list_pages                                   # page ids; the story page is normally 1
$CD list_3p_developer_tools 1                    # REQUIRED once per page load: discovers the react_* tools
$CD execute_3p_developer_tool 1 react_get_component_tree --params '{"depth":40}'
$CD execute_3p_developer_tool 1 react_find_components --params '{"name":"Button"}'
$CD execute_3p_developer_tool 1 react_get_component_by_uid --params '{"uid":"r20","includeHooks":true}'
$CD execute_3p_developer_tool 1 react_get_component_source --params '{"uid":"r20"}'
$CD execute_3p_developer_tool 1 react_get_parent_stack --params '{"uid":"r20"}'

# Profile an interaction
$CD execute_3p_developer_tool 1 react_start_profiling --params '{"traceName":"open-menu"}'
$CD take_snapshot 1                              # find the element uid to interact with (e.g. 1_1)
$CD click 1 1_1
$CD execute_3p_developer_tool 1 react_stop_profiling
$CD execute_3p_developer_tool 1 react_get_trace_overview --params '{"traceName":"open-menu"}'
$CD execute_3p_developer_tool 1 react_get_commit_report --params '{"traceName":"open-menu","commitIndex":1}'

$CD navigate_page 1 --type url --url "http://localhost:6006/iframe.html?viewMode=story&id=<id>"
$CD stop                                         # stop the daemon when done

Add --output-format json for machine-readable output: the result is {"message": "<json>"}, i.e. parse message a second time.

Tools: react_get_component_tree, react_get_component_by_uid, react_get_component_by_dom_element ({"element":{"uid":"1_1"}} from take_snapshot), react_find_components, react_get_component_source, react_get_owner_stack_trace, react_get_parent_stack, react_get_owner_stack, react_start_profiling, react_stop_profiling, react_get_trace_overview, react_get_commit_report.

Reading the output

Component uids (r20) are stable across tools and re-renders but reset on page reload — re-run list_3p_developer_tools and react_get_component_tree after navigate_page or a reload. React Compiler output shows as Forget(ButtonComponent); styled-components as styled.button. Durations are milliseconds; componentsChanged counts fibers that rendered in that commit.

Real run against components-menubutton--default (profile around a click on the "Open" button):

$CD execute_3p_developer_tool 1 react_stop_profiling
{"status": "stopped", "traceName": "open-menu", "commits": 5}

$CD execute_3p_developer_tool 1 react_get_trace_overview --params '{"traceName":"open-menu"}'
[{"commit":0,"committedAt":732,"renderDuration":2.3,"layoutDuration":0.6,"passiveDuration":0.8,"componentsChanged":166},
 {"commit":1,"committedAt":739,"renderDuration":2.5,"layoutDuration":2.5,"passiveDuration":0.2,"componentsChanged":156},
 ...]

$CD execute_3p_developer_tool 1 react_get_commit_report --params '{"traceName":"open-menu","commitIndex":1}'
priority: Sync, 156 components, sorted by actualDuration:
  r150 forwardRef styled.div            actual=3.00 self=0.30
  r152 function   Forget(FlexComponent) actual=2.70 self=0.10
  r0   function   Forget(MenuButton)    actual=2.50 self=0.20

react_get_component_source resolves to the workspace source through Vite, e.g. http://localhost:6006/@fs/.../packages/ui/src/core/primitives/button/button.tsx:21, and react_get_component_by_uid with includeHooks lists hooks such as Theme_v2 with their values.

Show full SKILL.md (186 more words)Show less

Gotchas

  • execute_3p_developer_tool answers "Tool react_... not found" until list_3p_developer_tools has run for that page load.
  • No react group listed: the page was not loaded from the ENABLE_REACT_DEVTOOLS_MCP=true server, or you are on the manager page (/) instead of iframe.html.
  • The chrome-devtools CLI and the MCP server are the same daemon; do not run both against the same Chrome at once. pnpm --filter sanity-ui-storybook exec chrome-devtools status / stop.
  • Chrome keeps running after react-devtools-mcp:chrome returns (it prints the pid); the profile is reused from apps/storybook/node_modules/.cache/react-devtools-mcp/chrome-profile. Running the command again while that Chrome is up opens the url as a new tab in it ("Reused the browser that was already listening") instead of starting a second Chrome.
  • "Chrome exited before opening its debugging port": a Chrome using the profile is already running without --remote-debugging-port. Close it and retry. --port must be 1–65535.
  • Prefer --headless on machines without a display; the script turns it on automatically when DISPLAY is unset on Linux. Set CHROME_PATH if Chrome is not found.
  • To let chrome-devtools-mcp launch its own Chrome instead, drop --browserUrl (and skip step 2); then open the story with navigate_page or new_page.

© sanity-io, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/react-devtools-mcp of sanity-io/ui.

Open the folder on GitHubat commit 0930b21

Compare with similar skills

React Devtools MCP next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

React Devtools MCP compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
React Devtools MCP this skillsanity-io/ui176—~2kAutomated safety check: PassMIT
Design Reviewpproenca/dot-skills215—~3.4kAutomated safety check: PassMIT
Extension Puppeteer Debuggingmengxi-ream/read-frog10k—~2kAutomated safety check: NotesGPL-3.0
Wonder BlocksKhan/wonder-blocks163—~3.2kAutomated safety check: PassMIT
Chrome Devtools MCPmanagedcode/dotnet-skills486—~2.2kAutomated safety check: PassMIT
Design To Codeyonatangross/orchestkit289—~4.4kAutomated safety check: NotesMIT

Similar skills

  • Design Review

    pproenca/dot-skills

    Structured UI design review — existing code (React/JSX, CSS, Tailwind) and, when behaviour matters, the running app in a real browser — reported as a prioritised Before / After / Why table.

    215 GitHub stars~3.4k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Extension Puppeteer Debugging

    mengxi-ream/read-frog

    Debug the built Read Frog extension in real Chrome. An agent skill from mengxi-ream/read-frog.

    10k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check: notes
  • Wonder Blocks

    Khan/wonder-blocks

    Implements user interfaces using the Wonder Blocks (WB) design system — Khan Academy's React component library.

    163 GitHub stars~3.2k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Chrome Devtools MCP

    managedcode/dotnet-skills

    Use Chrome DevTools MCP from .NET agents and .NET-focused repos to inspect, debug, and automate Chrome through an MCP client.

    486 GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Design To Code

    yonatangross/orchestkit

    Mockup-to-component pipeline using Google Stitch, 21st.dev, and Storybook MCP.

    289 GitHub stars~4.4k tokensUpdated today
    Frontend & DesignAuto-check: notes
  • Mirroir Onboard

    jfarcand/mirroir-mcp

    Onboard a consumer web app to mirroir's .mirroir/ dotfile by EXPLORING the running app (chrome-devtools-mcp) — derive real selectors from the accessibility tree, exercise each surface's primary…

    245 GitHub stars~4.4k tokensUpdated 2 days ago
    Testing & QAAuto-check: notes

More from sanity-io/ui

  • UI Demo

    sanity-io/ui

    Official

    Record polished UI demo videos using Playwright. An agent skill from sanity-io/ui.

    176 GitHub starsUsed in 4 repos~3.8k tokens
    Auto-check passed
  • Official

    Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation).

    176 GitHub starsUsed in 6 repos~6.3k tokens
    Auto-check passed
  • Official

    Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces.

    176 GitHub starsUsed in 2 repos~5.8k tokens
    Auto-check passed
  • Official

    Integrates Sanity Live with Next.js Cache Components in next-sanity v13+ apps.

    176 GitHub stars~4.2k tokensUpdated today
    Auto-check passed

Questions about React Devtools MCP

What does React Devtools MCP do?

Inspect and profile the React component tree of a running Storybook story through chrome-devtools-mcp (React DevTools over the Chrome DevTools Protocol, via react-devtools-cdt-mcp). React Devtools MCP is an agent skill from sanity-io/ui, published by the product's own GitHub organization. Inspect and profile the React component tree of a running Storybook story through chrome-devtools-mcp (React DevTools over the Chrome DevTools Protocol, via react-devtools-cdt-mcp).

When should I use React Devtools MCP?

React Devtools MCP fits situations like: debugging why a @sanity/ui component re-renders; finding slow components; reading props and hooks at runtime; investigating a perf regression in a story.

How do I install React Devtools MCP in Claude Code?

Run `npx skills add sanity-io/ui --skill react-devtools-mcp -a claude-code`. Or copy the skill folder (.agents/skills/react-devtools-mcp in sanity-io/ui) into .claude/skills/react-devtools-mcp in your project. Claude Code loads it when a task matches its description.

How do I install React Devtools MCP in Codex?

Run `npx skills add sanity-io/ui --skill react-devtools-mcp -a codex`. Or copy the skill folder (.agents/skills/react-devtools-mcp in sanity-io/ui) into .agents/skills/react-devtools-mcp in your project. Codex loads it when a task matches its description.

Can I use React Devtools MCP in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sanity-io/ui --skill react-devtools-mcp -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/react-devtools-mcp, .gemini/skills/react-devtools-mcp, .github/skills/react-devtools-mcp and .opencode/skills/react-devtools-mcp in your project.

What does React Devtools MCP need to run?

Going by SKILL.md and its folder, React Devtools MCP needs the command-line tools its instructions call (pnpm).

Does React Devtools MCP access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is React Devtools MCP safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does React Devtools MCP use?

React Devtools MCP is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does React Devtools MCP use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to React Devtools MCP?

Skills that share tags, products or a category with React Devtools MCP: Design Review (pproenca/dot-skills, 215 stars), Extension Puppeteer Debugging (mengxi-ream/read-frog, 10k stars), Wonder Blocks (Khan/wonder-blocks, 163 stars) and Chrome Devtools MCP (managedcode/dotnet-skills, 486 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains React Devtools MCP?

sanity-io (a GitHub organization, an official publisher) maintains it in sanity-io/ui, which has 176 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 7, 2026.

Source: sanity-io/ui on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.