Angular Toolkit MCP server

Provides Angular development teams with component analysis, design system migration support, and automated refactoring workflows including deprecated CSS detection, component contract generation, and validation steps for modernizing legacy codebases.
Back to servers
Setup instructions
Provider
Push Based
Release date
Jul 15, 2025
Language
JavaScript
Stats
1 star

The Angular Toolkit MCP is a specialized server that provides comprehensive analysis and refactoring capabilities for Angular projects. It helps developers detect deprecated CSS classes, perform safe component refactoring, map dependencies, integrate with ESLint, analyze projects, and retrieve component documentation.

Installation and Setup

Prerequisites

  • Node.js version 18 or higher with ESM support

Quick Start

You can quickly get started with the Angular Toolkit MCP using npx without any manual build process:

{
  "mcpServers": {
    "angular-toolkit": {
      "command": "npx",
      "args": [
        "@push-based/angular-toolkit-mcp@latest",
        "--workspaceRoot=/absolute/path/to/your/angular/workspace",
        "--ds.uiRoot=packages/ui"
      ]
    }
  }
}

Configuration Options

Required Parameters

  • workspaceRoot: Absolute path to your Angular workspace root directory
  • ds.uiRoot: Relative path to the directory containing UI components

Optional Parameters

  • ds.storybookDocsRoot: Relative path to Storybook documentation
  • ds.deprecatedCssClassesPath: Relative path to a JavaScript file mapping deprecated CSS classes

Full Configuration Example

{
  "mcpServers": {
    "angular-toolkit": {
      "command": "npx",
      "args": [
        "@push-based/angular-toolkit-mcp@latest",
        "--workspaceRoot=/absolute/path/to/your/angular/workspace",
        "--ds.uiRoot=relative/path/to/ui/components",
        "--ds.storybookDocsRoot=relative/path/to/storybook/docs",
        "--ds.deprecatedCssClassesPath=relative/path/to/component-options.mjs"
      ]
    }
  }
}

Deprecated CSS Classes Format

If you're using the deprecated CSS classes feature, your JavaScript file should export an array of component configurations:

const dsComponents = [
  {
    componentName: 'DsButton',
    deprecatedCssClasses: ['btn', 'btn-primary', 'legacy-button']
  },
  {
    componentName: 'DsModal',
    deprecatedCssClasses: ['modal', 'old-modal']
  }
];

export default dsComponents;

Available Tools and Features

Component Analysis

  • Report violations of deprecated CSS usage
  • List deprecated CSS classes for specific components
  • Report deprecated CSS classes in styling files

Component Documentation

  • List all available Design System components with metadata
  • Retrieve component data including implementation files and documentation

Component Contracts

The component contract system provides a safety net for Angular component refactoring:

  1. Generate an initial contract before making changes
  2. Perform your refactoring
  3. Generate a new contract after changes
  4. Compare contracts to detect breaking changes
# Generate initial contract
build_component_contract for my-component

# Make your changes, then generate new contract
build_component_contract for my-component

# Compare contracts
diff_component_contract old-contract.json new-contract.json

Dependency Analysis

  • Map component dependencies across modules, templates, and styles
  • Analyze project dependencies and validate import paths
  • Check if libraries are buildable/publishable

Code Quality

  • Lint Angular files with automatic ESLint configuration discovery

Troubleshooting

  • Server not starting: Verify all paths are correct
  • Permission errors: Ensure Node.js has read access to all directories
  • Component not found: Check that component names match in configuration files
  • Path resolution issues: Use absolute paths for workspaceRoot and relative paths for other parameters

Tool Behavior with Optional Parameters

Some tools work without optional parameters:

  • get-project-dependencies
  • build-component-usage-graph
  • get-ds-component-data (with limited functionality)
  • Component contract tools

Other tools require specific optional parameters:

  • Tools needing ds.deprecatedCssClassesPath: get-deprecated-css-classes, report-deprecated-css, etc.
  • Tools needing ds.storybookDocsRoot: Documentation-related functionality in get-ds-component-data

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "angular-toolkit-mcp" '{"command":"node","args":["/absolute/path/to/angular-mcp-server/packages/angular-mcp-server/dist/index.js","--workspaceRoot=/absolute/path/to/your/angular/workspace","--ds.storybookDocsRoot=relative/path/to/storybook/docs","--ds.deprecatedCssClassesPath=relative/path/to/component-options.js","--ds.uiRoot=relative/path/to/ui/components"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "angular-toolkit-mcp": {
            "command": "node",
            "args": [
                "/absolute/path/to/angular-mcp-server/packages/angular-mcp-server/dist/index.js",
                "--workspaceRoot=/absolute/path/to/your/angular/workspace",
                "--ds.storybookDocsRoot=relative/path/to/storybook/docs",
                "--ds.deprecatedCssClassesPath=relative/path/to/component-options.js",
                "--ds.uiRoot=relative/path/to/ui/components"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "angular-toolkit-mcp": {
            "command": "node",
            "args": [
                "/absolute/path/to/angular-mcp-server/packages/angular-mcp-server/dist/index.js",
                "--workspaceRoot=/absolute/path/to/your/angular/workspace",
                "--ds.storybookDocsRoot=relative/path/to/storybook/docs",
                "--ds.deprecatedCssClassesPath=relative/path/to/component-options.js",
                "--ds.uiRoot=relative/path/to/ui/components"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later