Metadata-Version: 2.4
Name: deeparchi-patent-mcp
Version: 1.3.2
Summary: Global patent MCP server — search 1.4B patents via BigQuery + Google Patents. MIT. Agent-native.
License-Expression: 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

> **Patent infrastructure for AI agents** — turn 1.4 billion global patents into structured fuel your agent can consume.
>
> [![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/pypi/v/deeparchi-patent-mcp)](https://pypi.org/project/deeparchi-patent-mcp/)

---

## Why Patent MCP

**PatSnap is a patent database for humans. Patent MCP is a patent API for AI agents.**

| | PatSnap | Patent MCP |
|---|---|---|
| 🎯 User | Human in a browser | **AI agent in a workflow** |
| 💰 Cost/year | $5,000 – $500,000 | **$0 (self-hosted), $79/mo (hosted)** |
| 🔌 Integration | Manual Excel export | **MCP-native — Claude Code / Cursor / Hermes** |
| 📊 Output | Web pages + PDF reports | **Structured Pydantic objects, zero-loss consumption** |
| 🏠 Deployment | SaaS only | **Self-hosted or managed** |
| 🔓 License | Proprietary | **MIT open source** |

Patent data is public (Google Patents / BigQuery CC-BY-4.0). The difference isn't the data — it's whether an agent can consume it directly.

---

## Quick Start

```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"
```

Then ask your agent:

> *"Search for Tesla's autonomous driving patents filed in China since 2023."*
> *"Get patent US-7650331-B1 and analyze the claims for novelty."*

---

## Three Tools

| Tool | What It Does | Setup Required? |
|------|-------------|:---:|
| `search_patents` | Search 1.4B patents — keyword, country, CPC, date range | Optional GCP |
| `get_patent` | Full details — classifications, citations (X/Y/A/D), family, inventors | **None** |
| `get_patent_claims` | US patent claims text — legal scope of protection | **None** |

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

> **Note:** CPC classification coverage is incomplete for Chinese (CN) patents. For CN searches, prefer keyword search.

---

## Optional: Enable BigQuery Search

`search_patents` uses Google BigQuery (1 TB/month free tier covers individual use):

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

---

## Product Tiers

```
┌─────────────────────────────────────┐
│  Strategic (Consulting)              │
│  Landscape analysis · M&A diligence  │
│  ¥50k–300k / engagement              │
├─────────────────────────────────────┤
│  Intelligence (Subscription)         │
│  Competitor monitoring · Alerts      │
│  $79–299/mo                          │
├─────────────────────────────────────┤
│  Discovery (Free)                    │
│  Prior art search · Self-check       │
│  Open source MCP                     │
└─────────────────────────────────────┘
```

**Start free. Upgrade when you need monitoring.**

---

## Pricing

Credit-based subscription, inspired by [Firecrawl](https://firecrawl.dev):

| Tier | Price/mo | PQC/mo | For |
|------|---------|--------|-----|
| **Free** | $0 | 50 | Individual inventors (self-hosted) |
| **Pro** | $79 | 2,000 | Small teams |
| **Business** | $299 | 10,000 | Enterprise IP departments |
| **Enterprise** | Custom | Custom | Private deployment · White-label |

> 💡 **Self-hosting is always free.** The hosted tier charges for infrastructure, not data access. Patent data is public.

[Full pricing design →](docs/pricing-design.md)

---

## Architecture

```
┌──────────────┐     ┌─────────────────────────────┐
│  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** — ~1.5s, free, no credentials
- **BigQuery search** — 1.4B records, CN full-text, optional
- **Smart fallback** — `get_patent` tries web first, auto-falls back to BigQuery

---

## Development

```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 — patent data belongs to humanity. Tools should too.

## Author

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