Skip to main content
Glama

Nx MCP Server

Official
by nrwl

Nx MCP Server

npm version

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"] } } }

Refer to your AI tool's documentation for how to register an MCP server. For example, Cursor or Claude Desktop support MCP.

If you want to host the server instead of communicating via stdio, you can use the --sse and --port flags. Keep in mind that the Nx MCP server only supports a single concurrent connection right now, so connecting multiple clients at the same time might break in some cases.

Run nx-mcp --help to see what options are available.

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

The Nx MCP server provides a comprehensive set of tools for interacting with your Nx workspace.

  • 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)

Nx Cloud Tools (only available w/ Nx Cloud enabled)

  • nx_cloud_cipe_details: Returns CI pipeline execution details from Nx Cloud
  • nx_cloud_fix_cipe_failure: Returns failure details including terminal output and git diffs
  • nx_cloud_pipeline_executions_search: Searches for pipeline executions in Nx Cloud
  • nx_cloud_pipeline_executions_details: Gets detailed information about specific pipeline executions
  • nx_cloud_runs_search: Searches for runs within pipeline executions
  • nx_cloud_runs_details: Gets detailed information about specific runs
  • nx_cloud_tasks_search: Searches for task statistics and performance data
  • nx_cloud_tasks_details: Returns detailed task execution information

When no workspace path is specified, only the nx_docs and nx_available_plugins tools will be available.

Available Resources

When connected to an Nx Cloud-enabled workspace, the Nx MCP server automatically exposes recent CI Pipeline Executions (CIPEs) as MCP resources. Resources appear in your AI tool's resource picker, allowing the LLM to access detailed information about CI runs including failed tasks, terminal output, and affected files.

Contributing & Development

Contributions are welcome! Please see the Nx Console contribution guide for more details.

The basic steps are:

  1. Clone the Nx Console repository and follow installation steps
  2. Build the nx-mcp using nx run nx-mcp:build (or nx run nx-mcp:build:debug for debugging with source maps)
  3. Use the MCP Inspector to test out your changes

License

MIT

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

The Nx MCP server provides LLMs with comprehensive insights into your monorepo: project dependencies, file relationships, executable tasks, ownership metadata, technology stacks, custom generators, and Nx documentation. This deep context enables LLMs to produce code perfectly aligned with your archi

  1. Overview
    1. Installation and Usage
      1. a) Run it via the nx-mcp package
      2. b) Use the Nx Console extension
    2. Available Tools
      1. Contributing & Development
        1. License

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol (MCP) server providing comprehensive access to the XRP Ledger (XRPL). This service enables AI models to interact with XRPL through standardized endpoints.
            Last updated -
            2
            Python
          • -
            security
            A
            license
            -
            quality
            MCP server for Nile Database - Manage and query databases, tenants, users, auth using LLMs
            Last updated -
            622
            17
            TypeScript
            MIT License
            • Apple
            • Linux
          • -
            security
            A
            license
            -
            quality
            An MCP server that provides tools to load and fetch documentation from any llms.txt source, giving users full control over context retrieval for LLMs in IDE agents and applications.
            Last updated -
            588
            Python
            MIT License
            • Apple
          • A
            security
            F
            license
            A
            quality
            An MCP server that implements a structured workflow for LLM-based coding, guiding development through feature clarification, documentation generation, phased implementation, and progress tracking.
            Last updated -
            10
            502
            15
            TypeScript
            • Apple

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/nrwl/nx-console'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server