USPTO MCP Server for Patent and Trademark Data
Access USPTO patent and trademark data via the MCP server using the Open Data Protocol (ODP) API for fast, programmatic queries and downloads.
npx -y @riemannzeta/patent_mcp_serverOverview
The USPTO MCP Server is a lightweight service that exposes United States Patent and Trademark Office (USPTO) data through a Model Context Protocol (MCP) compatible API. It acts as a programmatic gateway to the USPTO Open Data Protocol (ODP) endpoints, providing consistent, fast access to patent and trademark records, metadata, and download links. For developers building search tools, analytics pipelines, or integrations that need reliable access to bulk or filtered USPTO datasets, the MCP server simplifies querying and retrieval.
This server is intended to be run locally or deployed in cloud environments as a self-hosted API. It focuses on predictable responses, pagination support, download management, and a small set of configuration options so you can integrate USPTO data into applications, data pipelines, or research workflows without interacting directly with the raw ODP endpoints each time. The source code and installation instructions are available on GitHub: https://github.com/riemannzeta/patent_mcp_server.
Features
- Programmatic access to USPTO patent and trademark datasets via MCP-compatible endpoints
- Proxying and normalization of USPTO ODP responses for consistent fields and formats
- Pagination, filtering, and sorting for query endpoints
- Bulk download endpoints for full-record retrieval and archive files
- JSON (default) and optional CSV output formats for easier analysis
- Configurable caching and request throttling to reduce load on upstream ODP services
- Health checks and basic metrics for deployment monitoring
- Simple deployment using Docker or a Python environment
Installation / Configuration
Clone the repository and run locally, or use Docker for quick deployment.
Clone repository:
Python (virtualenv) installation:
# example run (adjust module name if different)
Docker:
# build and run
Environment configuration (example .env):
PORT=8080
DATA_DIR=/data
CACHE_TTL=3600 # seconds to cache upstream responses
LOG_LEVEL=info
ODP_BASE_URL=https://developer.uspto.gov/odm/odm-search-api
RATE_LIMIT=10 # max upstream requests per second
Notes:
- The server proxies requests to the USPTO ODP endpoints; you do not always need an API key, but follow USPTO usage terms and rate limits.
- Configure DATA_DIR for any bulk download staging or caching needs.
- Use a reverse proxy (nginx) and TLS in production.
Available Resources
The server exposes a compact set of HTTP endpoints for common workflows. Exact paths may vary; consult the repository for the canonical route names.
| Endpoint | Purpose | Key query parameters |
|---|---|---|
| /v1/patents | Search patent records | q, page, per_page, sort, format (json/csv) |
| /v1/trademarks | Search trademark records | q, page, per_page, sort, format |
| /v1/records/{id} | Retrieve a single record by USPTO ID | format |
| /v1/download | Request bulk download (bundle or file URL) | id, type (patent |
| /v1/metadata | Get dataset metadata and schema | - |
| /health | Liveness/Readiness checks | - |
| /metrics | Basic usage metrics (if enabled) | - |
Example query parameters:
- q: full-text or fielded query (e.g., q=assignee:“Acme Corp”)
- page, per_page: pagination controls
- format: json (default) or csv for tabular export
Use Cases
- Programmatic patent search from a web app
- Use the /v1/patents endpoint to power autocomplete and search results.
- Example curl:
- Bulk data download for analytics
- Request bulk archives or individual record dumps via /v1/download and store them in DATA_DIR for batch processing.
- Example (download a file URL returned by the server):
- Data ingestion pipeline
- Periodically query /v1/metadata to identify new releases, then fetch changed records using /v1/patents with date filters. Cache results locally and update your analytics store.
- Integration into a knowledge graph or LLM context pipeline
- Use /v1/records/{id} to fetch normalized JSON for a single patent or trademark, then transform into the desired graph or embedding pipeline.
Tips for Developers
- Start by running the server locally and test endpoints with curl or Postman. Confirm pagination and format outputs before integrating into production.
- Enable caching in environments where upstream rate limits are a concern. CACHE_TTL reduces repeated upstream calls for identical queries.
- If deploying in Kubernetes, wrap the server in a horizontal auto-scaler and use a shared volume for DATA_DIR when doing bulk downloads.
- Inspect logs (LOG_LEVEL) and /metrics to monitor request patterns and tune rate limiting.
For the latest source, issues, and contribution guidance, see the GitHub repository: https://github.com/riemannzeta/patent_mcp_server.