ng-diagram MCP Server logo

ng-diagram MCP Server

Organization
synergycodes

ngDiagram – open-source Angular library for interactive diagrams, node-based editors, and workflow builders. Angular-first: signals and templates.

Publishersynergycodes
Repositoryng-diagram
LanguageTypeScript
Forks
41
Stars
574
Available tools
0
Transport typestdio
Categories
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    ng-diagram MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    574 stars and 41 forks from the linked repository.

ngDiagram

npm version License: Apache 2.0

A robust Angular library for building interactive diagrams, node-based editors, and visual programming interfaces. Designed with Angular and TypeScript, it offers a complete toolkit to create sophisticated, customizable, and high-performance diagramming applications.

Unlike generic diagramming libraries, ngDiagram is Angular-first - built on Angular signals and templates for seamless integration and performance.

Interactive ngDiagram editor: custom Angular components as nodes — including a live chart — with groups, edge drawing, rotation, and zooming

✨ Features

  • 🎯 Interactive Elements: Draggable, resizable, and rotatable nodes
  • 🔗 Flexible Edges: Orthogonal, polyline, and bezier routing, custom arrowheads, labels, and floating edges that connect without ports
  • 🧩 Custom Templates: Your own Angular components as nodes and edges — templates, signals, DI, everything works
  • 📦 Groups: Container nodes with nesting and group-aware dragging
  • 🎛️ Rich Interactions: Selection, box selection, copy/paste, snapping, panning, zooming, and more
  • ⌨️ Keyboard Shortcuts: Configurable, platform-aware bindings for all common actions
  • 📱 Touch Support: Pinch zoom, two-finger panning, and long-press box selection out of the box
  • 🗺️ Minimap: Bird's-eye overview widget with click-and-drag navigation
  • 🎨 Consistent Styling: Built-in design system with CSS variables and light/dark themes
  • 🖱️ Embedded Palette: Built-in drag-and-drop palette system for adding nodes to diagrams
  • ⚡ Performance: Signal-based reactivity, spatial hashing, and viewport virtualization for large diagrams
  • 🔌 Extensible Architecture: Middleware pipeline for custom behaviors and business logic
  • 🤖 AI-Ready Docs: Official MCP server lets AI assistants search the docs and API from your editor

📚 What You Can Build

With ngDiagram, you can create:

  • Flow Diagrams: Process flows, decision trees, and workflow visualizations
  • Node-Based Editors: Visual programming interfaces and data flow editors
  • Network Diagrams: System architectures and network topologies
  • Mind Maps: Hierarchical information structures and brainstorming tools
  • Circuit Diagrams: Electronic schematics and technical drawings
  • Custom Visualizations: Any diagram type with custom node and edge templates

See our Templates for production-ready examples you can fork and customize.

🎮 Try the Demo

See ngDiagram in action: Live Demo | Source Code

🎓 Video Course

Learn ngDiagram by building an Angular workflow builder from scratch — a step-by-step video series by the team:

  1. Angular workflow builder from scratch | ngDiagram Ep. 1: Project setup
  2. Angular signals, zero glue code | ngDiagram Ep. 2: Properties panel
  3. Custom nodes in an Angular workflow builder | ngDiagram Ep. 3: Node types

The series is ongoing — new episodes are in production. Follow the Synergy Codes YouTube channel to catch the next one.

🧩 Templates

Production-ready starter kits built with ngDiagram. Fork, customize, ship.

TemplateDescriptionDemoSource
Org ChartTree-based org chart with drag-and-drop reordering, expand/collapse, ELK.js layout, minimap, dark/light themeLive DemoSource
Electric CircuitElectronic circuit editor with a searchable SVG parts library, smart wire junctions, and SVG/JPEG/JSON exportLive DemoSource
Single-Line DiagramHigh-voltage substation SLD editor with IEC 60617 symbols and a schema-driven properties panelLive DemoSource
AV SchematicAudio/video signal-flow editor with typed connectors (XLR, HDMI, Speakon) and PNG/DXF export for AutoCADLive DemoSource
Assembly LineProduction-line monitor with Edit/Monitor modes, a live data feed, threshold-colored KPIs, sparklines, and PNG/SVG/DXF exportLive DemoSource

🚀 Quick Start

Installation

bash
npm install ng-diagram

Import Styles

⚠️ Important: You must import the required styles for the diagram to display correctly. Because the library uses CSS variables, import the stylesheet in your global file (e.g. src/styles.scss), not inside a component.

css
/* src/styles.scss */
@import 'ng-diagram/styles.css';

Create Your First Diagram

typescript
import { Component } from '@angular/core';
import { NgDiagramComponent, initializeModel, provideNgDiagram } from 'ng-diagram';

