NX

Nx

Created 5 months ago

A Model Context Protocol server implementation for Nx.

development documentation public

What is Nx?

Makes [Nx's understanding](https://nx.dev/features/enhance-AI) of your codebase accessible to LLMs, providing insights into the codebase architecture, project relationships and runnable tasks thus allowing AI to make precise code suggestions.

Documentation

Nx MCP Server

A Model Context Protocol server implementation for Nx.

Overview

The Nx MCP server gives LLMs deep access to your monorepo’s structure: project relationships, file mappings, runnable tasks, ownership info, tech stacks, Nx generators, and even Nx documentation. With this context, LLMs can generate code tailored to your stack, understand the impact of a change, and apply modifications across connected files with precision. This is possible because Nx already understands the higher-level architecture of your workspace, and monorepos bring all relevant projects into one place.

Read more in our blog post and in our docs.

Installation and Usage

There are two ways to use this MCP server:

a) Run it via the nx-mcp package

Simply invoke the MCP server via npx or your package manager's equivalent.

Here's an example of a mcp.json configuration:

{
  "servers": {
    "nx-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": ["nx-mcp@latest"]
    }
  }
}

b) Use the Nx Console extension

If you're using Cursor you can directly install the Nx Console extension which automatically manages the MCP server for you.

More info:

Available Tools

Currently, the Nx MCP server provides a set of tools. Resources, Roots and Prompts aren't supported yet.

  • nx_docs: Returns documentation sections relevant to user queries about Nx
  • nx_available_plugins: Lists available Nx plugins from the core team and local workspace plugins
  • nx_workspace_path: Returns the path to the Nx workspace root
  • nx_workspace: Returns readable representation of project graph and nx.json configuration
  • nx_project_details: Returns complete project configuration in JSON format for a given project
  • nx_generators: Returns list of generators relevant to user queries
  • nx_generator_schema: Returns detailed JSON schema for a specific Nx generator
  • nx_current_running_tasks_details: Lists currently running Nx TUI processes and task statuses
  • nx_current_running_task_output: Returns terminal output for specific running tasks
  • nx_run_generator: Opens generate UI with prefilled options (requires running IDE instance)
  • nx_visualize_graph: Visualizes the Nx graph (requires running IDE instance)

License

MIT

Server Config

{
  "mcpServers": {
    "nx-server": {
      "command": "npx",
      "args": [
        "nx"
      ]
    }
  }
}

Links & Status

Repository: github.com
Hosted: No
Global: No
Official: Yes

Project Info

Hosted Featured
Created At: Jul 02, 2025
Updated At: Aug 07, 2025
Author: nrwl
Category: official
License: MIT
Tags:
development documentation public