Skip to content

Summary

Nx's official MCP server hands an agent the monorepo's real structure — the project graph, task definitions, generators, owners and Nx docs — so edits land with cross-project impact in view instead of guessed from filenames.

Features

  • Serves the Nx project graph: project relationships, file-to-project mapping, targets, owners and tech stack
  • Exposes installed Nx generators and their schemas so the agent scaffolds the workspace's way
  • nx_docs puts current Nx documentation in the session instead of the model's memory
  • Nx Cloud tools for CI information, task output and self-healing fixes
  • Minimal tool set by default; --no-minimal or .nx/nx-mcp-config.json controls exactly which tools register
  • stdio by default, or --sse with --port for a shared HTTP server
  • Managed automatically by the Nx Console extension in VS Code and Cursor

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it.
  3. Restart the agent — the "Nx MCP Server" tools will be available.
{
  "mcpServers": {
    "nx-mcp": {
      "command": "npx",
      "args": [
        "nx-mcp@latest"
      ]
    }
  }
}

Description

An agent dropped into an Nx monorepo sees a directory tree and has to infer the rest: which projects exist, what depends on what, which target runs the tests, whether a generator already scaffolds the thing it is about to hand-write. The Nx MCP Server removes the guessing by exposing the workspace's own metadata over the Model Context Protocol.

What it exposes

The server reads the same project graph Nx uses to schedule tasks, so the agent gets project relationships and file-to-project mapping, runnable targets, code ownership, the tech stack per project, the list of installed Nx plugins and their generators (with each generator's schema), and Nx's documentation. On an Nx Cloud workspace it also surfaces CI information, task output, and the self-healing fix flow.

The practical effect is that a change stops being local. Ask for a rename or an API change and the agent can see which projects consume the code and follow the change through them; ask for a new library and it can call the generator the workspace already has rather than inventing a folder layout.

Running it

It ships as the nx-mcp npm package and needs no install:

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

By default it runs in a minimal mode that registers only nx_docs, nx_current_running_tasks_details, nx_current_running_task_output and nx_visualize_graph, keeping the client's tool list short; --no-minimal turns on the rest (nx_workspace, nx_project_details, nx_generators, nx_generator_schema, nx_available_plugins, nx_workspace_path). A .nx/nx-mcp-config.json file pins the choice per repository, with an allow/deny list ("tools": ["nx_docs", "!cloud_*"]), telemetry opt-out and debug logging; CLI flags override it. --sse with --port runs it over HTTP for concurrent clients instead of stdio.

If you already use the Nx Console extension in VS Code or Cursor, it manages the server for you and no manual config is needed.

Who it is for

Teams on Nx who have handed real refactoring work to an agent and are tired of it touching one project and breaking three. It is maintained by Nrwl inside the Nx Console repository, alongside the editor extension.

Related MCP Servers

MCP: ripwire

by Red Hat

New

Red Hat's zero-dependency C++23 code-context engine — ranked call graphs and blast-radius analysis, indexing a repo in under half a second with no server and no database.

MCP: Graft

by Trail

New

Builds a searchable markdown graph of your repo so coding agents stop re-exploring it on every task — reported 42% fewer tokens and 46% fewer tool calls.

New

Expo's official remote MCP server — searches Expo docs, installs compatible SDK packages, triggers and monitors EAS builds, and drives iOS/Android simulators.

MCP: Hugging Face

by Hugging Face

New

Hugging Face's official MCP server — search the Hub's models, datasets and Spaces, read repository files, and call thousands of Gradio applications as tools from one remote endpoint.

Browse all MCP servers →