Diagrams MCP Server
Enables discovery of Alibaba Cloud services and generation of infrastructure diagrams and architecture code containing Alibaba Cloud components, including cross-provider comparisons, cost estimation, and compliance checks for Alibaba Cloud architectures.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Diagrams MCP Server create an AWS diagram of a serverless web app"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Diagrams MCP Server
An MCP (Model Context Protocol) server that integrates with the Diagrams project for intelligent cloud service discovery and infrastructure diagram generation.
Features
🔍 Intelligent Service Discovery
Search across all cloud providers (AWS, Azure, GCP, IBM, Alibaba Cloud)
Fuzzy search with typo tolerance and partial matching
Semantic search by purpose ("container orchestration" → EKS, AKS, GKE)
Category filtering (compute, database, network, security, storage)
Alias support for common service names
🎨 Advanced Code Generation
Generate Python diagram code from natural language descriptions
Architecture pattern recognition and templates
Multi-cloud and hybrid architecture support
Best practices integration with security recommendations
Automatic component relationship mapping
🖼️ Enhanced Image Generation
Create actual diagram images from generated code
Support for PNG, SVG, PDF, JPG formats
Advanced clustering and nested diagram support
Interactive diagram builder with step-by-step guidance
Custom styling and layout options
📊 Multi-Type Diagram Support
Infrastructure Diagrams: Traditional cloud architecture diagrams
Sequence Diagrams: API interactions, service communication flows
Flowcharts: Business processes, decision trees, workflows
Class Diagrams: System design, data models, component relationships
Network Diagrams: Connectivity, traffic flow, security boundaries
Data Flow Diagrams: Information processing, ETL pipelines
🔄 Cross-Provider Intelligence
Find equivalent services across cloud providers
Migration assistance with cost implications
Feature comparison between equivalent services
Automated architecture migration between providers
💰 Cost Analysis & Optimization
Real-time cost estimation for architectures
Monthly cost breakdowns by service
Cost optimization recommendations
Budget constraint analysis
Track architecture costs over time
🛡️ Security & Compliance
Architecture security analysis
Compliance checking (SOC2, PCI-DSS, HIPAA, GDPR)
Security vulnerability identification
Best practice recommendations
Organizational policy enforcement
🤖 AI-Powered Features
Intelligent architecture recommendations
Auto-generated technical documentation
Performance optimization suggestions
Failure scenario simulation
Service trend analysis and insights
Related MCP server: cloudwright-mcp
Installation
# Clone the repository
git clone <repository-url>
cd diagrams-mcp
# Install dependencies
uv install
# Install system requirements
pip install diagrams graphvizSystem Dependencies
macOS:
brew install graphvizUbuntu/Debian:
sudo apt-get install graphvizWindows: Download from graphviz.org
Usage
Starting the MCP Server
uv run ./src/diagrams_mcp/server.pyMCP Configuration
Add to your MCP client configuration:
{
"mcpServers": {
"diagrams": {
"command": "uv",
"args": ["run", "./src/diagrams_mcp/server.py"]
}
}
}Available Tools
Core Tools
search_services
Search for cloud services with intelligent matching.
query(string): Search term (e.g., "database", "kubernetes")provider(optional): Filter by provider ("aws", "azure", "gcp", "ibm", "alibabacloud")
generate_diagram_code
Generate Python diagrams code from natural language.
description(string): Architecture descriptionprovider_preference(optional): Preferred cloud providerdiagram_type(optional): Diagram type ("infrastructure", "sequence", "flowchart", "class", "network", "dataflow")
generate_sequence_diagram
Generate sequence diagrams for API interactions and service flows.
description(string): Description of the interaction flowparticipants(optional): List of system participants/actorsformat(optional): Output format (default: "mermaid")
generate_flowchart
Generate flowcharts for business processes and decision flows.
description(string): Process or workflow descriptionprocess_type(optional): Type of process ("business", "technical", "decision")format(optional): Output format ("mermaid", "drawio", "plantuml")
generate_class_diagram
Generate class diagrams for system design and data models.
description(string): System or data model descriptionentities(optional): List of main entities/classesrelationships(optional): Specify relationship types
find_architecture_patterns
Find suitable architecture patterns based on requirements.
requirements(string): System requirements and constraintsconstraints(optional): Additional constraints
Advanced Tools
analyze_architecture
Analyze existing diagram code for optimization opportunities.
diagram_code(string): Python diagrams code to analyzeReturns security issues, cost optimizations, performance suggestions
estimate_architecture_cost
Estimate monthly costs for architecture with detailed breakdown.
diagram_code(string): Python diagrams coderegion(string): Cloud region for pricing (default: "us-east-1")usage_pattern(string): Usage pattern ("low", "medium", "high")
check_compliance
Check architecture against compliance frameworks.
diagram_code(string): Python diagrams codeframework(string): Compliance framework (SOC2, PCI-DSS, HIPAA, GDPR)
get_architecture_recommendations
Get AI-powered architecture recommendations.
requirements(string): Architecture requirementsconstraints(optional): Budget and technical constraints
validate_architecture
Validate architecture for common issues and best practices.
diagram_code(string): Python diagrams codevalidation_type(string): Validation scope (default: "comprehensive")
generate_architecture_documentation
Generate comprehensive documentation from diagrams.
diagram_code(string): Python diagrams codedoc_type(string): Documentation type ("technical", "executive", "deployment")
Examples
Basic Usage
# Search for services
search_services("container orchestration")
# Generate infrastructure diagram
generate_diagram_code(
"Web application with load balancer, auto-scaling servers, and database",
provider_preference="aws",
diagram_type="infrastructure"
)
# Generate sequence diagram
generate_sequence_diagram(
"User logs in, system validates credentials, returns JWT token, user accesses protected resource"
)
# Generate flowchart
generate_flowchart(
"Order processing: receive order, validate payment, check inventory, fulfill order, send confirmation"
)
# Generate class diagram
generate_class_diagram(
"E-commerce system with User, Product, Order, and Payment entities"
)
# Find architecture patterns
find_architecture_patterns("E-commerce platform with high availability")Common Patterns
Infrastructure Diagrams:
"Users access web application through load balancer that distributes traffic to multiple servers connected to a database"Sequence Diagrams:
"API Gateway receives request, authenticates user via Auth service, forwards to Business Logic service, queries Database, returns response"Flowcharts:
"User registration process: collect user data, validate email, check if user exists, create account, send welcome email"Class Diagrams:
"Social media platform with User, Post, Comment, Like entities and their relationships"Project Structure
src/diagrams_mcp/
├── server.py # Main MCP server with all tools
├── service_finder.py # Intelligent service discovery
├── code_generator.py # Advanced diagram generation
├── sequence_generator.py # Sequence diagram generation
├── flowchart_generator.py # Flowchart and process diagrams
├── class_generator.py # Class and entity diagrams
├── pattern_analyze.py # Requirements analysis
├── pattern_engine.py # Pattern matching
├── cost_estimator.py # Cost analysis and optimization
├── compliance_checker.py # Security and compliance
├── ai_recommendations.py # AI-powered suggestions
└── __init__.pyRequirements
Python 3.9+
Diagrams package
Graphviz (for infrastructure diagrams)
Mermaid CLI (for sequence/flowcharts - optional)
PlantUML (for UML diagrams - optional)
MCP compatible client
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
License
MIT License
Acknowledgments
Diagrams - The awesome diagrams-as-code library
Model Context Protocol - For the MCP specification
Available Tools
9 toolsconvert_diagram_formatB
Convert a diagram from one format to another.
Args:
diagram_code: Existing diagram code to convert
from_format: Source format (e.g., "mermaid", "plantuml")
to_format: Target format (e.g., "mermaid", "plantuml", "python_diagrams")
diagram_type: Type of diagram ("sequence", "flowchart", "class")
Returns:
Dictionary with converted diagram code
Inputs: to_format (required), from_format (required), diagram_code (required), diagram_type (required). Returns: result
find_architecture_patternsA
Find suitable architecture patterns based on requirements.
Args:
requirements: Description of what you're building
constraints: Budget, compliance, performance requirements
Returns:
Ranked list of suitable patterns with explanations
Inputs: requirements (required), constraints. Returns: result
generate_class_diagramA
Generate a class diagram from a domain model description.
Args:
description: Natural language description of entities and their relationships
Example: "User has name and email, User creates Orders, Order contains Products"
output_format: Output format - "mermaid", "plantuml", or "python_diagrams" (default: "mermaid")
title: Optional custom title for the class diagram
Returns:
Dictionary with generated class diagram code and metadata
Inputs: description (required), title, output_format. Returns: result
generate_diagramC
Universal diagram generator - automatically creates the appropriate diagram type.
Args:
description: Natural language description of what to diagram
diagram_type: Type of diagram - "sequence", "flowchart", "class", or "architecture"
output_format: Output format (varies by diagram type)
title: Optional custom title
Returns:
Dictionary with generated diagram code and metadata
Inputs: description (required), diagram_type (required), title, output_format. Returns: result
generate_diagram_codeC
Generate Python diagrams code from natural language description
Inputs: description (required), diagram_type, provider_preference. Returns: result
generate_flowchartB
Generate a flowchart from a process description.
Args:
description: Natural language description of a process or workflow
Example: "User places order, check inventory, if available process payment, send confirmation"
output_format: Output format - "mermaid" or "python_diagrams" (default: "mermaid")
title: Optional custom title for the flowchart
Returns:
Dictionary with generated flowchart code and metadata
Inputs: description (required), title, output_format. Returns: result
generate_sequence_diagramA
Generate a sequence diagram from a natural language description.
Args:
description: Natural language description of the interaction flow
Example: "User logs in, system validates credentials, database returns user data"
output_format: Output format - "mermaid", "plantuml", or "python_diagrams" (default: "mermaid")
title: Optional custom title for the diagram
Returns:
Dictionary with generated diagram code and metadata
Inputs: description (required), title, output_format. Returns: result
get_diagram_capabilitiesA
Get information about all supported diagram types and their capabilities.
Returns:
Dictionary with supported diagram types, formats, and usage guidance
Inputs: no named parameters. Returns: result
search_servicesA
Search for cloud services across all providers or within a specific provider.
Args:
query: Search term (e.g., "kubernetes", "database", "storage")
provider: Optional provider filter ("aws", "azure", "gcp", "ibm", "alibabacloud")
Returns:
Dictionary containing matching services with their import paths and descriptions
Inputs: query (required), provider. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
The universal generate_diagram overlaps almost entirely with generate_sequence_diagram, generate_flowchart, and generate_class_diagram, since it can produce all the same diagram types. generate_diagram_code is also confusingly close to generate_diagram, and it's unclear whether it targets architecture diagrams only or is another general entry point. An agent would struggle to decide which generator to call.
All tools use consistent snake_case with clear verb_noun structure (get_diagram_capabilities, search_services, generate_*, find_architecture_patterns, convert_diagram_format). The pattern is predictable and readable throughout.
Nine tools is a reasonable, well-scoped count for a diagramming server. However, the universal generate_diagram plus the three type-specific generators means at least one tool is largely redundant, wasting a slot.
The surface covers discovery (capabilities, services, patterns), generation across multiple diagram types, and format conversion, which is solid lifecycle coverage. Minor gaps exist around editing/refining an existing diagram or validating output, but core workflows are covered.
Maintenance
Related MCP Connectors
Generate cloud architecture diagrams, flowcharts, and sequence diagrams.
Discover cloud shapes and create, inspect, validate, patch, and review architecture diagrams.
Unified API to query AWS, GCP, Azure and generate Terraform/CLI execution kits for AI agents.
Threat modeling, code/cloud/pipeline scanning, shadow-AI discovery, compliance checks and fixes.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables AI assistants to manage multi-cloud resources (AWS, Azure, GCP) including resource operations, cost analysis, monitoring metrics, and security compliance checks through natural language commands.262MIT
- AlicenseAqualityDmaintenanceAI-powered cloud architecture - describe infrastructure in natural language, get Terraform, cost estimates, and compliance reports1933MIT

Synlake MCP Serverofficial
AlicenseAqualityDmaintenanceEnables AI agents to discover, evaluate, and provision cloud infrastructure across AWS, GCP, and Azure with cross-cloud normalization, cost comparisons, and deployable execution kits.56 npmMIT- AlicenseNot gradedqualityDmaintenanceEnables LLMs to model, validate, and analyze multi-cloud infrastructure as a typed graph, with tools for IaC import/export, cost estimation, and architecture review.Apache 2.0