Skip to main content
Glama
Patent MCP Server

Patent MCP Server

by deeparchi-ai

Patent MCP Server

🚀 中国专利最准确的开源 MCP。 Give your AI agent the ability to read CN patents with real accuracy — plus global coverage.

Tests Python License MCP PyPI

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.


Related MCP server: Forage MCP Server

30-Second Install

pip install deeparchi-patent-mcp

Or from source:

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

Quick Start

After pip install, the deeparchi-patent-mcp console script is on your PATH. Add this to your agent platform's MCP config:

Claude Desktop

{
  "mcpServers": {
    "patent-mcp": {
      "command": "deeparchi-patent-mcp",
      "args": []
    }
  }
}

Cursor / Windsurf / Cline

Same config as Claude Desktop above.

Hermes Agent

mcp_servers:
  patent-mcp:
    command: "deeparchi-patent-mcp"

BigQuery is optional. Without GCP_PROJECT_ID the server starts normally and the web-backed tools work with no credentials. BigQuery-backed tools return a message explaining how to enable them. To turn them on, add an env var:

{
  "mcpServers": {
    "patent-mcp": {
      "command": "deeparchi-patent-mcp",
      "args": [],
      "env": { "GCP_PROJECT_ID": "your-gcp-project" }
    }
  }
}

Running from a source checkout

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

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

Patent claims text — legal scope. Supports US, CN, and most countries via Google Patents

No

search_patents

Search 1.4B patents by keyword, CPC, assignee, country, date range

Optional GCP

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

CN Patent Search (v1.7.0)

Three-layer discovery for Chinese patents:

Layer

Backend

Cost

When

1. BigQuery

Google Patents Public Data

Free tier

cpc=H01L + country=CN

2. Firecrawl

Web search fallback

4 credits/query

BigQuery cost-rejects specific CPC (e.g. H01L25/065)

3. Google Patents

Detail enrichment via proxy

Free

All patent detail lookups

  • Keyword search works: query="芯片" + country=CN searches both English AND Chinese abstracts (v1.5.2 fix).

  • Assignee filter: assignee="BOE" + country=CN → company/city-level patent landscape.

  • CPC classification: Use parent CPC classes (H01L) for broader CN coverage; specific CPC codes (H01L25/065) trigger web fallback.

  • See SEARCH_GUIDE.md for detailed search strategy and tested CPC codes.


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.


How It Works

┌──────────────┐     ┌───────────────────────────────────────┐
│  AI Agent    │────▶│  patent-mcp-server                    │
│  (Claude,    │     │  (runs on YOUR machine)               │
│   Cursor,    │     │                                       │
│   Hermes)    │     │  search_patents:                      │
│              │     │    ┌──────────┐    ┌───────────────┐  │
│              │     │    │ BigQuery │───▶│ Firecrawl     │  │
│              │     │    │ (primary)│    │ (CN fallback) │  │
│              │     │    └──────────┘    └───────┬───────┘  │
│              │     │                           │           │
│              │     │  get_patent / get_patent_claims:      │
│              │     │    ┌──────────────────────┐           │
│              │     │    │ Google Patents (web) │           │
│              │     │    │ → BigQuery fallback  │           │
│              │     │    └──────────────────────┘           │
└──────────────┘     └───────────────────────────────────────┘
  • Web scraping for details — fast (~1.5s), free, no credentials

  • BigQuery for search — 1.4B records, CN full-text, optional

  • Firecrawl for CN fallback — kicks in when BigQuery cost-rejects specific CPC queries

  • Smart fallback — every tool tries web first, auto-falls to BigQuery if you have it


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_patents(assignee="TSMC", country="CN")
search_patents(query="芯片", country="CN")          # keyword search (CN: searches both EN+ZH)

Search 1.4B patents by keyword, CPC classification, assignee, country, date range. For CN patents, keyword search scans both English and Chinese abstracts.

Cost control: Queries require at least one filter (cpc/country/assignee/after). A dry-run budget guard rejects queries over 50 GB. When BigQuery rejects a CN CPC query (e.g., H01L25/065 → 256 GB), the web fallback automatically searches via Firecrawl.

See SEARCH_GUIDE.md for best practices and docs/cn-cpc-correction-table.md for tested CPC codes.


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.

Available Tools

11 tools
batch_get_cited_byA

