Skip to main content

tw-patent-mcp

English

專利檢索 MCP 伺服器,串接經濟部智慧財產局全球專利檢索系統(GPSS)API 與歐洲專利局 Open Patent Services(EPO OPS)。

  • GPSS:一次檢索台灣、美國、日本、歐洲、韓國、中國、WIPO 等 23 個資料庫的書目、摘要與請求項。
  • EPO OPS:全球書目、INPADOC 法律狀態、專利家族、EP 與 WO 全文、歐洲專利註冊簿,以及公報原件 PDF。
  • 伺服器端不呼叫任何語言模型,只做查詢、格式轉換與錯誤防護。

需要自備的憑證

兩組憑證都免費,需由使用者本人申請。本套件不提供共用憑證。

變數 取得方式
GPSS_USER_CODE 至 GPSS API 說明頁 線上申請驗證碼。審核通過後以 Email 寄送,效期 365 日。
EPO_OPS_KEY、EPO_OPS_SECRET 至 EPO Developer Portal 註冊,核准後在 My Apps 建立 app 取得 Consumer Key 與 Secret。

只設定其中一組也可以使用,對應的工具才會運作。

安裝

需要 uv。

Claude Code:

claude mcp add tw-patent \
  -e GPSS_USER_CODE=你的驗證碼 \
  -e EPO_OPS_KEY=你的key \
  -e EPO_OPS_SECRET=你的secret \
  -- uvx tw-patent-mcp

Claude Desktop 的 claude_desktop_config.json:

{
  "mcpServers": {
    "tw-patent": {
      "command": "uvx",
      "args": ["tw-patent-mcp"],
      "env": {
        "GPSS_USER_CODE": "你的驗證碼",
        "EPO_OPS_KEY": "你的key",
        "EPO_OPS_SECRET": "你的secret"
      }
    }
  }
}

不想把憑證寫進設定檔時,可改放在 ~/.config/tw-patent-mcp/.env,格式見 .env.example。

設定

環境變數 說明
GPSS_USER_CODE GPSS API 驗證碼
EPO_OPS_KEY、EPO_OPS_SECRET EPO OPS Consumer Key 與 Secret
TW_PATENT_MCP_HOME 本機狀態資料夾,預設 ~/.tw-patent-mcp
TW_PATENT_MCP_DOWNLOAD_DIR PDF 下載位置,預設 ~/.tw-patent-mcp/downloads
TW_PATENT_MCP_ENV 指定 .env 檔路徑
TW_PATENT_MCP_DRY_RUN 設為 1 時只回傳請求網址,不實際送出

工具

工具 來源 用途
gpss_codes GPSS 列出資料庫、檢索欄位與輸出欄位代碼
gpss_search GPSS 跨 23 個資料庫檢索書目、摘要與請求項
gpss_get GPSS 以公開公告號或申請號取得單筆資料
gpss_build_url GPSS 只組出請求網址,用來檢查檢索條件
ops_search EPO OPS CQL 全球書目檢索
ops_biblio EPO OPS 書目資料,含分類、申請人、引證
ops_legal_status EPO OPS INPADOC 法律狀態
ops_family EPO OPS INPADOC 專利家族
ops_fulltext EPO OPS 請求項、說明書、摘要全文,限 EP、WO 與部分歐洲國家
ops_register EPO OPS 歐洲專利註冊簿
ops_images EPO OPS 列出公報原件、圖式、首頁等影像文件與頁數
ops_download_pdf EPO OPS 逐頁下載公報 PDF,多頁自動合併

專利號照公報寫法輸入即可,例如 TW201644272A、TWI700000B、TWM600000U、US10000000B2、EP1000000。

使用限制與防護

  • GPSS 依上班、下班時段設有輸出筆數上限,超過會回傳提示文字。
  • GPSS 回應驗證碼無效、過期或 IP 被擋時,本套件會寫入鎖檔並停止後續呼叫,避免持續以無效驗證碼查詢而遭封鎖。確認驗證碼可用後,刪除 ~/.tw-patent-mcp/gpss_lock 即可恢復。新核發的驗證碼可能要隔日才生效。
  • EPO OPS 免費額度為每週 4GB,並有每分鐘呼叫次數限制。本套件每次呼叫間隔至少 6 秒。PDF 每頁計一次呼叫,下載前請先用 ops_images 確認頁數。

資料來源與使用責任

  • 資料分別來自經濟部智慧財產局與歐洲專利局,僅供參考,請以各國專利局公告為準。
  • 使用者須自行遵守智慧財產局對 GPSS 及網站資料的相關規定,以及 EPO OPS Terms and Conditions 與 Fair use charter。
  • 本套件與智慧財產局、歐洲專利局無隸屬或背書關係。

開發

uv sync
uv run pytest -q

授權

Elastic License 2.0。本專案為公開原始碼,非開放原始碼授權。

Metadata

Release files for tw-patent-mcp 0.1.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 tw-patent-mcp 0.1.0
File Size Uploaded Provenance
tw_patent_mcp-0.1.0.tar.gz 20.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tw-patent-mcp 0.1.0
File Interpreter ABI Platform
tw_patent_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 39.7 kB

Release files / tw_patent_mcp-0.1.0.tar.gz

Download URL tw_patent_mcp-0.1.0.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e9b26274fadabbf4fe191950ea8daa1b4c5909ec137a2cb3664f1ff78a845e10
BLAKE2b-256 checksum
How to use checksums
8c6f363a0564f872c364fb0eefc396950ff5c565ace7b372f49bb4bdf4506294
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / tw_patent_mcp-0.1.0-py3-none-any.whl

Download URL tw_patent_mcp-0.1.0-py3-none-any.whl
Size 19.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc5ecdca54391604c09caaf2477a3b94bf96a04536867d3d24e968ec900782ee
BLAKE2b-256 checksum
How to use checksums
2720b53c7aba17888b49be7fce7c30ea281b86c6725f3bd08dd9f111655bed17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for tw-patent-mcp 0.1.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tw_patent_mcp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full 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