You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: astro-docs/src/content/docs/features/enhance-AI.mdoc
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,8 @@ npx nx configure-ai-agents
26
26
This sets up:
27
27
28
28
- **Agent configuration files**: `CLAUDE.md`, `AGENTS.md` with workspace-specific guidelines
29
-
- **Agent skills**: Specialized capabilities for monorepo workflows, including CI monitoring and self-healing integration
30
-
- **Nx MCP server**: Provides tools that combine local workspace metadata with CI context, enabling seamless local-to-CI workflows that unlock true agent autonomy
29
+
- **Agent skills**: Domain-specific knowledge for monorepo workflows — workspace exploration, code generation, task execution, CI monitoring, and package linking. Skills teach agents _how_ to work with Nx rather than dumping data into context.
30
+
- **Nx MCP server**: Provides connectivity to Nx Cloud CI pipelines, self-healing fixes, running processes, and Nx documentation — things agents can't easily reach on their own
Copy file name to clipboardExpand all lines: astro-docs/src/content/docs/getting-started/ai-setup.mdoc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ To automatically configure your Nx monorepo to work best with AI agents and assi
26
26
npx nx configure-ai-agents
27
27
```
28
28
29
-
This will prompt you for which AI agents/assistants to configure and set up the [Nx MCP server](/docs/features/enhance-ai) (Model Context Protocol—a standard for giving AI assistants tool access), AI agent configuration files (`AGENTS.md`, `CLAUDE.md`, etc.), and agent skills. For Claude Code, skills are installed via a plugin; for other agents, they're copied into your workspace.
29
+
This will prompt you for which AI agents/assistants to configure and set up the [Nx MCP server](/docs/reference/nx-mcp), AI agent configuration files (`AGENTS.md`, `CLAUDE.md`, etc.), and agent skills (for workspace exploration, code generation, and task execution). For Claude Code, skills are installed via a plugin; for other agents, they're copied into your workspace.
30
30
31
31
Alternatively, you can install just the skills via:
Copy file name to clipboardExpand all lines: astro-docs/src/content/docs/reference/nx-mcp.mdoc
+71-68Lines changed: 71 additions & 68 deletions
Original file line number
Diff line number
Diff line change
@@ -7,12 +7,16 @@ sidebar:
7
7
filter: 'type:References'
8
8
---
9
9
10
-
The Nx MCP server is a [Model Context Protocol](https://modelcontextprotocol.io/introduction) implementation that gives LLMs deep access to your monorepo's structure: project relationships, file mappings, runnable tasks, ownership info, tech stacks, Nx generators, and Nx documentation.
10
+
The Nx MCP server is a [Model Context Protocol](https://modelcontextprotocol.io/introduction) implementation that connects AI agents to systems they can't easily reach on their own: Nx Cloud CI pipelines, self-healing fixes, task monitoring, and up-to-date Nx documentation.
11
11
12
12
{% aside type="tip" title="Quick Setup" %}
13
13
To configure your Nx workspace for AI agents (MCP, skills, and more), run `npx nx configure-ai-agents`. See the [AI Integration guide](/docs/getting-started/ai-setup) for details.
14
14
{% /aside %}
15
15
16
+
{% aside type="note" title="MCP + Skills" %}
17
+
The Nx MCP server works best alongside [agent skills](/docs/features/enhance-ai). Skills handle domain knowledge — workspace exploration, code generation, task execution — while the MCP server provides connectivity to Nx Cloud and task monitoring. For background on this approach, see our blog post on [why we deleted most of our MCP tools](/blog/why-we-deleted-most-of-our-mcp-tools).
18
+
{% /aside %}
19
+
16
20
For an overview of how Nx enhances AI assistants and powerful use cases, see the [Enhance Your LLM](/docs/features/enhance-ai) guide.
17
21
18
22
## Installation
@@ -124,15 +128,16 @@ If you miss the notification, run the `Nx: Setup MCP Server` command from the co
124
128
125
129
The `nx mcp` command (or `npx nx-mcp` for older versions) accepts the following options:
| `[workspacePath]` | `-w` | Path to the Nx workspace root. Defaults to the current working directory if not provided. |
134
+
| `--transport <type>` | | Transport protocol to use: `stdio` (default), `sse`, or `http` |
135
+
| `--port <port>` | `-p` | Port to use for the HTTP/SSE server (default: 9921). Only valid with `--transport sse` or `--transport http`. |
136
+
| `--tools <patterns...>` | `-t` | Filter which tools are enabled. Accepts glob patterns including negation (e.g., `"*"`, `"!nx_docs"`, `"cloud_*"`) |
137
+
| `--minimal` | | Hide workspace analysis tools (default: `true`). Use `--no-minimal` to expose all tools. See [Minimal Mode](#minimal-mode-default). |
138
+
| `--disableTelemetry` | | Disable sending of telemetry data |
This is useful when you want to restrict the LLM's capabilities or reduce noise in the tool list.
202
207
203
-
## Available Tools
208
+
### Minimal Mode (Default)
204
209
205
-
### Workspace Tools
210
+
By default, the MCP server runs in **minimal mode** (`--minimal`), which hides workspace analysis and generator tools. These capabilities are now handled more efficiently by [agent skills](/docs/features/enhance-ai), which provide domain knowledge as incrementally-loaded instructions rather than tool-call-based data dumps. This reduces token usage and keeps the tool list focused on what MCP does best: connectivity to Nx Cloud and running processes.
| `nx_workspace` | Returns a readable representation of the project graph and nx.json configuration. Also returns any project graph errors if present. |
210
-
| `nx_workspace_path` | Returns the path to the Nx workspace root |
211
-
| `nx_project_details` | Returns complete project configuration in JSON format for a specific project, including targets, dependencies, and metadata |
212
-
| `nx_docs` | Returns documentation sections relevant to user queries about Nx configuration and best practices |
213
-
| `nx_available_plugins` | Lists available Nx plugins from the core team and local workspace plugins |
212
+
To restore all tools (e.g., for clients that don't support skills), pass `--no-minimal`:
| `nx_generators` | Returns a list of available code generators in your workspace |
220
-
| `nx_generator_schema` | Returns the detailed JSON schema for a specific Nx generator, including all available options |
221
-
| `nx_run_generator` | Opens the Nx Console Generate UI with prefilled options (requires a running IDE instance with Nx Console) |
217
+
```shell
218
+
npx nx mcp --no-minimal
219
+
```
220
+
221
+
{% /tabitem %}
222
+
{% tabitem label="Nx < 21.4" %}
223
+
224
+
```shell
225
+
npx nx-mcp@latest --no-minimal
226
+
```
227
+
228
+
{% /tabitem %}
229
+
{% /tabs %}
230
+
231
+
When the Nx Console extension manages the MCP server in VS Code or Cursor, it automatically enables minimal mode if it detects that agent skills are installed in the workspace.
| `nx_docs` | Returns documentation sections relevant to user queries about Nx configuration and best practices |
222
240
223
241
### Task Monitoring Tools
224
242
@@ -255,8 +273,29 @@ These tools provide analytics and insights into your CI/CD data:
255
273
| `cloud_analytics_tasks_search` | Analyzes aggregated task performance statistics including success rates and cache hit rates |
256
274
| `cloud_analytics_task_executions_search` | Analyzes individual task execution data to investigate performance trends over time |
257
275
276
+
### Extended Tools (--no-minimal)
277
+
278
+
The following tools are hidden by default in minimal mode. They're available when running with `--no-minimal`, which is useful for AI clients that don't support skills or instruction files.
| `nx_workspace` | Returns a readable representation of the project graph and nx.json configuration. Also returns any project graph errors if present. |
285
+
| `nx_workspace_path` | Returns the path to the Nx workspace root |
286
+
| `nx_project_details` | Returns complete project configuration in JSON format for a specific project, including targets, dependencies, and metadata |
287
+
| `nx_available_plugins` | Lists available Nx plugins from the core team and local workspace plugins |
| `nx_generators` | Returns a list of available code generators in your workspace |
294
+
| `nx_generator_schema` | Returns the detailed JSON schema for a specific Nx generator, including all available options |
295
+
| `nx_run_generator` | Opens the Nx Console Generate UI with prefilled options (requires a running IDE instance with Nx Console) |
296
+
258
297
{% aside type="note" title="Tool Availability" %}
259
-
When no workspace path is specified, only the `nx_docs` and `nx_available_plugins` tools will be available. Nx Cloud tools require a workspace connected to Nx Cloud.
298
+
When no workspace path is specified, only the `nx_docs` tool will be available. Nx Cloud tools require a workspace connected to Nx Cloud.
260
299
{% /aside %}
261
300
262
301
## Available Resources
@@ -270,48 +309,6 @@ When connected to an Nx Cloud-enabled workspace, the Nx MCP server automatically
270
309
271
310
## Tool Usage Examples
272
311
273
-
### Understanding Workspace Architecture
274
-
275
-
Ask your AI assistant about your workspace structure:
276
-
277
-
```text
278
-
What is the structure of this workspace?
279
-
How are the projects organized?
280
-
```
281
-
282
-
The `nx_workspace` tool provides:
283
-
284
-
- All applications and libraries in your workspace
285
-
- Project categorization through tags
286
-
- Technology types (feature, UI, data-access)
287
-
- Project ownership and team responsibilities
288
-
289
-
### Getting Project Details
290
-
291
-
To understand a specific project's configuration:
292
-
293
-
```text
294
-
Show me the details of the my-app project
295
-
What targets are available for my-lib?
296
-
```
297
-
298
-
The `nx_project_details` tool returns:
299
-
300
-
- Complete target configuration
301
-
- Project dependencies
302
-
- Source and output paths
303
-
- Tags and metadata
304
-
305
-
### Using Generators
306
-
307
-
Ask your AI assistant to scaffold new code:
308
-
309
-
```text
310
-
Create a new React library in the packages/shared folder
311
-
```
312
-
313
-
The AI will use `nx_generators` to find available generators and `nx_generator_schema` to understand the options, then can invoke `nx_run_generator` to open the Generate UI with preset values.
314
-
315
312
### Accessing Documentation
316
313
317
314
Get accurate guidance without hallucinations:
@@ -352,3 +349,9 @@ The AI agent can:
352
349
2. Receive failure context and self-healing suggestions
353
350
3. Apply verified fixes via `update_self_healing_fix`
354
351
4. Continue iterating until CI passes
352
+
353
+
### Workspace Exploration and Code Generation
354
+
355
+
For workspace exploration, code generation, and task execution, agents use [skills](/docs/features/enhance-ai) rather than MCP tools. Skills teach agents how to use the Nx CLI directly — running commands like `nx show projects`, `nx show project myapp`, and `nx generate` — which is more token-efficient than fetching large JSON payloads via MCP.
356
+
357
+
If your AI client doesn't support skills, use `--no-minimal` to expose the full set of workspace and generator tools via MCP.
0 commit comments