react-devtools-mcp
Skill by sanity-io
Inspects and profiles the React component tree of a running Storybook story through chrome-devtools-mcp. Helps debug re-renders, find slow components and read props and hooks at runtime. Works from Cursor's MCP config or the terminal.
Install react-devtools-mcp
Built from the published package, never by AI.
git clone --depth 1 https://github.com/sanity-io/ui /tmp/ui && mkdir -p ~/.claude/skills && cp -r /tmp/ui/.agents/skills/react-devtools-mcp ~/.claude/skills/react-devtools-mcpRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/sanity-io/ui /tmp/ui && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/ui/.agents/skills/react-devtools-mcp ~/.gemini/antigravity-cli/skills/react-devtools-mcpAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill lets an AI assistant inspect and profile the React component tree of a running Storybook story. It uses react-devtools-cdt-mcp, a browser library that installs a lightweight React DevTools hook in the page and registers react_* tools. chrome-devtools-mcp discovers those tools through its experimental third-party developer tools API and talks to Chrome over the Chrome DevTools Protocol.
The skill is written for developers working on the Sanity UI repository, especially when debugging why a @sanity/ui component re-renders, finding slow components, or investigating a performance regression in a story. It works from Cursor's MCP config and from the terminal through the chrome-devtools CLI daemon, so cloud agents can use it too.
Written from the project's SKILL.md and checked against it.
What it can do
- react_get_component_treeReturns the React component tree of the story page.
- react_find_componentsFinds components by name, such as Button.
- react_get_component_by_uidReads one component by uid, optionally with its hooks and values.
- react_get_component_sourceResolves a component to its workspace source file through Vite.
- react_get_parent_stackReturns the parent stack for a component uid.
- react_start_profilingStarts a named profiling trace around an interaction, such as a click.
- react_stop_profilingStops the active profiling trace.
- react_get_commit_reportLists components in one commit, sorted by actual render duration.
What you need
- pnpm
- A Storybook dev server started with ENABLE_REACT_DEVTOOLS_MCP=true
- Google Chrome with the remote debugging port open
- chrome-devtools-mcp (installed in the workspace)
Try asking
- Why does the Button story re-render on every click? Check the component tree.
- Profile opening the MenuButton story and list the slowest components in the commit.
- Show the props and hooks of the Button component in the primitives-button story.
Good to know
- Depends on the experimental third-party developer tools API, enabled with --categoryExperimentalThirdParty=true.
- Component uids reset on page reload, so the tree must be read again after a reload.
- Stories must be opened through iframe.html, not the manager UI at /.
- Do not run the chrome-devtools CLI and the MCP server against the same Chrome at once.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/react-devtools-mcp/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to react-devtools-mcp
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
react-devtools-mcp: common questions
Is react-devtools-cdt-mcp an MCP server?
No. The source says it is a browser library that installs a React DevTools hook in the page and registers react_* tools. chrome-devtools-mcp is the MCP server that talks to Chrome.
Can cloud agents use this skill?
The source says it works from the terminal through the chrome-devtools CLI daemon, so cloud agents can use it without an MCP client.
Why does the tool list show no react tools?
The source says the page must be loaded from the ENABLE_REACT_DEVTOOLS_MCP=true server and opened as iframe.html. Tool discovery must also run once per page load.
How do I install react-devtools-mcp?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is react-devtools-mcp free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is react-devtools-mcp safe to use?
It scores 72 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to react-devtools-mcp?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
