Co-Pilot
Updated 24 days ago

claude-patent-creator

RRobThePCGuy
0.0k
robthepcguy/claude-patent-creator
80
Agent Score

πŸ’‘ Summary

A dual-mode system for creating and analyzing USPTO patents with automated tools and workflows.

🎯 Target Audience

Patent attorneysInventors seeking patent protectionLegal professionals in intellectual propertyResearchers in technology and innovationStudents studying patent law

πŸ€– AI Roast: β€œPowerful, but the setup might scare off the impatient.”

Security AnalysisMedium Risk

Risk: Medium. Review: shell/CLI command execution; outbound network access (SSRF, data egress); API keys/tokens handling and storage; filesystem read/write scope and path traversal; dependency pinning and supply-chain risk. Run with least privilege and audit before enabling in production.

Claude Patent Creator

MIT License Python 3.9+ MCP Server PyTorch

USPTO patent creation and analysis system with dual-mode architecture: MCP server for programmatic access + Claude Code plugin with skills, autonomous agents, and slash commands. Features hybrid RAG search (FAISS+BM25+reranking) over MPEP/USC/CFR, BigQuery access to 76M+ patents, automated compliance checking, prior art search, and diagram generation.

Project Status

This project is a work in progress and is not fully functional.

Contributions, issues, and pull requests are welcome. Feel free to explore, experiment, or build upon the code. No guarantees of stability or completeness are provided.


Features

Dual-Mode Architecture

| Mode | Use Case | Components | Access Method | |------|----------|------------|---------------| | MCP Server | Programmatic API access | 20 MCP tools | Any MCP client (Claude Code, Claude Desktop, etc.) | | Claude Code Plugin | Interactive workflows | 15 skills + 10 agents + slash commands + hooks | Claude Code IDE |

Core Capabilities

Search & Retrieval (20 MCP Tools)

  • MPEP/USC/CFR Search - Hybrid RAG (FAISS vector + BM25 lexical + cross-encoder reranking) across 500MB of USPTO regulations
  • Patent Search - BigQuery access to 76M+ worldwide patents with full-text search and CPC classification
  • USPTO API Integration - Real-time patent data retrieval and recent filings
  • Prior Art Discovery - Automated novelty and freedom-to-operate analysis

Automated Analysis

  • Claims Review - 35 USC 112(b) compliance: definiteness, antecedent basis, indefinite terms, claim structure
  • Specification Review - 35 USC 112(a) adequacy: written description, enablement, best mode
  • Formalities Check - MPEP 608 compliance: abstract length, title format, drawings, required sections

Content Generation

  • Diagram Generator - Patent-style technical diagrams using Graphviz (block diagrams, flowcharts, system architectures)
  • Patent Creation - Guided workflow for drafting complete USPTO-ready applications

Claude Code Plugin Features

  • 15 Skills - Specialized expertise modules (setup, development, index management, troubleshooting, testing, patent review, search, diagrams, prior art)
  • 10 Autonomous Agents - Long-running workflows (patent-creator, prior-art-searcher, mpep-expert, patent-drafter, etc.)
  • Slash Commands - Quick-access workflows (/create-patent, /search-prior-art, /review-claims, /full-review, etc.)
  • Hooks System - Custom event-driven automation

Technology Stack

Architecture:
  FastMCP (MCP Server Framework)
  +-- 20 MCP Tools (search, analysis, generation)
  +-- Claude Code Plugin (skills, agents, commands, hooks)

RAG Pipeline:
  FAISS Vector Search (BGE-base-en-v1.5, 768-dim embeddings)
  + BM25 Lexical Search (rank-bm25)
  + Cross-Encoder Reranking (MS-MARCO MiniLM-L-6-v2)
  + HyDE Query Expansion (optional, API-based)

Data Sources:
  - MPEP (Manual of Patent Examining Procedure)
  - 35 USC (Patent Statutes)
  - 37 CFR (Patent Regulations)
  - Subsequent Publications (USPTO updates)
  - BigQuery patents-public-data (76M+ patents)

