diagram-mcp
diagram-mcp
MCP-сервер, который превращает текст диаграммы в формате «диаграмма как код» в PNG-файлы на вашем диске. Ни браузера, ни сети, ни внешних сервисов. Полезен для создания блок-схем, которые можно вставлять в документацию, тикеты или README.

Инструменты
render_diagram: превращает код в PNG и возвращает путь к файлуpreview_diagram: рисует диаграмму в виде текстового арта прямо в диалоге, не создавая файловvalidate_diagram: разбирает код и сообщает об ошибках с номерами строк, ничего не записываетdiagram_syntax: справочник по языку
Related MCP server: Vizdown-MCP
Установка
Требуется Node 20.12+.
git clone https://github.com/JVmano/diagram-mcp.git
cd diagram-mcp
npm install
npm run buildЗатем зарегистрируйте его в Claude Code:
claude mcp add diagram --scope user \
--env DIAGRAM_MCP_OUTPUT_DIR=$HOME/Documents/diagram-renders \
-- node "$(pwd)/dist/index.js"Или добавьте его вручную в .mcp.json / ваш пользовательский конфиг:
{
"mcpServers": {
"diagram": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/diagram-mcp/dist/index.js"],
"env": { "DIAGRAM_MCP_OUTPUT_DIR": "/absolute/path/to/renders" }
}
}
}Перезапустите сессию, а затем попросите нарисовать диаграмму. После получения изменений снова выполните npm run build.
Язык
title "Reward approval flow"
direction TB
node event "Conversion recorded" shape=rounded
node auto "Auto-approve?" shape=diamond size=200x100
node queue "Manual review queue"
event -> auto
auto -> queue "no"Фигуры: rect, rounded, ellipse, diamond, hexagon. Соединения: from -> to ["label"] [style=solid|dashed]. Указание позиций через at=x,y необязательно. Если их опустить, компоновка расставит фигуры сама. Вызовите diagram_syntax для полного справочника.
Конфигурация
Всё необязательно, у всего есть значения по умолчанию. См. .env.example. Результаты рендеринга сохраняются в DIAGRAM_MCP_OUTPUT_DIR (по умолчанию ~/Documents/diagram-renders). Явный outputPath должен находиться внутри этой директории или рабочей директории, если только не установлено DIAGRAM_MCP_ALLOW_ANY_OUTPUT_PATH=true.
Разработка
npm test # unit tests
npm run test:e2e # builds, then drives the server over stdio
npm run verify # typecheck, test, build, e2eПарсер, компоновка и генерация SVG в src/core используются совместно с локальным проектом редактора диаграмм; npm run check:sync сравнивает их с ним, когда он расположен в соседней директории.
Лицензия
MIT
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
- AlicenseAqualityDmaintenanceConverts diagrams (Mermaid, PlantUML, Graphviz, etc.) to SVG, PNG, PDF, or JPEG images using Kroki.io. Supports generating diagram URLs and downloading diagrams to local files.2358MIT
- AlicenseAqualityDmaintenanceConverts Markdown files into professional diagrams such as flowcharts, mind maps, and architecture diagrams using Mermaid.js and custom SVG renderers. It enables users to list, render, and export visualizations in multiple formats including SVG, PNG, and PDF.3MIT
- AlicenseNot gradedqualityBmaintenanceEnables generating cloud architecture diagrams, flowcharts, sequence diagrams, and more using three rendering engines: mingrammer/diagrams, Mermaid, and PlantUML.3MIT
- FlicenseNot gradedqualityBmaintenanceFast Mermaid diagram validation and rendering (PNG/SVG) using jsdom and sharp, no Chromium needed.10
Related MCP Connectors
Diagrams, badges, charts and QR codes as plain image URLs you can paste into Markdown.
Create, validate, edit, export (markdown/svg/png/mermaid), and search JSON Canvas files.
Generate cloud architecture diagrams, flowcharts, and sequence diagrams.
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/JVmano/diagram-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server