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
Adds a new section to the "Develop with AI" documentation page that details how to configure the Angular CLI's Model Context Protocol (MCP) server.
This section includes:
- Instructions on how to use the command.
- IDE-specific JSON configurations for VS Code, JetBrains, Firebase Studio, and Cursor.
- Clarification on the different JSON structures required by each IDE.
The Angular CLI includes a Model Context Protocol (MCP) server. This allows AI assistants in your IDE to interact with the Angular CLI, enabling them to generate code, add packages, and more.
31
+
32
+
The recommended first step is to run the following command in your terminal:
33
+
34
+
```bash
35
+
ng mcp
36
+
```
37
+
38
+
This command can provide a JSON configuration snippet for your IDE. However, the exact structure of this JSON file can vary between different IDEs. Below are the configuration details for several editors.
39
+
40
+
### VS Code
41
+
In your project's root, create a file named `.vscode/mcp.json` and add the following configuration. Note the use of the `servers` property.
42
+
43
+
```json
44
+
{
45
+
"servers": {
46
+
"angular-cli": {
47
+
"command": "npx",
48
+
"args": ["@angular/cli", "mcp"]
49
+
}
50
+
}
51
+
}
52
+
```
53
+
54
+
### JetBrains IDEs
55
+
In JetBrains IDEs (like IntelliJ IDEA or WebStorm), after installing the MCP Server plugin, go to `Settings | Tools | AI Assistant | Model Context Protocol (MCP)`. Add a new server and select `As JSON`. Paste the following configuration, which does not use a top-level property for the server list.
56
+
57
+
```json
58
+
{
59
+
"name": "Angular CLI",
60
+
"command": "npx",
61
+
"args": [
62
+
"@angular/cli",
63
+
"mcp"
64
+
]
65
+
}
66
+
```
67
+
68
+
### Firebase Studio, Cursor, and Other IDEs
69
+
For these IDEs, create a configuration file and add the following snippet. Note the use of the `mcpServers` property.
70
+
***Firebase Studio:** Create a file named `.idx/mcp.json` in your project's root.
71
+
***Cursor:** Create a file named `.cursor/mcp.json` in your project's root. You can also configure it globally in `~/.cursor/mcp.json`.
72
+
***Other IDEs:** Check your IDE's documentation for the proper location of the MCP configuration file (often `mcp.json`).
73
+
74
+
```json
75
+
{
76
+
"mcpServers": {
77
+
"angular-cli": {
78
+
"command": "npx",
79
+
"args": ["@angular/cli", "mcp"]
80
+
}
81
+
}
82
+
}
83
+
```
84
+
29
85
## Providing Context with `llms.txt`
30
86
`llms.txt` is a proposed standard for websites designed to help LLMs better understand and process their content. The Angular team has developed two versions of this file to help LLMs and tools that use LLMs for code generation to create better modern Angular code.
0 commit comments