ML Stack:
  PyTorch 2.9+ (CUDA 12.8 for GPU acceleration)
  Sentence Transformers 5.1+
  HuggingFace Transformers 4.57+
  FAISS 1.12+ (CPU/GPU)

Validation & Monitoring:
  Pydantic v2 (type safety + input validation)
  Structured logging (JSON/human formats)
  Performance tracking (@track_performance)
  Health check system

Installation

Option 1: One-Line Install (Recommended)

# Installs package, detects GPU, downloads MPEP, builds index, registers MCP server pip install git+https://github.com/RobThePCGuy/Claude-Patent-Creator.git && patent-creator setup # Restart Claude Code after completion

What happens automatically:

  1. Installs Python package dependencies
  2. Detects hardware (NVIDIA GPU/Apple Silicon/CPU)
  3. Uninstalls CPU-only PyTorch if GPU detected
  4. Installs correct PyTorch (CUDA 12.8/MPS/CPU)
  5. Restarts setup with GPU-enabled PyTorch
  6. Downloads MPEP PDFs (500MB) from USPTO
  7. Builds hybrid index with GPU acceleration
  8. Registers MCP server with Claude Code

Option 2: Manual Installation

# Clone repository git clone https://github.com/RobThePCGuy/Claude-Patent-Creator.git cd Claude-Patent-Creator # Optional: Create virtual environment python -m venv venv source venv/bin/activate # Linux/macOS venv\Scripts\activate # Windows # Install package pip install -e . # Run setup wizard patent-creator setup

Option 3: Claude Code Plugin (Standalone Mode)

# In Claude Code /plugin marketplace add C:\Users\<YOUR_USER>\Desktop\Projects /plugin install claude-patent-creator-standalone # Run setup command /setup-patent-system

Quick Start

Using MCP Tools

# Search MPEP for claim definiteness requirements search_mpep("claim definiteness 35 USC 112(b)", top_k=5) # Search 76M+ patents for prior art search_patents_bigquery("neural network training", limit=10) # Analyze claims for compliance review_patent_claims(claims_text) # Generate patent diagram render_diagram("block", components, connections)

Using Claude Code Skills

Skills activate automatically based on your task:

  • "Install the system" β†’ setup-assistant skill
  • "Search for patents about AI" β†’ patent-search skill
  • "Review my claims for compliance" β†’ patent-reviewer skill
  • "Find MPEP section on enablement" β†’ mpep-search skill
  • "Build the index" β†’ index-manager skill
  • "Something is broken" β†’ troubleshooting-assistant skill

Using Slash Commands

/create-patent          # Complete patent creation workflow (55-80 min)
/search-prior-art       # Prior art search with novelty analysis
/review-claims          # Claims-only 35 USC 112(b) analysis
/review-specification   # Specification-only 35 USC 112(a) analysis
/review-formalities     # MPEP 608 formalities check
/full-review            # Parallel review (claims + spec + formalities)

Using Autonomous Agents

# Long-running workflows that work independently
"Create a patent for my invention, use the patent-creator agent"
"Conduct prior art search for my invention, use the prior-art-searcher agent"

CLI Commands

# System health check patent-creator health # Rebuild MPEP index patent-creator rebuild-index # Verify MCP configuration patent-creator verify-config # Check BigQuery authentication patent-creator check-bigquery # Download MPEP PDFs only patent-creator download-mpep # Download all sources (MPEP + 35 USC + 37 CFR) patent-creator download-all

Requirements

Minimum

  • Python: 3.9 - 3.13 (3.14 experimental)
  • RAM: 8GB
  • Disk: 2GB (MPEP PDFs + index)

Optional (Recommended)

  • GPU: NVIDIA GPU with CUDA 12.8 (5-10x faster indexing and search)
  • Google Cloud: Project with BigQuery enabled (for patent search)
  • Graphviz: System package (for diagram generation)