Get cited-by counts and lists for multiple patents in a single call. Returns list of {publication_number, cited_by_count, cited_by_patents, cited_by_url}. Max 10 patents per call.

Inputs: publication_numbers (required).

batch_get_patentsA

Get full details for multiple patents in a single call. Much faster than calling get_patent N times separately. Returns list of PatentDetail objects. Max 20 patents per call.

Inputs: publication_numbers (required).

bidirectional_citation_graphA

Build full bidirectional citation graph for a company's core patents. Searches for company's patents on Google Patents, then fetches forward and backward citations for each. If competitor_keywords provided, also runs competitor citation matrix. Returns: patents list, forward_graph, backward_graph, competitor_matrix.

Inputs: assignee_name (required), limit, competitor_keywords.

company_summaryA

Get a quick patent portfolio summary for a company. Input a company name (Chinese or English), returns total patent count, top technology areas, jurisdiction coverage, activity level, and risk assessment. Zero BigQuery cost — scrapes Google Patents directly. Best for: initial company screening, competitor overview, due diligence triage. Typical latency: 5-10s.

Inputs: company_name (required).

competitor_citation_matrixA

Check if a set of target patents are cited by competitors. Searches each patent's cited-by list and matches citing assignees against competitor keywords (case-insensitive substring). Returns matrix: {patent: [{citing_patent, title, assignee, matched_keyword}]} and summary counts.

Inputs: competitor_keywords (required), publication_numbers (required).

get_cited_byB

Get backward citations (who cites this patent). Returns cited_by_count (int) and cited_by_patents (list of {publication_number, title, assignee}). Extracted from Google Patents HTML.

Inputs: publication_number (required).

get_patentA

Get full patent details by publication number (DOCDB format). Returns classifications, citations, family ID, dates, inventors, assignees. Citations include X/Y/A/D markers for prior art analysis. X=relevant if taken alone, Y=relevant if combined.

Inputs: publication_number (required).

get_patent_claimsA

Get patent claims text by publication number. Claims define the legal scope of patent protection. Supports US, CN, and most other countries via Google Patents.

Inputs: publication_number (required).

get_patent_familyA

Get patent family members for a patent. Finds family_id from BigQuery, then returns ALL patents sharing that family_id (same invention filed in different countries). Returns family_id, member_count, and members list with publication_number, country_code, kind_code, filing_date, grant_date, title for each.

Inputs: publication_number (required).

search_patentsA

Search global patents by keyword, country, CPC classification, or date range. At least one of country, cpc, or after must be provided to control query cost. Returns patent summaries with titles, abstracts, inventors, assignees, and CPC codes. CN patents include Chinese titles and abstracts.

Inputs: cpc, after, limit, query, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 11 tools

    Disambiguation4/5

    Most tools target distinct resources/actions (claims, legal status, family, search, details). However get_cited_by, batch_get_cited_by, bidirectional_citation_graph, and competitor_citation_matrix all center on citation data, which could cause some misselection, though descriptions clarify single vs batch vs graph vs competitor scope.

    Naming Consistency4/5

    A dominant verb_noun pattern (get_patent, search_patents, get_patent_claims, get_legal_status, get_patent_family, get_cited_by) with a consistent batch_ prefix is clear. A few noun-phrase outliers (bidirectional_citation_graph, competitor_citation_matrix, company_summary) lack verbs but remain readable.

    Tool Count5/5

    11 tools is well-scoped for a patent analysis server, with each tool earning its place across details, claims, legal status, family, citations, search, batch variants, and company screening.

    Completeness4/5

    Strong coverage of the patent lifecycle: details, claims, legal status, family, citations, search, and portfolio summary. Minor gaps exist (e.g. no direct assignee/inventor patent listing or full description/figures retrieval), but core workflows are covered.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      MCP server for the AI Patent Search Generator — 11 tools for patent intelligence: dossier (claims, citations, family, classifications, examiner stats), prosecution (USPTO file wrappers), oa_analyze (AI Office Action analysis), search/query (Google Patents multi-strategy), similar, citations, family, examiner, cpc, balance. Install: npx -y patent-search-mcp-server
      11
      65 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP tool server that gives any AI agent the ability to search, scrape, and analyze content across the internet.
      42
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      An MCP server that enables AI agents to generate, search, and reason over knowledge graphs from code, databases, docs, and open-data portals without requiring an LLM or API key.
      2
      Apache 2.0