diagrams-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
diagrams-mcp
Description
diagrams-mcp is an MCP that allows for the automatic generation of diagrams from text or JSON structures. It currently supports:
Class diagrams (UML)
Entity-relationship (ER) diagrams
Generation via natural language
SVG export using Mermaid
Integration designed for MCP agents
The goal is to allow an agent or user to describe a system and obtain the corresponding diagram without writing Mermaid manually.
Related MCP server: MCP Server Mermaid
Installation
Clone the repository
git clone https://github.com/nacho-mazzoni/diagrams-mcp.git
cd diagrams-mcpInstall dependencies
npm installInstall Mermaid CLI (if not already installed)
npm install -g @mermaid-js/mermaid-cliVerify installation
mmdc -hUsage
This MCP is designed to work alongside an agent. The recommended workflow is:
Ask the agent to analyze the project code.
Request that the agent generate a JSON with:
Detected classes
Entities
Attributes
Relationships
Changes made
Pass that JSON directly to the MCP.
The MCP automatically generates the corresponding diagram.
This allows the diagram to be built from the actual state of the code or the changes introduced by the agent, without the need to manually write Mermaid.
The MCP accepts:
Structured JSON generated by the agent
Natural language describing the model
Partial data to update existing diagrams
Integration with an agent
A user can integrate diagrams-mcp into their agent by following this workflow:
The user asks the agent to analyze the code or describe a system.
The agent generates a structured JSON with entities, classes, attributes, and relationships.
The agent sends that JSON to the MCP.
diagrams-mcp generates the diagram automatically.
The agent returns the generated SVG to the user.
Conceptual workflow:
Usuario -> Agente -> JSON -> diagrams-mcp -> SVG -> UsuarioThis allows the diagram to reflect the actual state of the code or the changes made by the agent.
Example of JSON generated by an agent
{
"entities": [
{ "name": "Usuario", "attributes": ["id", "nombre"] },
{ "name": "Pedido", "attributes": ["id", "fecha"] }
],
"relations": [
{
"from": "Usuario",
"to": "Pedido",
"fromCard": "1",
"toCard": "1..*",
"label": "realiza"
}
]
}That JSON is passed directly to the MCP to generate the diagram.
Project structure
diagrams-mcp
│
├── tools
│ ├── classDiagram.js
│ └── erDiagram.js
│
├── parsers
│ ├── textToClass.js
│ └── textToER.js
│
├── index.js
└── package.jsonProject goal
Integration with MCP agents
Automatic diagram generation during development
Support for natural language
Future extension to more diagram types
Current status
ER diagrams with cardinality and PK and FK keys
UML class diagrams
Parser from text
SVG export
Clarifications
The MCP also supports the definition of entities with attributes, primary keys (PK), and foreign keys (FK) using text blocks separated by blank lines, allowing for the generation of complete ER diagrams from structured descriptions.
This server cannot be deployed
Maintenance
Related MCP Connectors
Create and manage Mermaid.js flowcharts and diagrams with AI agents via MCP.
Generate dynamic Mermaid diagrams and charts with AI assistance. Customize styles and export diagr…
Render, verify, describe, and safely edit Mermaid diagrams through MCP.
Generate cloud architecture diagrams, flowcharts, and sequence diagrams.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA tool that generates various UML diagrams through natural language descriptions or PlantUML code, functioning as an MCP server that can integrate with clients like Claude.27-
- AlicenseBqualityDmaintenance❤️ Generate mermaid diagram and chart with AI MCP dynamically.13,956 npm646TypeScriptMIT
- FlicenseNot gradedqualityDmaintenanceEnables AI to create, edit, and manage Mermaid diagrams via MCP, with real-time preview in a browser-based editor.3-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to interact with a local Mermaid diagram editor via MCP, allowing them to get and set diagrams programmatically.23,811,280 npm13Apache 2.0