claude-patent-creator
π‘ Summary
A dual-mode system for creating and analyzing USPTO patents with automated tools and workflows.
π― Target Audience
π€ AI Roast: βPowerful, but the setup might scare off the impatient.β
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
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:
- Installs Python package dependencies
- Detects hardware (NVIDIA GPU/Apple Silicon/CPU)
- Uninstalls CPU-only PyTorch if GPU detected
- Installs correct PyTorch (CUDA 12.8/MPS/CPU)
- Restarts setup with GPU-enabled PyTorch
- Downloads MPEP PDFs (500MB) from USPTO
- Builds hybrid index with GPU acceleration
- 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 frameworksentence-transformers>=5.1.2- Embeddingsfaiss-cpu>=1.12.0- Vector searchnumpy>=1.26.0,<2.0.0- Array operations (CRITICAL: <2.0 for FAISS compatibility)rank-bm25>=0.2.2- Lexical searchgoogle-cloud-bigquery>=3.38.0- Patent searchpydantic>=2.10.0- Validationgraphviz>=0.21- Diagram generationPyMuPDF>=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 filtersget_mpep_section- Retrieve full section content
Patent Search Tools (7)
check_bigquery_status- Verify BigQuery configurationsearch_patents_bigquery- Search 76M+ patentsget_patent_bigquery- Get full patent detailssearch_patents_by_cpc_bigquery- Search by CPC classificationsearch_uspto_api- USPTO API searchget_uspto_patent- Get USPTO patent detailsget_recent_uspto_patents- Recent filings
Analysis Tools (3)
review_patent_claims- 35 USC 112(b) compliancereview_specification- 35 USC 112(a) adequacycheck_formalities- MPEP 608 compliance
Diagram Tools (2)
render_diagram- Generate patent diagramsget_diagram_templates- List available templates
Prior Art Tools (1)
search_prior_art- Automated prior art discovery
System Tools (5)
get_index_stats- Index statisticscheck_diagram_tools_status- Graphviz statuscheck_patent_corpus_status- Corpus availabilitycheck_uspto_api_status- API connectivityget_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
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β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β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β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.
