Nx
Enterprise
Nx
fix(core): allow `nx mcp` to run outside of an Nx workspace The `mcp` command delegates entirely to `nx-mcp@latest` via the package manager's dlx, which supports running outside of an Nx workspace. The CLI entry point in `bin/nx.ts` was bailing out before the `mcp` handler could run, because `mcp` was missing from the allow-list of commands that are permitted to run without a workspace. This broke MCP clients (e.g. Codex CLI) that spawn `npx nx mcp` over stdio JSON-RPC: the workspace-not-found banner was written to stdout (corrupting the JSON-RPC stream) and the process exited with code 1 before initialize completed. Add `'mcp'` to the allow-list so the handler can run. The handler uses `workspaceRoot` only as cwd for the spawned `nx-mcp@latest`; `workspaceRoot` already gracefully falls back to `process.cwd()` outside a workspace.
nx-cloud record -- nx format:check
Sign in / Sign up
Open main menu
Succeeded
CI Pipeline Execution
1 run failed
nx-cloud record -- nx format:check
Click to copy
Linux
4 CPU cores
cb573199
35655