react icon indicating copy to clipboard operation
react copied to clipboard

[mcp] Add MCP tool to print out the component tree of the currently open React App

Open jorge-cab opened this issue 8 months ago • 2 comments

Summary

This tool leverages DevTools to get the component tree from the currently open React App. This gives realtime information to agents about the state of the app.

How did you test this change?

Tested integration with Claude Desktop

jorge-cab avatar May 19 '25 16:05 jorge-cab

Comparing: 462d08f9ba41d48ab36bf405235c1c22023603dc...ca1d5e068b580f68dd3af5f112bd2271c7f699ec

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 529.74 kB 529.74 kB = 93.49 kB 93.49 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 651.48 kB 651.48 kB = 114.76 kB 114.75 kB
facebook-www/ReactDOM-prod.classic.js = 675.72 kB 675.72 kB = 118.85 kB 118.84 kB
facebook-www/ReactDOM-prod.modern.js = 666.00 kB 666.00 kB = 117.23 kB 117.23 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by :no_entry_sign: dangerJS against ca1d5e068b580f68dd3af5f112bd2271c7f699ec

react-sizebot avatar May 19 '25 18:05 react-sizebot

@hoxyq Added the flag to webpack.config.js instead of webpack.backend.js because for some reason the variable would not be recognized in renderer.js unless set on webpack.config.js

jorge-cab avatar May 20 '25 17:05 jorge-cab