Skip to main content

Patent MCP Server

๐Ÿš€ ไธญๅ›ฝไธ“ๅˆฉๆœ€ๅ‡†็กฎ็š„ๅผ€ๆบ MCPใ€‚ Give your AI agent the ability to read CN patents with real accuracy โ€” plus global coverage.

โš ๏ธ Honest disclosure: Global coverage is a stretch goal. What's real today: CN patents with CPC-aware search, US/WO patent details and claims, and a public CPC correction table (see docs/cn-cpc-correction-table.md) that Google and PatSnap don't publish.

Tests Python License MCP

An MCP (Model Context Protocol) server that gives AI agents access to patent data โ€” CN patents with CPC-aware correction, plus US/WO global coverage. Runs locally on your machine. No external API, no subscription. Always MIT.


Why Self-Deployed

  • It's just Python. Install it, your agent uses it. No server to maintain, no credential to share.
  • No API key for 80% of use cases. Patent details and claims come straight from Google Patents public pages.
  • Your data stays local. Nothing leaves your machine except the same HTTP requests a browser would make.
  • BigQuery search is optional. Only turn it on if you need full-text search across 1.4B records.

30-Second Install

git clone https://github.com/deeparchi-ai/patent-mcp-server.git
cd patent-mcp-server
pip install -e .

Quick Start

Pick your agent platform and add this to its MCP config:

Claude Desktop

{
  "mcpServers": {
    "patent-mcp": {
      "command": "python",
      "args": ["-m", "src.server"],
      "cwd": "/path/to/patent-mcp-server"
    }
  }
}

Cursor / Windsurf / Cline

Same config as Claude Desktop above.

Hermes Agent

mcp_servers:
  patent-mcp:
    command: "python"
    args: ["-m", "src.server"]
    workdir: "/path/to/patent-mcp-server"

Any MCP Client (via mcp.json)

mcp-get install deeparchi-ai/patent-mcp-server

Now ask your agent:

"Get patent US-7650331-B1 and summarize the claims."


What's Included

Tool What It Does Needs Setup?
get_patent Full patent details: classifications, citations (X/Y/A/D), inventors, assignees, family No
get_patent_claims US patent claims text โ€” the legal scope of protection No
search_patents Search 1.4B patents by keyword, country, CPC, date range Optional GCP

The first two cover 80% of use cases. Zero cost. Zero setup.


Optional: Enable BigQuery Search

If you need search_patents, add a GCP project:

  1. Create a GCP project with BigQuery enabled
  2. Create a service account, download JSON key
  3. Set env vars:
    export GOOGLE_APPLICATION_CREDENTIALS="/path/to/key.json"
    export GCP_PROJECT_ID="your-project-id"
    
  4. Copy the wrapper template and fill in your paths:
    cp run.sh.example run.sh
    # Edit run.sh โ†’ set your GCP paths
    

BigQuery free tier: 1 TB/month โ€” individual use is essentially free.


Advanced: Team Server (HTTP/SSE)

Need multiple people to share one patent-mcp instance? Start it as an HTTP server:

cp run-http.sh.example run-http.sh
# Edit โ†’ set GCP creds (skip if only using web tools)
PORT=8090 ./run-http.sh

Team members connect with:

mcp_servers:
  patent-mcp:
    url: "http://<server-ip>:8090/sse"

A systemd service template is included for production deployment.


Tools Reference

get_patent

get_patent(publication_number="US-7650331-B1")

Returns: classifications, citations (X/Y/A/D prior art markers), family ID, dates, inventors, assignees. Cites prior art markers so your agent can assess novelty at a glance.

CN patent note: Google Patents web scraping provides machine-translated English data for CN patents. CPC codes from web scraping are empty (JS-rendered). For CPC, use BigQuery path.

get_patent_claims

get_patent_claims(publication_number="US-7650331-B1")

Returns: full claims text. Supports US, CN (machine-translated English), and most countries via Google Patents web scraping.

search_patents

search_patents(cpc="G06N", country="CN", after="2023-01-01", limit=5)

Search 1.4B patents. โš ๏ธ Important for CN: use CPC class codes (e.g., G06N), not keywords. CN keyword search is unreliable due to BigQuery CN text indexing gaps. See docs/cn-cpc-correction-table.md for tested CPC codes and known deviations.


How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  AI Agent    โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚  patent-mcp-server          โ”‚
โ”‚  (Claude,    โ”‚     โ”‚  (runs on YOUR machine)     โ”‚
โ”‚   Cursor,    โ”‚     โ”‚                             โ”‚
โ”‚   Hermes)    โ”‚     โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚              โ”‚     โ”‚  โ”‚ Web      โ”‚ โ”‚ BigQuery  โ”‚ โ”‚
โ”‚              โ”‚     โ”‚  โ”‚ Scraper  โ”‚ โ”‚ Client    โ”‚ โ”‚
โ”‚              โ”‚     โ”‚  โ”‚ (free)   โ”‚ โ”‚ (optional)โ”‚ โ”‚
โ”‚              โ”‚     โ”‚  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚              โ”‚     โ”‚       โ”‚             โ”‚       โ”‚
โ”‚              โ”‚     โ”‚  Google Patents   BigQuery  โ”‚
โ”‚              โ”‚     โ”‚  Public Pages     1.4B rows โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  • Web scraping for details โ€” fast (~1.5s), free, no credentials
  • BigQuery for search โ€” 1.4B records, CN full-text, optional
  • Smart fallback โ€” get_patent tries web first, auto-falls to BigQuery if you have it

Development

pip install -e ".[dev]"

pytest tests/ -v          # 32 tests, ~1.5s
ruff check src/ tests/    # lint
mypy src/                 # type check

License

MIT โ€” see LICENSE.


Author

DeepArchi OPC โ€” AI agent infrastructure for enterprise architecture.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deeparchi_patent_mcp-1.7.0.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deeparchi_patent_mcp-1.7.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file deeparchi_patent_mcp-1.7.0.tar.gz.

File metadata

  • Download URL: deeparchi_patent_mcp-1.7.0.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for deeparchi_patent_mcp-1.7.0.tar.gz
Algorithm Hash digest
SHA256 afbfab2d019d859ee217c3237ec3b14f01e3ed7b7fb63884b22ba5c7e14d1679
MD5 f6ae8288af577bae9261036aff813c1e
BLAKE2b-256 c71dd2c2561a8bc25a473dcb2ebf3dd1855fd55a3c6913b02c9195a2640a8475

See more details on using hashes here.

File details

Details for the file deeparchi_patent_mcp-1.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for deeparchi_patent_mcp-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2f41dcda97f008ee759a70fdd6e2f9214b268cf063d55056f4dfea513c54b81
MD5 3c868dace6833a00850737bd11d87c84
BLAKE2b-256 c71ad17bdedafaed6043977d7450c5752c029353f354d10fd78103ef90e1a88e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page