@Component({
  imports: [NgDiagramComponent],
  providers: [provideNgDiagram()],
  template: ` <ng-diagram [model]="model" /> `,
  styles: `
    :host {
      display: flex;
      height: 300px;
    }
  `,
})
export class MyDiagramComponent {
  model = initializeModel({
    nodes: [
      { id: '1', position: { x: 100, y: 150 }, data: { label: 'Node 1' } },
      { id: '2', position: { x: 400, y: 150 }, data: { label: 'Node 2' } },
    ],
    edges: [
      {
        id: '1',
        source: '1',
        sourcePort: 'port-right',
        targetPort: 'port-left',
        target: '2',
        data: {},
      },
    ],
  });
}

That's it! You now have a working diagram with default node and edge templates.

🎨 Customization

Custom Nodes

Create custom node components with any Angular template:

typescript
import { Component, input } from '@angular/core';
import { NgDiagramPortComponent, type NgDiagramNodeTemplate, type Node } from 'ng-diagram';

type CustomNodeData = { title: string; description: string };

@Component({
  selector: 'app-custom-node',
  imports: [NgDiagramPortComponent],
  template: `
    <div class="custom-node">
      <h3>{{ node().data.title }}</h3>
      <p>{{ node().data.description }}</p>
    </div>
    <ng-diagram-port id="input" side="left" type="target" />
    <ng-diagram-port id="output" side="right" type="source" />
  `,
  styles: [
    `
      .custom-node {
        background: #fff;
        border: 2px solid #333;
        border-radius: 8px;
        padding: 16px;
        min-width: 200px;
      }
    `,
  ],
})
export class CustomNodeComponent implements NgDiagramNodeTemplate<CustomNodeData> {
  node = input.required<Node<CustomNodeData>>();
}

Custom Edges

Create custom edge components with unique visual styles:

typescript
import { Component, input } from '@angular/core';
import { NgDiagramBaseEdgeComponent, type Edge, type NgDiagramEdgeTemplate } from 'ng-diagram';

@Component({
  selector: 'app-custom-edge',
  imports: [NgDiagramBaseEdgeComponent],
  template: ` <ng-diagram-base-edge [edge]="edge()" stroke="#962ee5" [strokeWidth]="2" /> `,
})
export class CustomEdgeComponent implements NgDiagramEdgeTemplate {
  edge = input.required<Edge>();
}

🛠️ Core Building Blocks

The library ships components for the diagram canvas, backgrounds, ports, palette, and minimap; injectable services (model, nodes, selection, viewport, clipboard, groups) for programmatic control; and directives for selection and highlight styling. Start with the Services guide and browse the full API reference in the documentation.

👩‍💻 About the Creators

ngDiagram is built and maintained by Synergy Codes - a team of developers who’ve spent over a decade designing and delivering diagramming solutions for clients worldwide.

We are continuously distilling everything we know about building interactive diagrams, editors, and visual tools into this library. Our goal is simple: to empower Angular developers to create diagramming applications faster, easier, and with confidence.

When you use this library, you can be sure you’re in good hands - backed by a team that knows diagrams inside out.

📖 Documentation

For comprehensive documentation, examples, and API reference, visit:

📚 Full Documentation

The documentation includes:

  • Detailed API reference
  • Interactive examples
  • Customization guides
  • Best practices
  • Advanced use cases

🤖 MCP Server

Use AI assistants like Claude, Cursor, or Windsurf to search ngDiagram docs and API directly from your editor. No browser needed.

json
{
  "mcpServers": {
    "ng-diagram-docs": {
      "command": "npx",
      "args": ["-y", "@ng-diagram/mcp"]
    }
  }
}

See @ng-diagram/mcp for setup details and Windows configuration.

🔧 Requirements

  • Angular: 18.0.0 or higher
  • TypeScript: 5.6.0 or higher
  • Node.js: 18.19.1 or higher

📄 License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

🔗 Links

🆘 Support


Built with ❤️ by the Synergy Codes team

Use ng-diagram MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once ng-diagram MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add ng-diagram MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the ng-diagram MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "synergycodes-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the ng-diagram MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the ng-diagram MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use ng-diagram MCP Server to help me with this task?
ng-diagram MCP Server
Sure. I read it.
Here is what I found using ng-diagram MCP Server.

Frequently asked questions

What is the ng-diagram MCP Server MCP server used for?

ng-diagram MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use ng-diagram MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use ng-diagram MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use ng-diagram MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With ng-diagram MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect ng-diagram MCP Server MCP to TypingMind?

ng-diagram MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does ng-diagram MCP Server MCP provide in TypingMind?

ng-diagram MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use ng-diagram MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If ng-diagram MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