Generate software engineering diagrams from natural language and code
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.
- ai-diagram-maker-mcp π βοΈ - Generate professional software diagrams from plain English descriptions.
Features
- 5 tools covering every input type: natural language text, JSON, ASCII art, 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
Prerequisites
- Node.js 18+
- An AI Diagram Maker account and API key
Installation
Option A β remote server (recommended)
Use our hosted MCP server β nothing to install. Add the config below to your MCP client (see step 3).
{
"mcpServers": {
"ai-diagram-maker": {
"url": "https://mcp.aidiagrammaker.com/mcp",
"headers": {
"X-ADM-API-Key": "<your api key>"
}
}
}
}
Replace <your api key> with your API key from step 1.
Option B β run directly with npx
Run the MCP server locally. Nothing to install permanently β npx runs it on demand.
The command below is a standalone example to test the server works with any MCP-compatible client:
ADM_API_KEY=your_api_key npx ai-diagram-maker-mcp@latest
MCP Client Configuration
Cursor
Remote server (recommended)
Use the hosted MCP server on Railway with your API key sent in the X-ADM-API-Key header. Add to ~/.cursor/mcp.json or Settings β MCP:
{
"mcpServers": {
"ai-diagram-maker": {
"url": "https://mcp.aidiagrammaker.com/mcp",
"headers": {
"X-ADM-API-Key": "your_api_key_here"
}
}
}
}
Replace your_api_key_here with your AI Diagram Maker API key. No environment variables are required for this setup.
Local (stdio)
To run the server locally instead, use:
{
"mcpServers": {
"ai-diagram-maker": {
"command": "npx",
"args": ["-y", "ai-diagram-maker-mcp"],
"env": {
"ADM_API_KEY": "your_api_key_here"
}
}
}
}
To enable debug logging (request params and API payload), add "ADM_DEBUG": "1" to the env object. View output in Cursor β Output panel, then select the MCP or ai-diagram-maker channel so you see the serverβs stderr logs.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"ai-diagram-maker": {
"command": "npx",
"args": ["-y", "ai-diagram-maker-mcp"],
"env": {
"ADM_API_KEY": "your_api_key_here"
}
}
}
}
Claude Code
claude mcp add ai-diagram-maker \
--command "npx" \
--args "-y,ai-diagram-maker-mcp" \
--env ADM_API_KEY=your_api_key_here
HTTP transport (remote / hosted)
A hosted instance runs at https://mcp.aidiagrammaker.com/mcp. Configure your MCP client with the server URL and pass the API key in request headers (not as an env var):
X-ADM-API-Key: <api_key>(recommended), orAuthorization: Bearer <api_key>
See the Cursor remote config above for a ready-to-use example.
To run your own HTTP server locally:
npx ai-diagram-maker-mcp --transport http
The server listens on $PORT (or 3001). Send the API key in every request to /mcp via the headers above.
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
ADM_API_KEY |
Yes (stdio only) | β | Your AI Diagram Maker API key (used only for stdio transport) |
ADM_BASE_URL |
No | https://app.aidiagrammaker.com |
Override for local/staging API; also used as the base for diagram URLs in tool responses |
ADM_DEBUG |
No | β | Set to 1, true, or yes to log request parameters from the AI agent and the request payload sent to the AI Diagram Maker API. Logs go to stderr. |
Tools
`generate_diagram_from_text`
Generate a diagram from a natural language description.
| Parameter | Type | Required | Description |
|---|---|---|---|
content |
string | Yes | Natural language description of the diagram |
diagramType |
enum | No | flowchart, sequence, erd, system_architecture, network_architecture, uml, mindmap, workflow |
prompt |
string | No | Additional styling/layout instruction |
**Example pro
Tools (1)
generate_diagram_from_textGenerate a diagram from a natural language description.Environment Variables
ADM_API_KEYrequiredYour AI Diagram Maker API key (used only for stdio transport)ADM_BASE_URLOverride for local/staging API; also used as the base for diagram URLsADM_DEBUGSet to 1, true, or yes to log request parameters and API payloadConfiguration
{"mcpServers": {"ai-diagram-maker": {"command": "npx", "args": ["-y", "ai-diagram-maker-mcp"], "env": {"ADM_API_KEY": "your_api_key_here"}}}}