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-publisher

v1.0.5

Published

MCP server for publishing patent documents to USPTO-compliant DOCX and PDF formats

Downloads

497

Readme

MCP Patent Publisher

An MCP (Model Context Protocol) server for publishing patent documents to USPTO-compliant DOCX and PDF formats.

Overview

This MCP server is the final publishing stage of a multi-agent patent drafting pipeline. It takes clean patent markdown and produces professionally formatted documents ready for USPTO submission.

Features

  • ✅ USPTO-compliant DOCX generation using official template
  • ✅ Matching PDF generation with proper formatting
  • ✅ SVG to PNG figure conversion (300 DPI)
  • ✅ Automatic section parsing and formatting
  • ✅ Numbered claims with proper indentation
  • ✅ Centered page numbering
  • ✅ Graceful error handling with warnings
  • ✅ Completely offline operation

Installation

From npm

npm install -g mcp-patent-publisher

From source

git clone https://github.com/your-org/mcp-patent-publisher.git
cd mcp-patent-publisher
npm install
npm run build

Python Dependencies

cd python
pip install -r requirements.txt

Quick Start

Add to Claude Code

Add to your ~/.claude/claude_desktop_config.json:

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

Or if installed globally:

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

Basic Usage

User: Publish the patent at /patents/my_invention.md

Claude: I'll use patent_publish_bundle to generate DOCX and PDF outputs.

[Uses patent_publish_bundle tool]

Done! Generated:
- /patents/patent_abc123.docx
- /patents/patent_abc123.pdf

Tools

patent_publish_plan

Analyzes markdown and creates a publishing plan.

{
  "run_id": "patent_2024_001",
  "patent_markdown_path": "/path/to/patent.md",
  "figures_manifest_path": "/path/to/figures.json"
}

patent_render_docx

Generates USPTO-compliant DOCX document.

{
  "run_id": "patent_2024_001",
  "patent_markdown_path": "/path/to/patent.md"
}

patent_render_pdf

Generates USPTO-styled PDF document.

{
  "run_id": "patent_2024_001",
  "patent_markdown_path": "/path/to/patent.md"
}

patent_publish_bundle

Complete workflow - plan, convert figures, render all outputs.

{
  "run_id": "patent_2024_001",
  "patent_markdown_path": "/path/to/patent.md",
  "render_docx": true,
  "render_pdf": true
}

Markdown Format

Your patent markdown should include these sections:

# TITLE

Your Patent Title

## TECHNICAL FIELD

Technical field description...

## BACKGROUND

Background information...

## SUMMARY

Summary of the invention...

## BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a...
FIG. 2 shows...

## DETAILED DESCRIPTION

Detailed description with FIG. references...

## CLAIMS

1. A method comprising...
2. The method of claim 1...

## ABSTRACT

Abstract text (150 words max)...

USPTO Formatting

Documents are formatted per USPTO requirements:

| Property | Value | |----------|-------| | Page Size | 8.5" x 11" (Letter) | | Left Margin | 1.0" | | Right Margin | 0.75" | | Top/Bottom Margins | 0.75" | | Font | Times New Roman, 12pt | | Line Spacing | 1.5 | | Page Numbers | Centered footer |

Figure Handling

Automatic Discovery

Figures are discovered from:

patent/ir/runs/{run_id}/drawings/patent_figures_{run_id}/

Manifest File

Or provide a manifest:

{
  "figures": [
    {
      "number": 1,
      "label": "FIG. 1",
      "svg_path": "/path/to/fig1.svg",
      "caption": "System overview"
    }
  ]
}

SVG Conversion

SVG files are converted to PNG using (in order):

  1. cairosvg (Python library)
  2. Inkscape (CLI)
  3. rsvg-convert (CLI)

Development

# Install dependencies
npm install

# Run in development mode
npm run dev

# Build for production
npm run build

# Type checking
npm run typecheck

Requirements

  • Node.js 18+
  • Python 3.8+
  • Python packages: python-docx, reportlab, cairosvg
  • Optional: Inkscape or librsvg for SVG fallback conversion

Documentation

License

MIT