iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
To connect an AI coding host to an Angular workspace, configure the host to start the Angular CLI’s Model Context Protocol (MCP) server with npx @angular/cli mcp. The exact file location and JSON key depend on the host, so the host’s configuration format matters as much as the command itself.
What the command does
The Angular CLI includes an MCP server. Your AI host does not run Angular’s tools directly; it launches the CLI package as a background server and then lists the tools that server offers. Because the host starts the process, the setup lives in the host’s own MCP configuration, not in your angular.json or application code.
The Angular CLI can also be invoked as ng mcp. According to Angular’s v20 guide, running it in an interactive terminal prints host configuration instructions, which is a useful shortcut if your host is not covered below. The current Angular CLI MCP Server setup guide foregrounds the npx @angular/cli mcp form for host configuration.
Set up the server in your host
- Open your project in the AI host you use.
- Create or open the host’s MCP configuration file at the project level (or the documented global location, where the host supports one).
- Add an
angular-clientry that usescommand: "npx"andargs: ["-y", "@angular/cli", "mcp"], nested under the key your host expects. - Save the file, then restart or reload the host so it reads the new configuration.
- Check the host’s MCP server list or tools panel for the
angular-cliserver. Where that list lives varies by host.
Host configuration locations and JSON keys
Angular’s current guide documents three hosts with explicit examples. The key difference is the top-level object name: VS Code uses servers, while the Cursor and Antigravity examples use mcpServers. Using the wrong key is the most likely reason a copied snippet will not register, so match the key to the host.
#1 Best Overall
| Host | Configuration file | Top-level key | Scope in Angular’s examples |
|---|---|---|---|
| VS Code | .vscode/mcp.json |
servers |
Project |
| Cursor | .cursor/mcp.json or ~/.cursor/mcp.json |
mcpServers |
Project, or global in your home directory |
| Antigravity | .antigravity/mcp.json |
mcpServers |
Project (global location not stated in the guide) |
| Other hosts | Not stated by Angular | Not stated by Angular | Check the host’s own MCP documentation |
VS Code
Create .vscode/mcp.json in the project root:
{
"servers": {
"angular-cli": {
"command": "npx",
"args": ["-y", "@angular/cli", "mcp"]
}
}
}
Cursor
Create .cursor/mcp.json in the project for a per-project setup, or use ~/.cursor/mcp.json if you want the server available across projects. Both use the mcpServers key:
{
"mcpServers": {
"angular-cli": {
"command": "npx",
"args": ["-y", "@angular/cli", "mcp"]
}
}
}
Antigravity
Create .antigravity/mcp.json and use the mcpServers shape shown above for Cursor.
Rank #2
Hosts without an Angular example
If your host is not listed, look up its MCP configuration instructions before copying any snippet. Keep the command and arguments (npx -y @angular/cli mcp), but expect the file path and top-level key to differ from the examples above.
Recommended Free Tools
Limit which tools the server registers
Two flags narrow the set of tools the server makes available. Place them in the args array after mcp.
Rank #3
--read-onlyregisters only tools that do not modify the project.--local-onlyregisters only tools that do not require an internet connection.
"args": ["-y", "@angular/cli", "mcp", "--read-only"]
These flags limit the server’s own tools. They do not control everything an AI host can do on your machine through other features, so review the host’s permission settings separately if that matters to you.
Experimental tools
Angular’s skills documentation describes some tools as experimental. They are enabled with --experimental-tool (or -E), and the documented examples enable build and test. The available tools have changed across Angular documentation versions, so check the documentation that matches your installed Angular CLI version rather than assuming a fixed list. The skills documentation is the place to confirm the exact argument syntax for your version.
Rank #4
Troubleshooting checklist
- The JSON key does not match the host. VS Code needs
servers; Cursor and Antigravity examples usemcpServers. - The file is in the wrong location for your host, or the host was not restarted after saving.
- A flag was placed outside the
argsarray, or spelled differently from--read-onlyor--local-only. - An experimental tool was expected but not enabled. Confirm the flag and the CLI version.
- The host has its own MCP settings that disable servers. Check those as well.
When in doubt, run ng mcp in a terminal inside the project to see the host configuration instructions for your installed CLI.
Quick Recap
“
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

