{
  "markdown": "# AI Diagram Maker MCP Server\n\nMCP server for [AI Diagram Maker](https://aidiagrammaker.com) — generate beautiful software engineering diagrams directly inside Cursor, Claude Desktop, Claude Code, or any MCP-compatible AI agent.\n\n- [ai-diagram-maker-mcp](https://github.com/erajasekar/ai-diagram-maker-mcp) 🌐 ☁️ - Generate professional software diagrams from plain English descriptions. [![erajasekar/ai-diagram-maker-mcp MCP server](https://glama.ai/mcp/servers/erajasekar/ai-diagram-maker-mcp/badges/score.svg)](https://glama.ai/mcp/servers/erajasekar/ai-diagram-maker-mcp)\n\n## Features\n\n- **5 tools** covering every input type: natural language text, code, ASCII diagram, images, and Mermaid\n- **Inline rendering** — diagrams appear directly in the chat using MCP Apps UI, no downloads\n- **Diagram URL in responses** — open it in your browser to view and edit the diagram\n- **5 diagram types**: flowchart, sequence, ERD, system architecture, UML\n- Supports both **stdio** (local) and **HTTP/Streamable HTTP** (remote) transports\n\n## Contents\n\n- [Prerequisites](#prerequisites)\n- [Hosted MCP server](#hosted-mcp-server)\n- [Installation](#installation)\n- [MCP client configuration](#mcp-client-configuration)\n- [Environment variables](#environment-variables)\n- [Tools](#tools)\n- [Trigger keywords](#trigger-keywords)\n- [Local developer setup](#local-developer-setup)\n- [License](#license)\n\n## Prerequisites\n\n1. Node.js 18+\n2. An [AI Diagram Maker](https://aidiagrammaker.com) account and API key\n\n## Hosted MCP server\n\nThe public MCP endpoint is **https://mcp.aidiagrammaker.com/mcp** (Streamable HTTP). Nothing to install for this option.\n\n### Authentication (HTTP)\n\nFor remote HTTP clients, send your API key on every request — **not** via environment variables:\n\n- `X-ADM-API-Key: <your_api_key>` (recommended), or\n- `Authorization: Bearer <your_api_key>`\n\nUse the API key from your AI Diagram Maker account (see [Prerequisites](#prerequisites)).\n\n### Remote server JSON example\n\nMerge this into your client’s MCP config (replace the API key placeholder):\n\n```json\n{\n  \"mcpServers\": {\n    \"ai-diagram-maker\": {\n      \"url\": \"https://mcp.aidiagrammaker.com/mcp\",\n      \"headers\": {\n        \"X-ADM-API-Key\": \"YOUR_API_KEY\"\n      }\n    }\n  }\n}\n```\n\n## Installation\n\n### Option A — hosted server (recommended)\n\nUse the [remote server JSON example](#remote-server-json-example) above and wire it into your client using [MCP client configuration](#mcp-client-configuration). No global install.\n\n### Option B — run locally with npx\n\nNothing 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`).\n\n```bash\nADM_API_KEY=your_api_key npx ai-diagram-maker-mcp@latest\n```\n\n## MCP client configuration\n\n### Cursor\n\n#### Remote (recommended)\n\nAdd to `~/.cursor/mcp.json` or **Settings → MCP** using the [remote server JSON example](#remote-server-json-example). No environment variables are required for this setup.\n\n#### Local (stdio)\n\n```json\n{\n  \"mcpServers\": {\n    \"ai-diagram-maker\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"ai-diagram-maker-mcp@latest\"],\n      \"env\": {\n        \"ADM_API_KEY\": \"your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\nOptional: add `\"ADM_DEBUG\": \"1\"` to `env` for debug logging — see [Environment variables](#environment-variables).\n\n### Claude Desktop\n\nAdd to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"ai-diagram-maker\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"ai-diagram-maker-mcp@latest\"],\n      \"env\": {\n        \"ADM_API_KEY\": \"your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\n### Claude Code\n\n#### macOS\n\n```bash\nclaude mcp add ai-diagram-maker -t stdio -e ADM_API_KEY=<api_key> -- npx -y ai-diagram-maker-mcp@latest\n```\n\n#### Windows\n\n```bash\nclaude mcp add ai-diagram-maker \\\n  --command \"npx\" \\\n  --args \"-y,ai-diagram-maker-mcp@latest\" \\\n  --env ADM_API_KEY=your_api_key_here\n```\n\n### HTTP transport (local or self-hosted)\n\nTo run an HTTP server yourself (same header-based auth as [Authentication (HTTP)](#authentication-http)):\n\n```bash\nnpx ai-diagram-maker-mcp@latest --transport http\n```\n\nThe server listens on `$PORT` or **3001**. Point clients at `/mcp` and send the API key with each request using the headers above.\n\n## Environment variables\n\n| Variable | Required | Default | Description |\n|---|---|---|---|\n| `ADM_API_KEY` | Yes (stdio only) | — | Your AI Diagram Maker API key (stdio transport only; remote HTTP clients use headers — see [Authentication (HTTP)](#authentication-http)) |\n| `ADM_BASE_URL` | No | `https://app.aidiagrammaker.com` | Override for local/staging API; also used as the base for diagram URLs in tool responses |\n| `ADM_DEBUG` | No | — | 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. |\n\n## Tools\n\n### `generate_diagram_from_text`\n\nGenerate a diagram from a natural language description.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `content` | string | Yes | Natural language description of the diagram |\n| `diagramType` | enum | No | flowchart, sequence, erd, system_architecture, uml |\n| `prompt` | string | No | Additional styling/layout instruction |\n\n**Example prompts:**\n- *\"Create a microservices architecture with API gateway, auth service, user service, and PostgreSQL database\"*\n- *\"Draw a sequence diagram for user login flow with JWT token generation\"*\n- *\"adm show the CI/CD pipeline for a Next.js app deployed to Vercel\"*\n\n---\n\n### `generate_diagram_from_json`\n\nConvert a JSON structure into a diagram (great for API responses, database schemas, config files).\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `content` | string | Yes | JSON string to visualise |\n| `prompt` | string | No | How to interpret the JSON |\n| `diagramType` | enum | No | Preferred diagram type |\n\n---\n\n### `generate_diagram_from_ascii`\n\nConvert ASCII art into a polished diagram.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `content` | string | Yes | Raw ASCII art diagram |\n| `prompt` | string | No | Rendering instructions |\n| `diagramType` | enum | No | Preferred diagram type |\n\n---\n\n### `generate_diagram_from_image`\n\nConvert a whiteboard photo, screenshot, or any image into a clean diagram.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `content` | string | Yes | Public image URL or base64 data URI |\n| `prompt` | string | No | What to extract or how to render |\n| `diagramType` | enum | No | Preferred output diagram type |\n\n---\n\n### `generate_diagram_from_mermaid`\n\nConvert a Mermaid diagram definition to D2 and return a PNG image.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `content` | string | Yes | Mermaid diagram source (e.g. flowchart, sequenceDiagram, erDiagram) |\n| `prompt` | string | No | Optional layout or styling instruction |\n| `diagramType` | enum | No | Preferred diagram type for the converted output |\n\n## Trigger keywords\n\nThe AI agent will automatically select the right tool when you use phrases like:\n\n- `adm ...`\n- `ai diagram maker ...`\n- `create a diagram of ...`\n- `show me a flowchart / sequence diagram / ERD / architecture ...`\n- `visualise / draw / diagram ...`\n\n## Local developer setup\n\nUse these steps to clone the repo, build locally, and run the MCP server with Node.\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/erajasekar/ai-diagram-maker-mcp.git\ncd ai-diagram-maker-mcp\n```\n\n### 2. Install dependencies\n\n```bash\nnpm install\n```\n\n### 3. (Optional) Regenerate API client\n\nIf you change the AI Diagram Maker OpenAPI spec or config, regenerate the client:\n\n```bash\nnpm run generate\n```\n\n### 4. Build\n\n```bash\nnpm run build\n```\n\nThis compiles TypeScript and builds the MCP app UI into `dist/`. The server entrypoint is `dist/index.js`.\n\n### 5. Run the local MCP server\n\n**stdio (default)** — for use with Cursor, Claude Desktop, etc.:\n\n```bash\nADM_API_KEY=your_api_key node dist/index.js\n```\n\nOr use the npm script:\n\n```bash\nADM_API_KEY=your_api_key npm start\n```\n\n**HTTP transport** — for remote clients or testing (same headers as [Authentication (HTTP)](#authentication-http)):\n\n```bash\nADM_API_KEY=your_api_key node dist/index.js --transport http\n```\n\nOr:\n\n```bash\nADM_API_KEY=your_api_key npm run start:http\n```\n\nThe HTTP server listens on `$PORT` (default **3001**).\n\n### 6. Use the local server in Cursor\n\nPoint Cursor at your built server via **Settings → MCP** (or `~/.cursor/mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"ai-diagram-maker\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/ai-diagram-maker-mcp/dist/index.js\"],\n      \"env\": {\n        \"ADM_API_KEY\": \"your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\nReplace `/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.\n\nFor debug logging, add `\"ADM_DEBUG\": \"1\"` to `env` — see [Environment variables](#environment-variables).\n\n## License\n\nMIT\n",
  "bytes": 9363,
  "sha": "2e67ff488c0662342d41a46527657177cf64992362900f53d86b7268e848b331",
  "repo_slug": "erajasekar/ai-diagram-maker-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_erajasekar_ai_diagram_maker_mc_a40473e0/readme"
}