Skip to content

Commit 7063177

Browse files
committed
docs: create MCP server setup guide
Introduces a new guide for setting up the Angular CLI's Model Context Protocol (MCP) server. The guide 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.
1 parent 6953166 commit 7063177

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed

adev/src/app/sub-navigation-data.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,11 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
643643
path: 'ai/develop-with-ai',
644644
contentPath: 'ai/develop-with-ai',
645645
},
646+
{
647+
label: 'Angular CLI MCP Server setup',
648+
path: 'ai/mcp',
649+
contentPath: 'ai/mcp-server-setup',
650+
},
646651
],
647652
},
648653
{

adev/src/content/ai/develop-with-ai.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ Several editors, such as <a href="https://studio.firebase.google.com?utm_source=
2626
| VS Code | <a download=".instructions.md" href="/assets/context/guidelines.md" target="_blank">.instructions.md</a> | <a href="https://code.visualstudio.com/docs/copilot/copilot-customization#_custom-instructions" target="_blank">Configure `.instructions.md`</a> |
2727
| Windsurf | <a download href="/assets/context/guidelines.md" target="_blank">guidelines.md</a> | <a href="https://docs.windsurf.com/windsurf/cascade/memories#rules" target="_blank">Configure `guidelines.md`</a> |
2828

29+
## Angular CLI MCP Server setup
30+
The Angular CLI includes an experimental [Model Context Protocol (MCP) server](https://modelcontextprotocol.io/) that allows AI assistants in your development environment to interact with the Angular CLI.
31+
32+
[**Learn how to set up the Angular CLI MCP Server**](/ai/mcp)
33+
2934
## Providing Context with `llms.txt`
3035
`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.
3136

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Angular CLI MCP Server setup
2+
The Angular CLI includes an experimental [Model Context Protocol (MCP) server](https://modelcontextprotocol.io/) enabling AI assistants in your development environment to interact with the Angular CLI. We've included support for CLI powered code generation, adding packages, and more.
3+
4+
To get started, run the following command in your terminal:
5+
6+
```bash
7+
ng mcp
8+
```
9+
10+
Use this command to create the base JSON configuration for your environment. Note that the file structure differs depending on your IDE. The following sections provide the configurations for several popular editors.
11+
12+
### VS Code
13+
In your project's root, create a file named `.vscode/mcp.json` and add the following configuration. Note the use of the `servers` property.
14+
15+
```json
16+
{
17+
"servers": {
18+
"angular-cli": {
19+
"command": "npx",
20+
"args": ["@angular/cli", "mcp"]
21+
}
22+
}
23+
}
24+
```
25+
26+
### JetBrains IDEs
27+
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.
28+
29+
```json
30+
{
31+
"name": "Angular CLI",
32+
"command": "npx",
33+
"args": [
34+
"@angular/cli",
35+
"mcp"
36+
]
37+
}
38+
```
39+
40+
### Firebase Studio
41+
Create a file named `.idx/mcp.json` in your project's root and add the following configuration:
42+
```json
43+
{
44+
"mcpServers": {
45+
"angular-cli": {
46+
"command": "npx",
47+
"args": ["@angular/cli", "mcp"]
48+
}
49+
}
50+
}
51+
```
52+
53+
### Other IDEs
54+
For these IDEs, create a configuration file and add the following snippet. Note the use of the `mcpServers` property.
55+
* **Cursor:** Create a file named `.cursor/mcp.json` in your project's root. You can also configure it globally in `~/.cursor/mcp.json`.
56+
* **Other IDEs:** Check your IDE's documentation for the proper location of the MCP configuration file (often `mcp.json`).
57+
58+
```json
59+
{
60+
"mcpServers": {
61+
"angular-cli": {
62+
"command": "npx",
63+
"args": ["@angular/cli", "mcp"]
64+
}
65+
}
66+
}
67+
```

0 commit comments

Comments
 (0)