AI Diagram Maker

io.github.erajasekar由 GitHub 账号 erajasekar 发布v1.0.0更新于 Oct 24, 2026

Generate software diagrams from natural language, code, ASCII, images, Mermaid.

发布方自己的服务:Diagram

已验证STDIO仅桌面开发者工具媒体与设计

概览

AI 生成的概览

借助 AI Diagram Maker 服务,把自然语言、JSON、ASCII、图片或 Mermaid 转成软件图(流程图、时序图、ERD、架构图、UML)。

可以做什么
  • 根据自然语言描述生成图,可指定图类型和样式提示
  • 把 JSON 结构(如 API 响应、数据库模式、配置文件)转成图
  • 把 ASCII 图或白板照片、截图、图片链接转成整洁的图
  • 把 Mermaid 源码转换为 D2 并返回 PNG 图片
  • 在回复中给出图的链接,并可在对话中内联渲染
适用场景
适合在 Cursor、Claude Desktop、Claude Code 等 MCP 客户端中边工作边让助手绘制架构图、时序图、ERD 或 UML 图,也适合把已有的 Mermaid、JSON 或白板图片整理成规范图。
运行要求
可使用托管 HTTP 端点(无需安装),或用 npx 运行本地 npm 包,需要 Node.js 18+。需要 AI Diagram Maker 账号和 API 密钥:HTTP 方式通过 X-ADM-API-Key 或 Authorization Bearer 请求头发送,stdio 方式通过环境变量 ADM_API_KEY 提供。需要能访问该服务的网络。
安装前请注意
API 密钥属于机密,避免写入共享配置或日志。提交的图内容(包括图片链接或 base64 图片、代码、JSON)会发送给第三方 AI Diagram Maker 服务。开启 ADM_DEBUG 调试日志会把请求参数和 API 载荷写入 stderr。图会创建在你的账号下,可能消耗服务额度或积分。

安装

在 SourceWeft 中

  1. 打开 控制台中的 AI Diagram Maker,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

AI Diagram Maker MCP Server

MCP server for AI Diagram Maker — generate beautiful software engineering diagrams directly inside Cursor, Claude Desktop, Claude Code, or any MCP-compatible AI agent.

Features

  • 5 tools covering every input type: natural language text, code, ASCII diagram, images, and Mermaid
  • Inline rendering — diagrams appear directly in the chat using MCP Apps UI, no downloads
  • Diagram URL in responses — open it in your browser to view and edit the diagram
  • 5 diagram types: flowchart, sequence, ERD, system architecture, UML
  • Supports both stdio (local) and HTTP/Streamable HTTP (remote) transports

Contents

Prerequisites

  1. Node.js 18+
  2. An AI Diagram Maker account and API key

Hosted MCP server

The public MCP endpoint is https://mcp.aidiagrammaker.com/mcp (Streamable HTTP). Nothing to install for this option.

Authentication (HTTP)

For remote HTTP clients, send your API key on every request — not via environment variables:

  • X-ADM-API-Key: <your_api_key> (recommended), or
  • Authorization: Bearer <your_api_key>

Use the API key from your AI Diagram Maker account (see Prerequisites).

Remote server JSON example

Merge this into your client’s MCP config (replace the API key placeholder):

json
{  "mcpServers": {    "ai-diagram-maker": {      "url": "https://mcp.aidiagrammaker.com/mcp",      "headers": {        "X-ADM-API-Key": "YOUR_API_KEY"      }    }  }}

Installation

Option A — hosted server (recommended)

Use the remote server JSON example above and wire it into your client using MCP client configuration. No global install.

Option B — run locally with npx

Nothing to install permanently — npx runs the package on demand. The package name is ai-diagram-maker-mcp; append @latest if you want every invocation to resolve the newest release (recommended for one-off runs and claude mcp add).

bash
ADM_API_KEY=your_api_key npx ai-diagram-maker-mcp@latest

MCP client configuration

Cursor

Remote (recommended)

Add to ~/.cursor/mcp.json or Settings → MCP using the remote server JSON example. No environment variables are required for this setup.

Local (stdio)
json
{  "mcpServers": {    "ai-diagram-maker": {      "command": "npx",      "args": ["-y", "ai-diagram-maker-mcp@latest"],      "env": {        "ADM_API_KEY": "your_api_key_here"      }    }  }}

Optional: add "ADM_DEBUG": "1" to env for debug logging — see Environment variables.

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{  "mcpServers": {    "ai-diagram-maker": {      "command": "npx",      "args": ["-y", "ai-diagram-maker-mcp@latest"],      "env": {        "ADM_API_KEY": "your_api_key_here"      }    }  }}

Claude Code

