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.
description_paragraphs and claims.--limit option.--before and --after.--country (e.g., JP, US, CN).--language (e.g., ja, en).--raw flag for debugging.--head to show the browser.Linux & macOS:
curl -fsSL https://raw.githubusercontent.com/sonesuke/google-patent-cli/main/install.sh | bash
Note: On Linux, this installs to
~/.local/binwithout requiringsudo. Make sure~/.local/binis in yourPATH.
Windows (PowerShell):
irm https://raw.githubusercontent.com/sonesuke/google-patent-cli/main/install.ps1 | iex
If you have Rust installed, you can build from source:
cargo install --path .
google-patent-cli supports the Model Context Protocol, allowing AI agents (like Claude Desktop) to search and fetch patents directly.
| 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 |
To start the MCP server over stdio:
google-patent-cli mcp
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"google-patent-cli": {
"command": "/path/to/google-patent-cli",
"args": ["mcp"]
}
}
}
| 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 for patents matching a query.
google-patent-cli search --query "machine learning" --limit 10
google-patent-cli search --query "AI" --assignee "Google"
# 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 a single patent’s metadata, description, and claims.
google-patent-cli fetch US9152718B2
Fetch or search using a specific language locale.
google-patent-cli fetch US9152718B2 --language ja
Prints the full HTML source instead of structured JSON.
google-patent-cli fetch US9152718B2 --raw > patent.html
Useful for debugging.
google-patent-cli search --query "AI" --head
This tool relies on a compatible Chrome/Chromium installation for scraping.
You can manage the configuration via CLI:
# Show current configuration and config file path
google-patent-cli config
# Set custom browser path
google-patent-cli config --set-browser "/path/to/chrome"
The configuration file is located at:
~/.config/google-patent-cli/config.toml%APPDATA%\google-patent-cli\config.tomlYou can manually edit the TOML file to configure additional Chrome arguments:
# 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"
]
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:
chrome_args = [
"--no-sandbox",
"--disable-setuid-sandbox",
"--disable-gpu"
]
Alternatively, set the CI=true environment variable to automatically add these flags.
MIT