Add first-run setup wizard + doctor diagnostics
New users hit predictable friction (no npm install, Remote Control / Python plugin not enabled, C++ not built). This makes onboarding self-service: - src/doctor.js — shared diagnostics (project & engine detection, Node deps, Remote Control reachability, Python plugin, C++ module built, optional Voxel). Zero-dependency top-level imports so it runs before `npm install`. Runnable as `npm run doctor`, reused by the wizard and the server first-run hook. - src/setup.js — interactive `npm run setup` wizard: offers to install deps, confirms/pins project & engine (and RC URL) overrides, re-checks the editor until reachable, then prints the MCP-client config snippet. - projectPaths.js — persisted config (mcp.config.json, git-ignored) with precedence env > config > auto-detect; remoteControlUrl(); first-run marker helpers (isFirstRun/markRun under Saved/). - server.js — `doctor` MCP tool (so a client/assistant can run the checks in a session) + a one-time first-run diagnostic printed to stderr pointing at `npm run setup`. - ueBridge.js honors the config-driven Remote Control URL. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
23
README.md
23
README.md
@ -40,13 +40,18 @@ It has two halves that ship together:
|
||||
4. In the editor, enable **Remote Control** and start its web server
|
||||
(`WebControl.StartServer`, or set `WebControl.EnableServerOnStartup=true`).
|
||||
|
||||
5. Install the MCP server deps:
|
||||
5. **Run the setup wizard** — it installs deps, confirms the auto-detected
|
||||
project/engine, checks the editor side, and prints the exact client-config
|
||||
snippet to paste:
|
||||
|
||||
```bash
|
||||
cd Plugins/UEBlueprintMCP
|
||||
npm install
|
||||
npm run setup
|
||||
```
|
||||
|
||||
(Prefer to do it by hand? `npm install`, then point your client at
|
||||
`src/server.js` as below.)
|
||||
|
||||
6. Point your MCP client at `src/server.js`, e.g.:
|
||||
|
||||
```json
|
||||
@ -62,6 +67,20 @@ It has two halves that ship together:
|
||||
|
||||
Call `ping_ue` first to confirm the editor is reachable.
|
||||
|
||||
### First-run check & `doctor`
|
||||
|
||||
The first time the server starts it prints a one-time environment check to its
|
||||
stderr (visible in your client's MCP logs) and points you at `npm run setup` if
|
||||
anything is off. You can re-run the checks any time:
|
||||
|
||||
- `npm run doctor` — print the diagnostics report in a terminal.
|
||||
- the **`doctor`** MCP tool — same checks from inside a session, so the assistant
|
||||
can diagnose and guide you.
|
||||
|
||||
The wizard pins any overrides (project dir, engine dir, Remote Control URL, ...)
|
||||
to a git-ignored `mcp.config.json`. Precedence everywhere is **env var > config >
|
||||
auto-detect**.
|
||||
|
||||
---
|
||||
|
||||
## Zero-config path resolution
|
||||
|
||||
Reference in New Issue
Block a user