macOS
bash
claude mcp add ai-diagram-maker -t stdio -e ADM_API_KEY=<api_key> -- npx -y ai-diagram-maker-mcp@latest
Windows
bash
claude mcp add ai-diagram-maker \  --command "npx" \  --args "-y,ai-diagram-maker-mcp@latest" \  --env ADM_API_KEY=your_api_key_here

HTTP transport (local or self-hosted)

To run an HTTP server yourself (same header-based auth as Authentication (HTTP)):

bash
npx ai-diagram-maker-mcp@latest --transport http

The server listens on $PORT or 3001. Point clients at /mcp and send the API key with each request using the headers above.

Environment variables

VariableRequiredDefaultDescription
ADM_API_KEYYes (stdio only)—Your AI Diagram Maker API key (stdio transport only; remote HTTP clients use headers — see Authentication (HTTP))
ADM_BASE_URLNohttps://app.aidiagrammaker.comOverride for local/staging API; also used as the base for diagram URLs in tool responses
ADM_DEBUGNo—Set to 1, true, or yes to log request parameters from the AI agent and the payload sent to the AI Diagram Maker API. Logs go to stderr. In Cursor, open Output, choose the MCP or ai-diagram-maker channel to read the server logs.

Tools

generate_diagram_from_text

Generate a diagram from a natural language description.

ParameterTypeRequiredDescription
contentstringYesNatural language description of the diagram
diagramTypeenumNoflowchart, sequence, erd, system_architecture, uml
promptstringNoAdditional styling/layout instruction

Example prompts:

  • "Create a microservices architecture with API gateway, auth service, user service, and PostgreSQL database"
  • "Draw a sequence diagram for user login flow with JWT token generation"
  • "adm show the CI/CD pipeline for a Next.js app deployed to Vercel"

generate_diagram_from_json

Convert a JSON structure into a diagram (great for API responses, database schemas, config files).

ParameterTypeRequiredDescription
contentstringYesJSON string to visualise
promptstringNoHow to interpret the JSON
diagramTypeenumNoPreferred diagram type

generate_diagram_from_ascii

Convert ASCII art into a polished diagram.

ParameterTypeRequiredDescription
contentstringYesRaw ASCII art diagram
promptstringNoRendering instructions
diagramTypeenumNoPreferred diagram type

generate_diagram_from_image

Convert a whiteboard photo, screenshot, or any image into a clean diagram.

ParameterTypeRequiredDescription
contentstringYesPublic image URL or base64 data URI
promptstringNoWhat to extract or how to render
diagramTypeenumNoPreferred output diagram type

generate_diagram_from_mermaid

Convert a Mermaid diagram definition to D2 and return a PNG image.

ParameterTypeRequiredDescription
contentstringYesMermaid diagram source (e.g. flowchart, sequenceDiagram, erDiagram)
promptstringNoOptional layout or styling instruction
diagramTypeenumNoPreferred diagram type for the converted output

Trigger keywords

The AI agent will automatically select the right tool when you use phrases like:

  • adm ...
  • ai diagram maker ...
  • create a diagram of ...
  • show me a flowchart / sequence diagram / ERD / architecture ...
  • visualise / draw / diagram ...

Local developer setup

Use these steps to clone the repo, build locally, and run the MCP server with Node.

1. Clone the repository

bash
git clone https://github.com/erajasekar/ai-diagram-maker-mcp.gitcd ai-diagram-maker-mcp

2. Install dependencies

bash
npm install

3. (Optional) Regenerate API client

If you change the AI Diagram Maker OpenAPI spec or config, regenerate the client:

bash
npm run generate

4. Build

bash
npm run build

This compiles TypeScript and builds the MCP app UI into dist/. The server entrypoint is dist/index.js.

5. Run the local MCP server

stdio (default) — for use with Cursor, Claude Desktop, etc.:

bash
ADM_API_KEY=your_api_key node dist/index.js

Or use the npm script:

bash
ADM_API_KEY=your_api_key npm start

HTTP transport — for remote clients or testing (same headers as Authentication (HTTP)):

bash
ADM_API_KEY=your_api_key node dist/index.js --transport http

Or:

bash
ADM_API_KEY=your_api_key npm run start:http

The HTTP server listens on $PORT (default 3001).

6. Use the local server in Cursor

Point Cursor at your built server via Settings → MCP (or ~/.cursor/mcp.json):

json
{  "mcpServers": {    "ai-diagram-maker": {      "command": "node",      "args": ["/absolute/path/to/ai-diagram-maker-mcp/dist/index.js"],      "env": {        "ADM_API_KEY": "your_api_key_here"      }    }  }}

Replace /absolute/path/to/ai-diagram-maker-mcp with the actual path to your cloned repo. After changing the config, restart Cursor or reload the MCP servers.

For debug logging, add "ADM_DEBUG": "1" to env — see Environment variables.

License

MIT

来源:README.md,提交 f24e513

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Diagram 集成