Python Dependencies

  • mcp>=1.21.0 - MCP server framework
  • sentence-transformers>=5.1.2 - Embeddings
  • faiss-cpu>=1.12.0 - Vector search
  • numpy>=1.26.0,<2.0.0 - Array operations (CRITICAL: <2.0 for FAISS compatibility)
  • rank-bm25>=0.2.2 - Lexical search
  • google-cloud-bigquery>=3.38.0 - Patent search
  • pydantic>=2.10.0 - Validation
  • graphviz>=0.21 - Diagram generation
  • PyMuPDF>=1.26.0 - PDF processing

See pyproject.toml for complete dependency list.


MCP Tools Reference

MPEP Search Tools (2)

  • search_mpep - Hybrid RAG search with filters
  • get_mpep_section - Retrieve full section content

Patent Search Tools (7)

  • check_bigquery_status - Verify BigQuery configuration
  • search_patents_bigquery - Search 76M+ patents
  • get_patent_bigquery - Get full patent details
  • search_patents_by_cpc_bigquery - Search by CPC classification
  • search_uspto_api - USPTO API search
  • get_uspto_patent - Get USPTO patent details
  • get_recent_uspto_patents - Recent filings

Analysis Tools (3)

  • review_patent_claims - 35 USC 112(b) compliance
  • review_specification - 35 USC 112(a) adequacy
  • check_formalities - MPEP 608 compliance

Diagram Tools (2)

  • render_diagram - Generate patent diagrams
  • get_diagram_templates - List available templates

Prior Art Tools (1)

  • search_prior_art - Automated prior art discovery

System Tools (5)

  • get_index_stats - Index statistics
  • check_diagram_tools_status - Graphviz status
  • check_patent_corpus_status - Corpus availability
  • check_uspto_api_status - API connectivity
  • get_patent_details - Combined patent retrieval

Configuration

Environment Variables

Create .env file in the project root:

# Required for BigQuery patent search GOOGLE_CLOUD_PROJECT=your-project-id # Optional API keys (for HyDE query expansion) ANTHROPIC_API_KEY=sk-ant-... OPENAI_API_KEY=sk-... # Optional settings PATENT_LOG_LEVEL=INFO # Logging verbosity PATENT_LOG_FORMAT=human # Log format (json/human) PATENT_ENABLE_METRICS=true # Performance tracking PATENT_MPEP_USE_HYDE=false # HyDE query expansion PATENT_MPEP_DEVICE=gpu # Device (gpu/cpu) PATENT_OPERATION_TIMEOUT=300 # Timeout (seconds) # Windows only (for Git Bash) CLAUDE_CODE_GIT_BASH_PATH=C:\dev\Git\bin\bash.exe

BigQuery Setup (Optional)

# Install Google Cloud SDK # https://cloud.google.com/sdk/docs/install # Authenticate gcloud auth application-default login # Set project export GOOGLE_CLOUD_PROJECT=your-project-id # Te
5-Dim Analysis
Clarity8/10
Novelty8/10
Utility9/10
Completeness8/10
Maintainability7/10
Pros & Cons

Pros

  • Comprehensive patent analysis tools
  • Automated workflows for efficiency
  • Access to a vast patent database
  • Dual-mode architecture for flexibility

Cons

  • Still a work in progress
  • Potential stability issues
  • Requires significant system resources
  • Complex setup process

Related Skills

pytorch

S
toolCode Lib
92/ 100

β€œIt's the Swiss Army knife of deep learning, but good luck figuring out which of the 47 installation methods is the one that won't break your system.”

agno

S
toolCode Lib
90/ 100

β€œIt promises to be the Kubernetes for agents, but let's see if developers have the patience to learn yet another orchestration layer.”

nuxt-skills

S
toolCo-Pilot
90/ 100

β€œIt's essentially a well-organized cheat sheet that turns your AI assistant into a Nuxt framework parrot.”

Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.

Copyright belongs to the original author RobThePCGuy.