Nx MCP Server

Lets an assistant read an Nx monorepo's project graph, tasks, generators, docs and Nx Cloud CI results

Official · Nx JavaScript Local · stdio Developer toolsDevOps and monitoringKnowledge and memory

90 popularity score ★ 1.4k ↓ 123k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add nx -- npx -y nx-mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "nx": {
      "command": "npx",
      "args": [
        "-y",
        "nx-mcp"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "nx": {
      "command": "npx",
      "args": [
        "-y",
        "nx-mcp"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "nx": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "nx-mcp"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.nx]
command = "npx"
args = ["-y", "nx-mcp"]
Gemini CLITerminal
gemini mcp add --scope user nx npx -- -y nx-mcp

What it does

The Nx MCP Server is the Model Context Protocol server from the makers of Nx, shipped in the Nx Console repository and as the nx-mcp npm package. It gives an assistant access to the structure of an Nx monorepo: project relationships, file mappings, runnable tasks, ownership information, tech stacks, Nx generators and the Nx documentation. With that context an assistant can write code that fits the workspace, judge the impact of a change and edit connected files.

It runs locally over stdio with npx nx-mcp@latest, or as an HTTP server with the --sse and --port flags. The Nx Console editor extension can also manage it automatically in VS Code and Cursor. By default it runs in minimal mode, which hides the workspace analysis tools; the --no-minimal flag exposes them all. Settings can also be placed in .nx/nx-mcp-config.json in the workspace root.

When the workspace is connected to Nx Cloud, extra tools read CI pipeline executions and failed task output, and can apply or reject self-healing CI fixes. Recent CI pipeline executions are also offered as MCP resources. Without a workspace path, only the documentation and plugin listing tools are available.

What it needs

RuntimeNode.js

Tools 13

nx_docs
Returns documentation sections relevant to user queries about Nx
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_visualize_graph
Visualizes the Nx graph (requires running IDE instance)
nx_available_plugins
Lists available Nx plugins from the core team and local workspace plugins (hidden in minimal mode)
nx_workspace_path
Returns the path to the Nx workspace root (hidden in minimal mode)
nx_workspace
Returns readable representation of project graph and nx.json configuration (hidden in minimal mode)
nx_project_details
Returns complete project configuration in JSON format for a given project (hidden in minimal mode)
nx_generators
Returns list of generators relevant to user queries (hidden in minimal mode)
nx_generator_schema
Returns detailed JSON schema for a specific Nx generator (hidden in minimal mode)
ci_information
Retrieves Nx Cloud CI pipeline execution information for the current branch or a specific Nx Cloud URL, including failed tasks
ci_task_output
Retrieves terminal output for a specific failed Nx Cloud CI task
update_self_healing_fix
Apply, reject, or request a rerun for a self-healing CI fix from Nx Cloud

Similar servers