The `nx-mcp` package, currently at version `0.24.0`, implements a server for the Model Context Protocol (MCP) specifically for Nx monorepos. This server provides Large Language Models (LLMs) with deep, structured access to an Nx workspace's internal architecture, encompassing project relationships, file mappings, runnable tasks, ownership information, tech stacks, and Nx generators. This capability allows AI agents to generate code with precise context, understand the downstream impact of changes, and apply modifications accurately across interconnected files within a monorepo. Although it functions as a standalone CLI server, its development and releases are closely tied to the Nx Console VS Code extension, which often automatically manages its lifecycle. Its key differentiator is leveraging Nx's inherent understanding of monorepo structure to offer a richer, more actionable context for AI compared to generic code embeddings.
npm install nx-mcpVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to configure the `nx-mcp` server for AI clients using `mcp.json` for both `stdio` and `http` transport, and how to invoke it directly via `npx`.
Invoke `nx-mcp` with the `--no-minimal` flag: `npx nx-mcp@latest --no-minimal`.
Create a `.nx/nx-mcp-config.json` file in your workspace root to pass additional options to the server. Refer to `nx-mcp --help` for available configurations.
Start the server with the `--sse` and `--port` flags to enable HTTP SSE (Server-Sent Events) communication: `npx nx-mcp@latest --sse --port <desired_port>`.
Always refer to the latest documentation or `nx-mcp --help` for the most current tool names and usage. Be prepared for minor adjustments in how experimental tools are invoked or how their outputs are structured.
Restart the `nx-mcp` server with the `--no-minimal` flag: `npx nx-mcp@latest --no-minimal`.
Ensure that if your AI client expects HTTP communication, `nx-mcp` is launched with `--sse --port <your_port>`, and the client is configured to connect to that port. For `stdio`, ensure the client correctly spawns and connects to the process's standard streams.
Use `npx nx-mcp@latest` to run the package without global installation, or ensure it's listed as a dependency and run via `pnpm exec nx-mcp`, `yarn nx-mcp`, or `npm exec nx-mcp`.
No dependency data recorded yet.