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 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-patent-diagrams

v1.1.0

Published

MCP server for generating patent-quality technical diagrams using multiple backends (Mermaid, Graphviz, PlantUML, SVG)

Readme

mcp-patent-diagrams

npm version License: MIT

An MCP (Model Context Protocol) server for generating patent-quality technical diagrams. Supports multiple rendering backends: Mermaid, Graphviz DOT, PlantUML, and pure SVG primitives.

Features

  • Multiple Backends: Automatically selects the best diagram backend based on figure description
  • Patent-Quality Output: Monochrome, clean lines, consistent fonts, reference numeral support
  • Deterministic: No external web services, reproducible outputs
  • Graceful Degradation: Returns DSL/spec even when renderers are unavailable
  • Works with Claude Code: Designed for AI-assisted patent drafting workflows

Installation

From NPM

npm install -g mcp-patent-diagrams

From Source

git clone <repository-url>
cd mcp-patent-diagrams
npm install
npm run build

Quick Start

Configure with Claude Code

Add to your Claude Code MCP configuration (~/.claude/claude_desktop_config.json or similar):

{
  "mcpServers": {
    "patent-diagrams": {
      "command": "npx",
      "args": ["mcp-patent-diagrams"]
    }
  }
}

Or if installed globally:

{
  "mcpServers": {
    "patent-diagrams": {
      "command": "mcp-patent-diagrams"
    }
  }
}

Usage

Once configured, Claude Code can generate patent diagrams with commands like:

Generate a block diagram for FIG. 1 showing a neural network accelerator
with input buffer (100), compute array (110), weight memory (120),
and output buffer (130).

Standalone Usage

# Run directly
npx mcp-patent-diagrams

# Or if installed globally
mcp-patent-diagrams

Development

npm run dev       # Start with tsx (hot reload)
npm run build     # Build TypeScript
npm run start     # Run built version
npm run typecheck # Type check without building

Tools

The server exposes four tools:

1. diagram_choose_backend

Analyzes a figure description and recommends the optimal rendering backend.

Input:

  • figure_description (required): Natural language description of the diagram
  • preferred_backend (optional): Hint for preferred backend
  • constraints (optional): Additional constraints

Output:

  • Recommended backend with rationale and confidence score

2. diagram_plan_from_description

Generates a complete diagram specification from a natural language description.

Input:

  • figure_description (required): Description of the diagram
  • reference_numerals (optional): Map of element names to reference numbers
  • style (optional): Style overrides

Output:

  • Complete DiagramSpec with DSL and render plan

3. diagram_render

Renders a diagram specification to SVG/PNG/PDF.

Input:

  • spec (required): DiagramSpec or raw DSL string
  • backend (optional): Backend override
  • output_formats (optional): Array of formats (svg, png, pdf)
  • output_dir (optional): Output directory

Output:

  • Paths to generated artifacts

4. diagram_pack_bundle

Packages multiple rendered figures into a structured bundle.

Input:

  • figures (required): Array of figure metadata
  • cover_sheet (optional): Cover sheet settings
  • output_dir (optional): Bundle output directory

Output:

  • Bundle directory path with index

Backend Selection Heuristics

| Figure Type | Primary Backend | Fallback | |-------------|----------------|----------| | Cross-section, layer stack | SVG Primitives | PlantUML | | Flowchart, workflow, method | Mermaid | DOT | | Block diagram, architecture | DOT | Mermaid | | Timing diagram | Mermaid sequence | SVG Primitives | | Network schematic | DOT | PlantUML |

Dependencies

Required

  • Node.js 18+

Optional (for rendering)

  • mmdc (mermaid-cli) for Mermaid diagrams
  • dot (Graphviz) for DOT diagrams
  • plantuml CLI or JAR for PlantUML diagrams

If a renderer is not installed, the server will:

  1. Return the DSL/spec for external rendering
  2. Provide clear installation instructions

Patent Drawing Guidelines

  • Monochrome: Black lines on white background
  • Reference Numerals: Format as "Element Name (100)"
  • Consistent Style: Same font and stroke width throughout
  • Clear Labels: Legible at standard patent figure sizes
  • No Gradients: Solid fills only

Documentation

License

MIT