From 35ab8ffef7b755c899d9e19d61277a4fceb760d1 Mon Sep 17 00:00:00 2001 From: lauren Date: Wed, 16 Apr 2025 17:48:38 -0400 Subject: [PATCH] [mcp] Add inspect script (#32928) Uses https://github.com/modelcontextprotocol/inspector to inspect and debug the mcp server. `yarn workspace react-mcp-server dev` will build the server in watch mode and launch the inspector. Default address is http://127.0.0.1:6274. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32928). * #32932 * #32931 * #32930 * #32929 * __->__ #32928 --- compiler/packages/react-mcp-server/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/packages/react-mcp-server/package.json b/compiler/packages/react-mcp-server/package.json index 49e5a542d6..d4c270513a 100644 --- a/compiler/packages/react-mcp-server/package.json +++ b/compiler/packages/react-mcp-server/package.json @@ -8,6 +8,8 @@ "scripts": { "build": "rimraf dist && tsup", "test": "echo 'no tests'", + "dev": "concurrently --kill-others -n build,inspect \"yarn run watch\" \"wait-on dist/index.js && yarn run inspect\"", + "inspect": "npx @modelcontextprotocol/inspector node dist/index.js", "watch": "yarn build --watch" }, "dependencies": {