patent_mcp_server

riemannzeta/patent_mcp_server

3.5

If you are the rightful owner of patent_mcp_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The USPTO Patent MCP Server is a FastMCP server designed to access United States Patent and Trademark Office (USPTO) patent and patent application data through the Patent Public Search API and the Open Data Portal (ODP) API.

Tools
20
Resources
0
Prompts
0

USPTO Patent MCP Server

A FastMCP server for accessing United States Patent and Trademark Office (USPTO) patent and patent application data through multiple APIs including the Patent Public Search API, the Open Data Portal (ODP) API, PTAB API v3, PatentsView API, Office Action APIs, and Patent Litigation APIs. Using this server, Claude Desktop can pull data from USPTO APIs, search through PTAB proceedings and decisions, analyze patent litigation, research prosecution history, and more:

Screen Capture of Claude Desktop using Patents MCP Server

For an introduction to MCP servers see Introducing the Model Context Protocol.

Special thanks to Parker Hancock, author of the amazing Patent Client project, for blazing the trail to understanding of the string of requests and responses needed to pull data through the Public Search API.

Features

This server provides 51 tools across 6 USPTO data sources for:

  1. Patent Search - Full-text search of granted patents and published applications via PPUBS and PatentsView
  2. Full Text Documents - Get complete text of patents including claims, description, and specification
  3. PDF Downloads - Download patents as PDF files (Claude Desktop doesn't support this as a client currently)
  4. Prosecution History - Access office actions, transactions, and file wrapper data
  5. PTAB Proceedings - Search and retrieve Patent Trial and Appeal Board proceedings (IPR, PGR, CBM), decisions, and appeals
  6. Office Actions - Access full-text office actions, citations, and rejection data
  7. Patent Litigation - Search 74,000+ district court patent cases
  8. Citation Analysis - Get enriched citation data and metrics
  9. Patent Family Data - Continuity information, foreign priority, and related applications
  10. Inventor/Assignee Search - Disambiguated inventor and assignee data via PatentsView

API Sources

This server interacts with six USPTO patent data sources:

SourceDescriptionAuth Required
ppubs.uspto.govFull text documents, PDF downloads, advanced search (daily updates)No
api.uspto.gov (ODP)Metadata, continuity, transactions, assignments, prosecution historyYes (USPTO API Key)
PTAB API v3IPR/PGR/CBM proceedings, decisions, appeals, interferencesYes (USPTO API Key)
PatentsView APIDisambiguated inventor/assignee data, advanced searchYes (PatentsView Key)
Office Action APIsFull-text office actions, citations, rejections (12-series apps, June 2018+)Yes (USPTO API Key)
Patent Litigation API74,000+ district court patent casesYes (USPTO API Key)

Prerequisites

  • Python 3.10-3.13 (3.12 recommended)
  • Claude Desktop (for integration). Other models and MCP clients have not been tested.
  • UV for Python version and dependency management

If you're a Python developer but still unfamiliar with uv, you're in for a treat. It's faster and easier than having a separate Python version manager (like pyenv) and setting up, activating, and maintaining virtual environments with venv and pip.

If you don't already have uv installed:

curl -LsSf https://astral.sh/uv/install.sh | sh

Installation

  1. Clone this repository:

    git clone https://github.com/riemannzeta/patent_mcp_server
    cd patent_mcp_server
    
  2. Install dependencies with uv:

    uv sync
    
  3. Verify installation:

    uv run patent-mcp-server
    

    Should output:

    INFO     Starting USPTO Patent MCP server with stdio transport
    

API Key Setup

USPTO API Key (Required for most tools)

To use the api.uspto.gov tools (ODP, PTAB, Office Actions, Litigation), you need an Open Data Portal API key:

  1. Visit USPTO's Getting Started page and follow the instructions to request an API key.

  2. Create a .env file in the patent_mcp_server directory:

    USPTO_API_KEY=your_actual_key_here
    

    Note: The PPUBS tools will work without this API key.

PatentsView API Key (Optional)

For advanced search with disambiguated inventor/assignee data:

  1. Request an API key at PatentsView Support

  2. Add to your .env file:

    PATENTSVIEW_API_KEY=your_patentsview_key
    

Configuration

The server can be configured using environment variables in your .env file. All settings are optional with sensible defaults:

# API Keys
USPTO_API_KEY=your_key_here
PATENTSVIEW_API_KEY=your_patentsview_key  # Optional

# Logging
LOG_LEVEL=INFO  # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL

# HTTP Settings
REQUEST_TIMEOUT=30.0  # Request timeout in seconds
MAX_RETRIES=3         # Maximum number of retry attempts
RETRY_MIN_WAIT=2      # Minimum wait time between retries (seconds)
RETRY_MAX_WAIT=10     # Maximum wait time between retries (seconds)

# Session Management
SESSION_EXPIRY_MINUTES=30  # How long to cache ppubs sessions
ENABLE_CACHING=true        # Enable/disable session caching

# API Endpoints (usually don't need to change)
PPUBS_BASE_URL=https://ppubs.uspto.gov
API_BASE_URL=https://api.uspto.gov
PATENTSVIEW_BASE_URL=https://search.patentsview.org
OFFICE_ACTION_BASE_URL=https://developer.uspto.gov

Claude Desktop Configuration

To integrate this MCP server with Claude Desktop:

  1. Update your Claude Desktop configuration file (claude_desktop_config.json):

    {
      "mcpServers": {
        "patents": {
          "command": "uv",
          "args": [
            "--directory",
            "/Users/username/patent_mcp_server",
            "run",
            "patent-mcp-server"
          ]
        }
      }
    }
    

    You can find claude_desktop_config.json on a Mac by opening the Claude Desktop app, opening Settings (from the Claude menu or by Command + ' on the keyboard), clicking "Developer" in the sidebar, and "Edit Config."

  2. Replace /Users/username/patent_mcp_server with the actual path to your patent_mcp_server directory.

When integrated with Claude Desktop, the server will be automatically started when needed and doesn't need to be run separately.

Claude Code Configuration

To integrate this mCP server with Claude Code for a particular project, from the project root:

claude mcp add-json patents '{"command": "uv", "args": ["--directory", "/Users/michael.frank.martin/patent_mcp_server", "run", "patent-mcp-server"]}'

If you're already running Claude Code, you'll have to /exit and restart. Then /mcp to verify that it's configured.

Available Tools

Utility Tools

ToolDescription
check_api_statusCheck status of all USPTO APIs
get_cpc_infoGet CPC classification information
get_status_codeLook up USPTO status code meaning

Patent Public Search (ppubs.uspto.gov)

ToolDescription
ppubs_search_patentsSearch granted patents (full-text, daily updates)
ppubs_search_applicationsSearch published patent applications
ppubs_get_full_documentGet full patent document by GUID
ppubs_get_patent_by_numberGet patent's full text by number
ppubs_download_patent_pdfDownload patent as PDF

Open Data Portal (api.uspto.gov)

ToolDescription
odp_get_applicationGet basic application data
odp_search_applicationsSearch applications with filters
odp_get_application_metadataGet comprehensive metadata
odp_get_continuityGet patent family/continuity data
odp_get_assignmentGet ownership/assignment records
odp_get_adjustmentGet patent term adjustment data
odp_get_attorneyGet attorney/agent of record
odp_get_foreign_priorityGet foreign priority claims
odp_get_transactionsGet prosecution transaction history
odp_get_documentsGet file wrapper documents
odp_search_datasetsSearch bulk data products
odp_get_datasetGet dataset product details

PTAB API v3 (Patent Trial and Appeal Board)

ToolDescription
ptab_search_proceedingsSearch IPR/PGR/CBM proceedings
ptab_get_proceedingGet proceeding details
ptab_get_documentsGet documents filed in proceeding
ptab_search_decisionsSearch trial decisions
ptab_get_decisionGet decision details
ptab_search_appealsSearch ex parte appeals
ptab_get_appealGet appeal decision details

PatentsView API

ToolDescription
patentsview_search_patentsFull-text search with disambiguation
patentsview_get_patentGet detailed patent info
patentsview_search_assigneesSearch disambiguated assignees
patentsview_get_assigneeGet assignee details
patentsview_search_inventorsSearch disambiguated inventors
patentsview_get_inventorGet inventor details
patentsview_search_attorneysSearch patent attorneys/agents
patentsview_get_attorneyGet attorney details
patentsview_get_claimsGet patent claims text
patentsview_get_descriptionGet patent description
patentsview_search_by_cpcSearch by CPC classification
patentsview_lookup_cpcLook up CPC code info
patentsview_search_by_ipcSearch by IPC classification
patentsview_lookup_ipcLook up IPC code info

Office Action APIs

ToolDescription
get_office_action_textGet full-text office actions
search_office_actionsSearch office actions
get_office_action_citationsGet citations from office actions
get_office_action_rejectionsGet rejection data

Citation & Litigation APIs

ToolDescription
get_enriched_citationsGet forward/backward citations
search_citationsSearch citation records
get_citation_metricsGet citation metrics
search_litigationSearch 74,000+ patent cases
get_litigation_caseGet case details
get_patent_litigationGet litigation for a patent
get_party_litigationGet party litigation history

Resources and Prompts

The server also provides MCP Resources (accessible via @ mentions):

  • patents://cpc/{code} - CPC classification information
  • patents://status-codes - USPTO status code definitions
  • patents://sources - Data source information
  • patents://search-syntax - Query syntax guide

And MCP Prompts (workflow templates):

  • prior_art_search - Comprehensive prior art search guide
  • patent_validity - Patent validity analysis workflow
  • competitor_portfolio - Competitor portfolio analysis
  • ptab_research - PTAB proceeding research guide
  • freedom_to_operate - FTO analysis workflow
  • patent_landscape - Technology landscape mapping

Testing

The project includes comprehensive test suites:

# Run unit tests (default - skips integration tests)
uv run pytest

# Run with verbose output
uv run pytest -v

# Run integration tests (requires network access)
uv run pytest -m integration

# Run all tests including integration
uv run pytest -m ""

# Run with coverage report
uv run pytest --cov=patent_mcp_server

Test results are stored in /test/test_results/.

Development

To install development dependencies:

uv sync --dev

Version History

v0.6.1 (Current)

  • Added PatentsView attorney search tools (patentsview_search_attorneys, patentsview_get_attorney)
  • Added PatentsView IPC classification tools (patentsview_lookup_ipc, patentsview_search_by_ipc)
  • Fixed bug in search_publications method (pagination options not being passed)
  • Added new PatentsView API endpoints (attorney, IPC, pregrant publication text, citations)
  • Updated README with complete tool documentation

v0.6.0

  • PyPI release preparation

v0.5.0

  • Focused on USPTO-only data sources
  • Renamed ODP tools with odp_ prefix for clarity
  • Improved function signatures (using query instead of q)
  • Enhanced test organization with proper integration test markers
  • Updated validation with Pydantic models

v0.3.0

  • Added 33 new tools (PTAB, PatentsView, Office Actions, Citations, Litigation)
  • Rate limiting support for PatentsView API
  • Comprehensive async client architecture

v0.2.2

  • Centralized configuration with environment variables
  • Standardized error handling
  • Input validation with Pydantic
  • Retry logic with exponential backoff
  • Session caching for PPUBS

License

MIT