AD

andrewmoshu/diagram-mcp-server

部署与 DevOps

本页由 AI 翻译,技术细节请以原文为准。 查看原文

149 stars 19 forks 质量 75 趋势 0Apache-2.0

andrewmoshu/diagram-mcp-server 是从 https://github.com/andrewmoshu/diagram-mcp-server. 导入的 MCP 服务器候选

概览

andrewmoshu/diagram-mcp-server 是从 https://github.com/andrewmoshu/diagram-mcp-server. 导入的 MCP 服务器候选

概述(AI 翻译)

多云基础设施图模型上下文协议(MCP)服务器

该MCP服务器可通过Python图包DSL无缝生成图表。使用自然语言,使用Claude Desktop或其他MCP客户端,生成专业基础设施图,适用于任何云提供商(AWS、GCP、Azure)、Kubernetes、本地、混合和多云架构。

注:这是基于awslabs/aws-diagram-mcp-server的衍生作品,并扩展了多云服务提供商支持和增强功能。

先修条件

  1. 安装 GraphViz 带开发头部 - 用于生成图表和导出 .drawio
  2. 安装 Astral 中的 uv(推荐)或使用 pip
  3. (可选) 安装 Helm - 与parse_helm_chart进行完整Helm图表解析的必要条件。

安装GraphViz

macOS(自制):

Ubuntu/Debian:

Windows(巧克力味):

或者从 graphviz.org 下载

安装头盔(可选)

使用 parse_helm_chart 工具进行完整模板渲染是必不可少的 Helm 配置。没有 Helm,解析器将采用模板支持有限的备回模式。

macOS(自制):

Ubuntu/Debian:

Windows(巧克力味):

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Infrastructure Diagram MCP Server

Model Context Protocol (MCP) server for Multi-Cloud Infrastructure Diagrams

This MCP server seamlessly creates diagrams using the Python diagrams package DSL. Generate professional infrastructure diagrams for any cloud provider (AWS, GCP, Azure), Kubernetes, on-premises, hybrid, and multi-cloud architectures using natural language with Claude Desktop or other MCP clients.

Note: This is a derivative work based on awslabs/aws-diagram-mcp-server, extended with multi-cloud provider support and enhanced features.

Prerequisites

  1. Install GraphViz with development headers - Required for diagram generation and .drawio export
  2. Install uv from Astral (recommended) or use pip
  3. (Optional) Install Helm - Required for full Helm chart parsing with parse_helm_chart

Installing GraphViz

macOS (Homebrew):

brew install graphviz

Ubuntu/Debian:

sudo apt-get install graphviz graphviz-dev

Windows (Chocolatey):

choco install graphviz

Or download from graphviz.org

Installing Helm (Optional)

Helm is required for full template rendering with the parse_helm_chart tool. Without Helm, the parser will use a fallback mode with limited template support.

macOS (Homebrew):

brew install helm

Ubuntu/Debian:

curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

Windows (Chocolatey):

choco install kubernetes-helm

Or download from helm.sh/docs/intro/install

MCP Client Configuration

Configure the MCP server in your MCP client. The CFLAGS and LDFLAGS (or INCLUDE and LIB on Windows) environment variables are needed for the initial build of pygraphviz.

Claude Desktop / Cursor on macOS (~/Library/Application Support/Claude/claude_desktop_config.json or ~/.cursor/mcp.json):

{
  "mcpServers": {
    "infrastructure-diagrams": {
      "command": "uvx",
      "args": ["infrastructure-diagram-mcp-server"],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR",
        "CFLAGS": "-I/opt/homebrew/include",
        "LDFLAGS": "-L/opt/homebrew/lib"
      }
    }
  }
}

Note: /opt/homebrew is the default Homebrew prefix on Apple Silicon Macs. For Intel Macs, use /usr/local instead.

Linux (e.g., ~/.config/claude/claude_desktop_config.json):

{
  "mcpServers": {
在 GitHub 查看完整 README

安装

uvx infrastructure-diagram-mcp-server
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "infrastructure-diagrams": { "command": "uvx", "args": ["infrastructure-diagram-mcp-server"], "env": { "FASTMCP_LOG_LEVEL": "ERROR", "CFLAGS": "-I/opt/homebrew/include", "LDFLAGS": "-L/opt/homebrew/lib" } } } }