Menu

Nx MCP Server

Local
by: nrwl
|
category: Dev Tools
|
2025.07.03 updated

A [Model Context Protocol](https://modelcontextprotocol.io/introduction) server implementation for [Nx](https://nx.dev).

Step 1: 生成 Stdio 配置
sign in
You must sign in before generating the URL

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", "/path/to/your/workspace"]
    }
  }
}

For VSCode you can also run:

code --add-mcp '{"name":"nx-mcp","command":"npx","args":["nx-mcp", "/path/to/your/workspace"]}'

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:

  • Install Nx Console
  • Configure Cursor to use the nx-mcp

Available Tools

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

  • nx_workspace: Returns an annotated representation of the local nx configuration and the project graph
  • nx_project_details: Returns the full project configuration for a specific nx project
  • nx_docs: Retrieves documentation sections relevant to user queries
  • nx_generators: Returns a list of available generators in the workspace
  • nx_generator_schema: Provides detailed schema information for a specific generator
  • nx_available_plugins: Returns a list of available Nx plugins from the npm registry with their descriptions

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

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

Related MCP Servers

Query MCP Server for Supabase
Local

by: alexander-zuev

Query MCP is an open-source MCP server that allows your IDE to safely run SQL queries, manage schema changes, call the Supabase Management API, and use the Auth Admin SDK, all with built-in safety controls.

Dev Tools|2025.07.04 updated

Semgrep MCP Server
Local

by: semgrep

An MCP server for using Semgrep to scan code for security vulnerabilies. Secure your vibe coding!

Dev Tools|2025.07.04 updated

Prisma MCP Server
Local

by: prisma

Prisma ORM is a **next-generation ORM** that consists of these tools:

Dev Tools|2025.07.03 updated

Gitee MCP Server
Local

by: oschina

Gitee MCP Server is a Model Context Protocol (MCP) server implementation for Gitee. It provides a set of tools for interacting with Gitee's API, allowing AI assistants to manage repositories, issues, pull requests, and more.

Dev Tools|2025.07.04 updated