PatentRef for agents
An agent can get a claim tree, a brief, a status record, a search over US grants, the patents nearest to a text, rows of patent office rules and the build facts of the data it is reading, each answer stamped with X-Data-Version. Nothing PatentRef returns is a legal conclusion; every answer describes the text as printed.
Registry: io.github.patentref/patentref-mcp (listed 2026-11-05) · PyPI patentref-mcp 0.4.0 · MIT · a local stdio package, no hosted endpoint
Install
Claude Desktop
pip install patentref-mcp
# claude_desktop_config.json
{"mcpServers": {"patentref": {"command": "patentref-mcp", "env": {"PATENTREF_API_KEY": "..."}}}}Claude Code
pip install patentref-mcp
claude mcp add patentref -e PATENTREF_API_KEY=... -- patentref-mcpCursor
pip install patentref-mcp
# .cursor/mcp.json
{"mcpServers": {"patentref": {"command": "patentref-mcp", "env": {"PATENTREF_API_KEY": "..."}}}}Generic stdio
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/mcpCheck an install: python -m patentref_mcp.smoke 10000364 starts the server over stdio, lists its tools, makes two tool calls and prints the transcript. 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).
Tools
| Tool | Endpoint | Description |
|---|---|---|
| get_claim_tree(patent_id) | GET /api/v1/structure/claims/<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_patent_brief(patent_id, max_tokens) | GET /api/v1/structure/brief/<patent_id>/ | 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 |
| check_patent_status(patent_id) | GET /api/v1/lapse/status/<patent_id>/ | the status record of one patent, with its basis, as-of date and data version |
| search_patents(q, f, s, size, after) | GET /api/v1/patent/ | the PatentSearch v1 query grammar |
| similar_patents(text, n) | GET /api/v1/lapse/similar | the US patents nearest to a title and abstract |
| build_facts() | GET /api/v1/meta/ | the data version and as-of date in service |
| search_disclosures(q) | GET /registry/search | public records of the PatentRef registry |
| rep_required, fee_schedule, route_windows, pph_routes, ai_use_statement_required, grace_period, rules_changelog, rules_index | GET /api/v1/rules/ | rows of patent office rules, each with its source URL and a verbatim quote |
Tool names, endpoints and descriptions as the patentref-mcp 0.4.0 README on PyPI prints them. 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. 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.
Next: for each patent, the problem it states and the parts it names, each quoted with its place in the text, and linked to other patents that name the same parts. Not live yet. If your agent would use it, tell us at hello@patentref.io.
Key rule and limits
Every data request carries X-Api-Key; without it the API answers 403. A free key allows 1,000 requests a month and 45 a minute. Identify a scripted client in its User-Agent with a name and a way to reach you, so the operator can contact a runaway client.
Machine-readable
Data version 20261110.1, as of 2026-11-10; text data version 20261110.1; claim trees by structure version 2. Build facts: /api/v1/meta/. What changed: /changes.txt.
Every page and every answer describes the text as the USPTO printed it. A status, a flag or a category is a fact about the record with its basis and its as-of date, not legal advice.