Nx MCP Server
OfficialProvides tools to retrieve available Nx plugins from the npm registry along with their descriptions through the nx_available_plugins tool.
Provides deep access to Nx monorepo structure, including project relationships, file mappings, tasks, ownership info, tech stacks, generators, and documentation to help LLMs generate tailored code and understand architectural impact of changes.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Nx MCP Servershow me the dependencies for the frontend project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: logicstamp-mcp
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"]
}
}
}claude mcp add nx-mcp npx nx-mcp@latestcode --add-mcp '{"name":"nx-mcp","command":"npx","args":["nx-mcp"]}'Go to Settings -> AI -> Manage MCP Servers -> + Add to add an MCP Server.
Alternatively, use the slash command /add-mcp in the Warp Agent prompt.
{
"nx-mcp": {
"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. The HTTP transport supports multiple concurrent connections, allowing different clients to connect simultaneously with independent sessions.
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:
Minimal Mode (Default)
By default, the Nx MCP server runs in minimal mode, which hides workspace analysis tools that overlap with AI tool skills/instructions. This reduces tool clutter and context window usage for AI agents that already have access to equivalent functionality through skills.
The following tools are hidden in minimal mode:
nx_available_pluginsnx_workspace_pathnx_workspacenx_project_detailsnx_generatorsnx_generator_schema
To disable minimal mode and expose all tools, use the --no-minimal flag:
npx nx-mcp@latest --no-minimalAvailable Tools
The Nx MCP server provides a comprehensive set of tools for interacting with your Nx workspace.
Always Available
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)
Hidden in Minimal Mode (use --no-minimal to enable)
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 Cloud Tools (only available w/ Nx Cloud enabled)
These tools provide insights and interactions with your Nx Cloud CI/CD data:
ci_information: Retrieves CI pipeline execution information for the current branch or a specific Nx Cloud URL. Returns failed tasks with
runIdmetadata and supports aselectparameter for field selection with pagination.ci_task_output: Retrieves terminal output for a specific failed CI task, using a
runIdfromci_informationor resolving it from the branch / URL context.update_self_healing_fix: Apply, reject, or request a rerun for a self-healing CI fix from Nx Cloud
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:
Clone the Nx Console repository and follow installation steps
Build the
nx-mcpusingnx run nx-mcp:build(ornx run nx-mcp:build:debugfor debugging with source maps)Use the MCP Inspector to test out your changes
Configuration File
You can also configure the MCP server via a JSON file at .nx/nx-mcp-config.json in your workspace root. This is useful when the MCP server binary is managed by a plugin or extension where you can't pass CLI args directly.
{
"tools": ["nx_docs", "!cloud_*"],
"minimal": true,
"debugLogs": false,
"disableTelemetry": true,
"transport": "sse",
"port": 9922
}All keys are optional and match the CLI option names. CLI arguments take precedence over config file values.
License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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