npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@brainstack/plantuml-mcp

v1.0.6

Published

PlantUML Model Context Protocol (MCP) server for generating UML diagrams

Downloads

40

Readme

@brainstack/plantuml-mcp

npm version License: MIT

A Model Context Protocol (MCP) server for generating UML diagrams using PlantUML. This package enables AI assistants to create professional diagrams from text descriptions through the MCP standard.

Features

  • Easy Diagram Generation: Create UML diagrams from PlantUML code
  • Multiple Output Formats: Generate diagrams in PNG, SVG, or text formats
  • Automatic Branding: Adds a customized footer to all diagrams
  • MCP Standard: Compatible with the Model Context Protocol for AI tools
  • Dark Theme Support: Works well with dark-themed diagrams

Installation

Using npm

npm install @brainstack/plantuml-mcp

Using the pre-configured scripts

  1. Clone the repository:

    git clone https://github.com/mouimet-infinisoft/augment-code-mcp.git
    cd augment-code-mcp/plantuml-mcp
  2. Make the run script executable:

    chmod +x config/run-plantuml-mcp.sh
  3. Run the MCP server:

    ./config/run-plantuml-mcp.sh

Configuration

Environment Variables

Create a .env file in your project root with these options:

# Optional: Custom PlantUML server URL
PLANTUML_SERVER_URL=https://www.plantuml.com/plantuml

Configuration Files

The package includes pre-configured files in the config directory:

  • mcp-config-plantuml.json: MCP server configuration
  • run-plantuml-mcp.sh: Script to run the server
  • mcp-config-plantuml-wsl.json: Configuration for WSL environments

Custom Server Configuration

If you're using the package programmatically, you can configure the server:

const { createServer, startServer } = require('@brainstack/plantuml-mcp');

// Create a server with custom PlantUML URL
const server = createServer({
  plantUmlServerUrl: 'https://your-custom-plantuml-server.com'
});

// Start the server
startServer(server);

Usage with Augment Code

  1. Install the Augment Code extension for VSCode
  2. Run the PlantUML MCP server using the provided script
  3. Configure Augment Code to use this MCP server:
    • Open VSCode settings
    • Search for "Augment Code MCP"
    • Add the PlantUML MCP server configuration
  4. Generate diagrams using natural language in VSCode

Usage with WSL 2 (Windows)

For Windows users with WSL 2:

  1. Use the WSL-specific configuration file:

    cp config/mcp-config-plantuml-wsl.json config/mcp-config-plantuml.json
  2. Run the server from your WSL environment:

    ./config/run-plantuml-mcp.sh
  3. Configure Augment Code to connect to the WSL endpoint

Diagram Examples

Class Diagram

@startuml
!theme spacelab
skinparam backgroundColor #333333
skinparam classFontColor #FFFFFF

class Car {
  +String make
  +String model
  +int year
  +start()
  +stop()
}
class Driver {
  +String name
  +String licenseNumber
  +drive(Car car)
}
Driver -- Car : drives >
@enduml

Sequence Diagram

@startuml
!theme spacelab
skinparam backgroundColor #333333
skinparam sequenceParticipantFontColor #FFFFFF

participant User
participant System
participant Database

User -> System: Login request
System -> Database: Validate credentials
Database --> System: Authentication result
System --> User: Login response
@enduml

Entity Relationship Diagram

@startuml
!theme spacelab
skinparam backgroundColor #333333
skinparam entityFontColor #FFFFFF

entity "Customer" as customer {
  * id : number <<PK>>
  --
  * name : text
  * email : text
  created_at : datetime
}

entity "Order" as order {
  * id : number <<PK>>
  --
  * customer_id : number <<FK>>
  * amount : decimal
  status : text
  created_at : datetime
}

customer ||--o{ order : places
@enduml

API Reference

MCP Tool: generateDiagram

This MCP server provides a single tool for generating diagrams:

| Parameter | Type | Description | Default | |-----------|------|-------------|---------| | plantUmlCode | string | The PlantUML code to generate a diagram from | (required) | | format | string | The format of the diagram: 'png', 'svg', or 'txt' | 'png' |

Response:

{
  "url": "https://www.plantuml.com/plantuml/png/...",
  "format": "png"
}

Styling Recommendations

For best results with dark-themed diagrams:

  1. Add the spacelab theme:

    !theme spacelab
  2. Set a dark background:

    skinparam backgroundColor #333333
  3. Use light text colors:

    skinparam classFontColor #FFFFFF
    skinparam entityFontColor #FFFFFF
    skinparam sequenceParticipantFontColor #FFFFFF
  4. Add accent colors for arrows and borders:

    skinparam arrowColor #4285F4
    skinparam classBorderColor #666666

Footer Annotation

All diagrams generated with this MCP server automatically include a footer annotation:

Generated by @brainstack/plantuml-mcp | [current date and time]

This footer is styled with a blue highlight for the package name and a lighter gray for the timestamp.

Resources

License

MIT © Martin Ouimet