# Google Patent Cli

> An AI-ready search and fetch tool for Google Patents, designed for both humans and AI agents

- **Type:** MCP server
- **Install:** `agentstack add mcp-sonesuke-google-patent-cli`
- **Verified:** Pending review
- **Seller:** [sonesuke](https://agentstack.voostack.com/s/sonesuke)
- **Installs:** 0
- **Category:** [Search](https://agentstack.voostack.com/c/search)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [sonesuke](https://github.com/sonesuke)
- **Source:** https://github.com/sonesuke/google-patent-cli
- **Website:** https://sonesuke.github.io/google-patent-cli/

## Install

```sh
agentstack add mcp-sonesuke-google-patent-cli
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Google Patent CLI - AI-ready
 
An AI-ready search and fetch tool for Google Patents, designed for both humans and AI agents. It extracts structured data including title, abstract, filing date, assignee, description paragraphs, claims, and images.
 
## Features
- **Search patents** by free-text query, assignee, country, and date.
- **Fetch patent details** by patent number (e.g., "US10000000").
- **Formatted JSON output** including `description_paragraphs` and `claims`.
- **Pagination support** via `--limit` option.
- **Date filtering** with `--before` and `--after`.
- **Country filtering** with `--country` (e.g., JP, US, CN).
- **Language/locale support** with `--language` (e.g., ja, en).
- **Raw HTML output** with `--raw` flag for debugging.
- **Headless mode** by default; use `--head` to show the browser.
- **Model Context Protocol (MCP)** support to integrate with AI agents.
- **Robust formatting**: Uses structured JSON for easy machine consumption.
 
## Installation
 
### Easy Install (Recommended)
 
**Linux & macOS:**
```bash
curl -fsSL https://raw.githubusercontent.com/sonesuke/google-patent-cli/main/install.sh | bash
```
> Note: On Linux, this installs to `~/.local/bin` without requiring `sudo`. Make sure `~/.local/bin` is in your `PATH`.
 
**Windows (PowerShell):**
```powershell
irm https://raw.githubusercontent.com/sonesuke/google-patent-cli/main/install.ps1 | iex
```
 
### From Source (Cargo)
If you have Rust installed, you can build from source:
```bash
cargo install --path .
```
 
## Model Context Protocol (MCP)
 
`google-patent-cli` supports the [Model Context Protocol](https://modelcontextprotocol.io/), allowing AI agents (like Claude Desktop) to search and fetch patents directly.
 
### Available Tools
 
| Tool Name | Description | Parameters |
|---|---|---|
| `search_patents` | Search Google Patents matching a query, assignee, and date filters. | `query`, `assignee`, `limit`, `before`, `after`, `country`, `language` |
| `fetch_patent` | Fetch details (metadata, description, claims) of a specific patent. | `patent_id` (required, e.g., "US9152718B2"), `language`, `raw` |
| `execute_cypher` | Execute a Cypher query on a loaded patent dataset. | `dataset` (required), `query` (required) |

### Usage
To start the MCP server over `stdio`:
```bash
google-patent-cli mcp
```
 
### Configuration for Claude Desktop
 
Add this to your `claude_desktop_config.json`:
 
```json
{
  "mcpServers": {
    "google-patent-cli": {
      "command": "/path/to/google-patent-cli",
      "args": ["mcp"]
    }
  }
}
```

## Claude Code Plugin

`google-patent-cli` is also available as a [Claude Code Plugin](https://github.com/anthropics/claude-code/tree/main/docs/plugins.md) from the marketplace.

### Installation

Install the plugin using the Claude Code CLI:

```bash
claude plugin marketplace add sonesuke/google-patent-cli
```

### Available Skills

| Skill | Description |
|---|---|
| `patent-search` | Search and analyze patents from Google Patents. Supports keyword search, assignee filtering, country filtering, date range filtering, and fetching patent details. |
| `patent-analysis` | Analyze patent search results using Cypher queries on datasets loaded by the patent-search skill. |

### Usage

Once installed, you can use the skills directly in Claude Code:

```bash
# Search for patents
/patent-search action:search query:"machine learning" limit:10

# Fetch patent details
/patent-search action:fetch patent_id:"US9152718B2"

# Analyze search results
/patent-analysis dataset:"search-abc123" analysis_type:count_by_assignee
```

## CLI Usage
 
### CLI Commands
 
| Command | Description | Example |
|---|---|---|
| `search` | Search for patents matching a query/assignee. | `google-patent-cli search --query "machine learning" --limit 10` |
| `fetch` | Fetch a single patent's metadata and data. | `google-patent-cli fetch US9152718B2` |
| `config` | Manage configuration settings. | `google-patent-cli config --set-browser "/path/to/chrome"` |
| `mcp` | Start the MCP server over stdio. | `google-patent-cli mcp` |
 
### Search by query
Search for patents matching a query.
```bash
google-patent-cli search --query "machine learning" --limit 10
```
 
### Filter by assignee
```bash
google-patent-cli search --query "AI" --assignee "Google"
```
 
### Filter by date and country
```bash
# Patents filed after 2024-01-01 in Japan
google-patent-cli search --query "camera" --after "2024-01-01" --country JP
 
# Patents filed between 2023-01-01 and 2023-12-31
google-patent-cli search --query "blockchain" --after "2023-01-01" --before "2023-12-31"
```
 
### Fetch patent details
Fetch a single patent's metadata, description, and claims.
```bash
google-patent-cli fetch US9152718B2
```
 
### Language/locale support
Fetch or search using a specific language locale.
```bash
google-patent-cli fetch US9152718B2 --language ja
```
 
### Output raw HTML (debug)
Prints the full HTML source instead of structured JSON.
```bash
google-patent-cli fetch US9152718B2 --raw > patent.html
```
 
### Show the browser window
Useful for debugging.
```bash
google-patent-cli search --query "AI" --head
```
 
## Configuration
This tool relies on a compatible Chrome/Chromium installation for scraping.
 
### Manage Configuration
You can manage the configuration via CLI:
 
```bash
# Show current configuration and config file path
google-patent-cli config
 
# Set custom browser path
google-patent-cli config --set-browser "/path/to/chrome"
```

### Configuration File

The configuration file is located at:
- **Linux/macOS**: `~/.config/google-patent-cli/config.toml`
- **Windows**: `%APPDATA%\google-patent-cli\config.toml`

You can manually edit the TOML file to configure additional Chrome arguments:

```toml
# Path to Chrome/Chromium executable
browser_path = "/usr/bin/google-chrome"

# Additional Chrome arguments (useful for Docker/CI environments)
chrome_args = [
    "--no-sandbox",
    "--disable-setuid-sandbox"
]
```

### Docker/DevContainer Environment

When running in Docker containers or devcontainers, Chrome requires additional flags to work properly. You can configure these flags via `chrome_args` in your config file:

```toml
chrome_args = [
    "--no-sandbox",
    "--disable-setuid-sandbox",
    "--disable-gpu"
]
```

Alternatively, set the `CI=true` environment variable to automatically add these flags.

## License
MIT

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [sonesuke](https://github.com/sonesuke)
- **Source:** [sonesuke/google-patent-cli](https://github.com/sonesuke/google-patent-cli)
- **License:** MIT
- **Homepage:** https://sonesuke.github.io/google-patent-cli/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: flagged — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-sonesuke-google-patent-cli
- Seller: https://agentstack.voostack.com/s/sonesuke
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
