Co-Pilot / 辅助式
更新于 25 days ago

claude-patent-creator

RRobThePCGuy
0.0k
robthepcguy/claude-patent-creator
80
Agent 评分

💡 摘要

一个双模式系统,用于创建和分析USPTO专利,配备自动化工具和工作流程。

🎯 适合人群

专利律师寻求专利保护的发明者知识产权法律专业人士技术与创新研究人员学习专利法的学生

🤖 AI 吐槽:看起来很能打,但别让配置把人劝退。

安全分析中风险

风险:Medium。建议检查:是否执行 shell/命令行指令;是否发起外网请求(SSRF/数据外发);API Key/Token 的获取、存储与泄露风险;文件读写范围与路径穿越风险;依赖锁定与供应链风险。以最小权限运行,并在生产环境启用前审计代码与依赖。

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
五维分析
清晰度8/10
创新性8/10
实用性9/10
完整性8/10
可维护性7/10
优缺点分析

优点

  • 全面的专利分析工具
  • 高效的自动化工作流程
  • 访问庞大的专利数据库
  • 灵活的双模式架构

缺点

  • 仍在开发中
  • 可能存在稳定性问题
  • 需要大量系统资源
  • 复杂的安装过程

相关技能

pytorch

S
toolCode Lib / 代码库
92/ 100

“它是深度学习的瑞士军刀,但祝你好运能从47种安装方法里找到那个不会搞崩你系统的那一个。”

agno

S
toolCode Lib / 代码库
90/ 100

“它承诺成为智能体领域的Kubernetes,但得看开发者有没有耐心学习又一个编排层。”

nuxt-skills

S
toolCo-Pilot / 辅助式
90/ 100

“这本质上是一份组织良好的小抄,能把你的 AI 助手变成一只 Nuxt 框架的复读机。”

免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。

版权归原作者所有 RobThePCGuy.