diagrams-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@diagrams-mcpgenerate a class diagram for a User with id, name, email and Order with id, total, status"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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: AI Charts
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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.28
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to programmatically create and manage flowcharts, ERDs, and swimlane diagrams. It provides tools for manipulating diagram structures, performing auto-layouts, and exporting to Mermaid or Markdown formats.14MIT
- AlicenseNot gradedqualityDmaintenanceEnables creating, manipulating, and managing Mermaid diagrams with automatic saving and multi-format conversion from JSON, CSV, Python, Markdown, and plain text.7MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI to create, edit, and manage Mermaid diagrams via MCP, with real-time preview in a browser-based editor.3
Related MCP Connectors
Generate dynamic Mermaid diagrams and charts with AI assistance. Customize styles and export diagr…
Generate cloud architecture diagrams, flowcharts, and sequence diagrams.
AI agent draws editable hand-drawn diagrams (flowchart, ER, architecture) via MCP, not static images
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nacho-mazzoni/diagrams-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server