Metadata-Version: 2.4
Name: deeparchi-patent-mcp
Version: 1.3.0
Summary: Global patent MCP server — search 1.4B patents via BigQuery + Google Patents. MIT. Agent-native.
License: MIT
Project-URL: Homepage, https://github.com/deeparchi-ai/patent-mcp-server
Project-URL: Repository, https://github.com/deeparchi-ai/patent-mcp-server
Project-URL: Issues, https://github.com/deeparchi-ai/patent-mcp-server/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp>=1.0.0
Requires-Dist: google-cloud-bigquery>=3.0.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: requests>=2.28.0
Requires-Dist: starlette>=0.37.0
Requires-Dist: uvicorn>=0.30.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.24.0; extra == "dev"
Requires-Dist: ruff>=0.4.0; extra == "dev"
Requires-Dist: mypy>=1.10.0; extra == "dev"
Dynamic: license-file

# Patent MCP Server

> **AI Agent 的专利基础设施** — 将全球 2 亿条专利变成你的 AI Agent 可消费的燃料。
>
> [![Tests](https://github.com/deeparchi-ai/patent-mcp-server/actions/workflows/ci.yml/badge.svg)](https://github.com/deeparchi-ai/patent-mcp-server/actions)
> [![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/)
> [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
> [![MCP](https://img.shields.io/badge/MCP-compatible-purple)](https://modelcontextprotocol.io/)
> [![PyPI](https://img.shields.io/badge/pypi-soon-orange)]()

---

## 为什么是 Patent MCP

**PatSnap 是给人用的专利数据库。Patent MCP 是给 AI Agent 用的。**

| | PatSnap（智慧芽） | Patent MCP |
|---|---|---|
| 🎯 用户 | 人在浏览器搜专利 | **AI Agent 在工作流中查专利** |
| 💰 年费 | $5,000 – $500,000 | **$0 起步（开源），$79/月（托管）** |
| 🔌 集成 | 手动导出 Excel | **MCP 原生 — Claude Code / Cursor / Hermes 直接消费** |
| 📊 输出 | 网页 + PDF 报告 | **结构化 Pydantic 对象，Agent 零损耗消费** |
| 🏠 部署 | SaaS only | **自部署（数据不出你的 GCP）或托管版** |
| 🔓 代码 | 闭源 | **MIT 开源** |

专利数据已经公开（Google Patents / BigQuery CC-BY-4.0）。差异不在数据本身，在于 **Agent 能不能直接消费**。

---

## 30 秒开始

```bash
pip install deeparchi-patent-mcp
```

### Claude Desktop

```json
{
  "mcpServers": {
    "patent-mcp": {
      "command": "python",
      "args": ["-m", "src.server"]
    }
  }
}
```

### Hermes Agent / Cursor / Windsurf

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

然后问你的 Agent：

> *"查一下 Tesla 最近两年在中国申请了哪些自动驾驶专利。"*
> *"Get patent US-7650331-B1 and analyze the claims for novelty."*

---

## 三个工具

| Tool | 做什么 | 需要配置？ |
|------|--------|:---:|
| `search_patents` | 搜索全球 1.4B 专利 — 关键词/国家/CPC/日期 | 可选 GCP |
| `get_patent` | 获取专利详情 — 分类/引用/发明人/专利权人/同族 | **不需要** |
| `get_patent_claims` | 获取美国专利权利要求文本 — 法律保护范围 | **不需要** |

后两个覆盖 80% 场景。零成本。零配置。

---

## 可选：启用 BigQuery 搜索

`search_patents` 需要 Google BigQuery（1TB/月免费配额覆盖个人使用）：

```bash
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/key.json"
export GCP_PROJECT_ID="your-project-id"
```

---

## 产品层次

```
┌─────────────────────────────────────┐
│  导航（战略层）                        │
│  技术路线 · 空白区发现 · M&A 尽调       │
│  ¥5-30万/项目                         │
├─────────────────────────────────────┤
│  情报（运营层）                        │
│  竞品监控 · 新授权预警 · 技术动态        │
│  $79-299/月 订阅                      │
├─────────────────────────────────────┤
│  预研（项目层）                        │
│  发明查新 · 交底书自检                  │
│  免费（开源 MCP）                      │
└─────────────────────────────────────┘
```

**从免费开始。需要时升级。**

---

## 收费模式

对标 [Firecrawl](https://firecrawl.dev) 的 Credit 订阅制：

| 层级 | 价格/月 | PQC/月 | 适用 |
|------|---------|--------|------|
| **Free** | $0 | 50 | 个人发明人自部署 |
| **Pro** | $79 | 2,000 | 中小团队专利检索+监控 |
| **Business** | $299 | 10,000 | 企业IP部门 |
| **Enterprise** | 议价 | 自定义 | 私有部署 · 白标 · 定制数据源 |

> 💡 **自部署永远免费。** 托管版收的是基础设施和运维的钱，不是数据访问的钱。数据是公开的。

[查看完整定价方案 →](docs/pricing-design.md)

---

## 对比 PatSnap：为什么要做这个

**专利信息产业有 $90M ARR 的 PatSnap，还有数百万用 Google Patents 凑合的非消费者。**

Patent MCP 做的是 PatSnap **不会也不能**做的品类：

- PatSnap 的商业模式 = SaaS UI + 深度数据 + 企业销售 → **不允许做轻量 Agent 接入层**（会自毁 ARPU）
- Patent MCP = MCP 协议 + 结构化输出 + 开源自部署 → **Agent 原生专利基础设施**

这不是"更便宜的 PatSnap" — 这是**不同的品类**。

[查看完整颠覆分析 →](docs/disruption-analysis.md)

---

## 架构

```
┌──────────────┐     ┌─────────────────────────────┐
│  AI Agent    │────▶│  patent-mcp-server          │
│  (Claude,    │     │  (你的机器上运行)              │
│   Cursor,    │     │                             │
│   Hermes)    │     │  ┌──────────┐ ┌───────────┐ │
│              │     │  │ Web      │ │ BigQuery  │ │
│              │     │  │ Scraper  │ │ Client    │ │
│              │     │  │ (免费)    │ │ (可选)     │ │
│              │     │  └────┬─────┘ └─────┬─────┘ │
│              │     │       │             │       │
│              │     │  Google Patents   BigQuery  │
│              │     │  公开网页          1.4B 条    │
└──────────────┘     └─────────────────────────────┘
```

- **Web 抓取** — ~1.5s，免费，无需凭证
- **BigQuery 搜索** — 1.4B 条记录，CN 全文，可选
- **智能回退** — `get_patent` 先走 Web，失败自动切 BigQuery

---

## 开发

```bash
git clone https://github.com/deeparchi-ai/patent-mcp-server.git
cd patent-mcp-server
pip install -e ".[dev]"

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

---

## License

MIT — 专利数据属于全人类。工具也应该是。

## Author

[DeepArchi OPC](https://github.com/deeparchi-ai) — AI agent infrastructure for enterprise architecture.
