Skip to content

Commit d334fa3

Browse files
committed
Flatten setup in the TOC and rename Try it
1 parent 824e084 commit d334fa3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎src/content/reference/dev-tools/react-devtools-cdt-mcp.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@ Coding agents that drive a browser through [Chrome DevTools MCP](https://github.
3737

3838
---
3939

40-
## Setup {/*setup*/}
40+
## Set up {/*set-up*/}
4141

42-
### Install the package {/*install-the-package*/}
42+
#### Install the package {/*install-the-package*/}
4343

4444
<TerminalBlock>
4545

4646
npm install --save-dev react-devtools-cdt-mcp
4747

4848
</TerminalBlock>
4949

50-
### Import it before React {/*import-it-before-react*/}
50+
#### Import it before React {/*import-it-before-react*/}
5151

5252
Import the `register` entry point at the very top of your app's entry file, **before** anything imports `react-dom`:
5353

@@ -68,13 +68,13 @@ createRoot(document.getElementById('root')).render(<App />);
6868

6969
</Pitfall>
7070

71-
### Set up Chrome DevTools MCP {/*set-up-chrome-devtools-mcp*/}
71+
#### Set up Chrome DevTools MCP {/*set-up-chrome-devtools-mcp*/}
7272

7373
Your agent needs [Chrome DevTools MCP](https://github.com/ChromeDevTools/chrome-devtools-mcp) with [third-party developer tools](https://developer.chrome.com/blog/devtools-for-agents-3p-tools) enabled. Follow the [Chrome DevTools MCP docs](https://github.com/ChromeDevTools/chrome-devtools-mcp#getting-started) to set it up. Once your agent opens a page that imports `react-devtools-cdt-mcp/register`, it can list and call the React tools.
7474

7575
---
7676

77-
## Try it in your browser {/*try-it-in-your-browser*/}
77+
## Try it {/*try-it*/}
7878

7979
You don't need an agent to see what the tools return. The sandbox below imports `react-devtools-cdt-mcp/register` exactly as you would in your app, and adds a small **tool console** under the app. The console discovers the React tools the same way Chrome DevTools MCP does, by dispatching the `devtoolstooldiscovery` event, and lets you call them by hand.
8080

0 commit comments

Comments
 (0)