Skip to main content

patentref-mcp

The only free API and MCP tool we know of that returns a US patent's claim tree with element segmentation, antecedent links and character offsets, built by deterministic code, 1976 to now.

patentref-mcp is an MCP server for the PatentRef API (https://patentref.io). Each tool sends one HTTPS request to the public API with the key from its environment and returns the API's JSON as the API sent it.

Run

pip install patentref-mcp
export PATENTREF_API_KEY=...        # a key from https://patentref.io/api/v1/meta/signup/
patentref-mcp                       # stdio, what most MCP clients start
patentref-mcp --http --port 8787    # streamable HTTP at http://127.0.0.1:8787/mcp

Claude Desktop (claude_desktop_config.json):

{"mcpServers": {"patentref": {"command": "patentref-mcp", "env": {"PATENTREF_API_KEY": "..."}}}}

Environment: PATENTREF_API_KEY (sent by every tool but build_facts and search_disclosures), PATENTREF_BASE (default https://patentref.io), PATENTREF_TIMEOUT (seconds, default 30).

Check an install: python -m patentref_mcp.smoke 10000364 starts the server over stdio, lists its tools, makes two tool calls and prints the transcript.

Tools

  • get_claim_tree(patent_id): one patent's claims as a tree, from the claim text as the USPTO published it; every part carries start and end offsets into its claim's text. GET /api/v1/structure/claims/<patent_id>/
  • get_patent_brief(patent_id, max_tokens): one patent in a fixed order, cut to fit max_tokens (300 to 32000, default 2000), each independent claim as its elements with their offsets. GET /api/v1/structure/brief/<patent_id>/
  • check_patent_status(patent_id): the status record of one patent, with its basis, as-of date and data version. GET /api/v1/lapse/status/<patent_id>/
  • search_patents(q, f, s, size, after): the PatentSearch v1 query grammar. GET /api/v1/patent/
  • similar_patents(text, n): the US patents nearest to a title and abstract. GET /api/v1/lapse/similar
  • build_facts(): the data version and as-of date in service. GET /api/v1/meta/
  • search_disclosures(q): public records of the PatentRef registry. GET /registry/search
  • rep_required, fee_schedule, route_windows, pph_routes, ai_use_statement_required, grace_period, rules_changelog, rules_index: rows of patent office rules, each with its source URL and a verbatim quote. GET /api/v1/rules/

An error from the API comes back as the tool's error text: the HTTP status and the API's X-Status-Reason. The server does not retry.

License

MIT, see LICENSE. The data the API returns has its own license and attribution lines: https://patentref.io/LICENSES.md

Metadata

Release files for patentref-mcp 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for patentref-mcp 0.4.0
File Size Uploaded Provenance Actions
patentref_mcp-0.4.0.tar.gz 8.4 kB Without provenance Details for patentref_mcp-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for patentref-mcp 0.4.0
File Interpreter ABI Platform Actions
patentref_mcp-0.4.0-py3-none-any.whl Python 3 none any Details for patentref_mcp-0.4.0-py3-none-any.whl

Total release size: 18.0 kB

Release files / patentref_mcp-0.4.0.tar.gz

Download URL patentref_mcp-0.4.0.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
82fc120042931bdd676ec9982f20469ae082e76d5a5539ceccfcf3e433921e66
BLAKE2b-256 checksum
How to use checksums
c78ebae3301c8051eff67e9c3ecfdb53cc611304e63818a7c5f909844c0f912b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / patentref_mcp-0.4.0-py3-none-any.whl

Download URL patentref_mcp-0.4.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b16ef7ce4ea40254bf1095637a6769073cbb90b7ac2ae573b9acccf6922cf0b
BLAKE2b-256 checksum
How to use checksums
b40b390a7d65bafe02e12841f50212c028c887b0fefc22cd9eadf64d874de861
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for patentref-mcp 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page