1. Conduid
  2. Cloud
  3. Diagram Bridge MCP
MCP server · Cloud

Diagram Bridge MCP

A "bridge" MCP server with a unique Prompt+Tool design that helps LLMs seamlessly generate and render diagrams. Powered by Kroki to support most popular formats.

Unclaimed MIT last commit a year ago krokimcpdiagramscloud
54Fair

Scored 2 days ago · breakdown

About Diagram Bridge MCP

Diagram Bridge MCP is an MCP server published by tohachan in the Cloud category: a "bridge" MCP server with a unique Prompt+Tool design that helps LLMs seamlessly generate and render diagrams. Powered by Kroki to support most popular formats.

The repository has 14 stars and 4 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/tohachan/diagram-bridge-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Diagram Bridge MCP

Powered by Claude · Grounded in docs

I know everything about Diagram Bridge MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 4 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v1.0.6Release v1.0.6 · 20 Jul 2025
v1.0.5Release v1.0.5 · 20 Jul 2025
v1.0.4Release v1.0.4 · 20 Jul 2025
v1.0.3Release v1.0.3 · 20 Jul 2025
v1.0.2Release v1.0.2: CI Fixes · 19 Jul 2025🔧 CI/CD Improvements Docker Test Skip: Added conditional skipping of Docker rendering tests when Docker unavailable Jest Coverage Fix: Adjusted coverage thresholds to realistic levels for CI environment kroki-client Exclusion: Excluded…

README

Diagram Bridge MCP Server

CI Release codecov Node.js Version

A comprehensive MCP server that bridges the gap between LLMs and diagram creation through three powerful, independent tools: intelligent format selection, format-specific instruction generation, and professional diagram rendering (using kroki server). Each tool can be used standalone or combined in sequence for complete diagram workflows - from choosing the right format to generating the final image.

Supported Formats: Mermaid, PlantUML, C4 Model, D2, GraphViz, BPMN, Structurizr, Excalidraw, Vega-Lite

Demo

Quick Start

  1. Prerequisites:

    • Node.js 18.0 or higher
    • Docker and Docker Compose
  2. Install and build:

git clone git@github.com:tohachan/diagram-bridge-mcp.git
cd diagram-bridge-mcp
npm install && npm run build
  1. Configure ports (optional):
# Copy and edit environment file to customize ports
cp .env.example .env
# Edit .env to set PORT and KROKI_PORT as needed

# Or set environment variables directly:
export PORT=4000        # MCP Server port (default: 3000)
export KROKI_PORT=9000  # Kroki service port (default: 8000)
  1. Start services:
# Option 1: Interactive port configuration
./scripts/start-with-ports.sh

# Option 2: Default ports (3000 for MCP, 8000 for Kroki)
docker-compose up --build

# Option 3: Custom ports via environment variables
PORT=4000 KROKI_PORT=9000 docker-compose up --build
  1. Add to Cursor (or any MCP client):

For direct local use (without Docker):

{
  "mcpServers": {
    "diagram-bridge-mcp": {
      "command": "node",
      "args": ["/path/to/diagram-bridge-mcp/dist/index.js"],
      "enabled": true
    }
  }
}

For Docker-based setup (recommended):

{
  "mcpServers": {
    "diagram-bridge-mcp": {
      "command": "docker",
      "args": [
        "exec", 
        "-i", 
        "diagram-bridge-mcp", 
        "node", 
        "dist/index.js"
      ],
      "enabled": true
    }
  }
}

Note: The MCP protocol uses STDIO communication. The HTTP endpoints (:3000/health) are only for Docker monitoring, not for MCP client connections.

  1. Start using: The server provides three MCP tools ready for use!

💡 Usage Example

Here's a simple prompt to demonstrate the complete workflow:

"Choose the best diagram format for visualizing a current project architecture, then generate the diagram code and render it to an image file. Save the result as 'architecture-diagram'."

This single prompt will:

  1. Analyze your request and recommend the optimal format
  2. Get specific instructions for creating the diagram in that format
  3. Create and render the final diagram to a PNG/SVG file

🎨 Examples Gallery

Want to see what's possible? Check out Examples Gallery

🛠️ Tools Overview

help_choose_diagram

Purpose: Intelligent format selection based on your requirements

  • Analyzes your request using AI-powered heuristics
  • Provides confidence-scored recommendations
  • Works with format constraints when needed
  • Generates structured prompts for optimal LLM decision-making

Example: "I need to show database relationships" → Recommends Mermaid ER diagram format with detailed reasoning

get_diagram_instructions

Purpose: Generate format-specific coding instructions

  • Creates tailored prompts for any supported diagram format
  • Includes syntax guidelines, best practices, and common pitfalls
  • Provides working examples and output specifications
  • Ensures LLMs generate syntactically correct diagram code

Example: For Mermaid format → Detailed Mermaid syntax guide with examples

render_diagram

Purpose: Transform diagram code into professional images

  • Renders diagrams via integrated Kroki service
  • Supports PNG and SVG output formats
  • Includes intelligent caching for performance
  • Provides file storage with absolute paths for easy access

Example: Mermaid code → High-quality PNG/SVG image file

⚙️ Configuration

Basic Setup

  • Default storage: {project-root}/generated-diagrams/
  • Default Kroki: Uses local Docker Kroki service
  • Default ports: MCP Server (3000), Kroki (8000)

Port Configuration

The server automatically configures ports based on environment variables:

  • External Port (PORT): The port exposed by Docker container (default: 3000)
  • Kroki Port (KROKI_PORT): The port for Kroki service (default: 8000)
  • Internal Communication: Services communicate internally using fixed container ports
# Interactive configuration (recommended)
./scripts/start-with-ports.sh

# Quick port change
PORT=4000 KROKI_PORT=9000 docker-compose up --build

# Check running services
curl http://localhost:4000/health  # Using your custom PORT

Note: When running in Docker, the server provides HTTP endpoints for health monitoring at /health and service info at /info.

For advanced configuration, see our Configuration Guide.

📚 Documentation


Perfect for: LLMs that need to create diagrams but don't know which format to use or how to render them professionally.

Powered by: Kroki - Universal diagram rendering service

Made with ❤️

README fetched from the repository 4 days ago. The original is authoritative.

Questions

About Diagram Bridge MCP

How do I install Diagram Bridge MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Diagram Bridge MCP safe to use with an AI agent?

Its trust score is 54 out of 100 (fair). It passes 5 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Diagram Bridge MCP still maintained?

The last commit was a year ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.