Borrowing it
Nothing to install: this file belongs to riemannzeta/patent_mcp_server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/riemannzeta/patent_mcp_server/main/CLAUDE.mdgit clone --depth 1 https://github.com/riemannzeta/patent_mcp_serverWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/riemannzeta/patent_mcp_server/claude-md)<a href="https://agentmods.dev/instructions/riemannzeta/patent_mcp_server/claude-md"><img src="https://agentmods.dev/badge/instructions/riemannzeta/patent_mcp_server/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/riemannzeta/patent_mcp_server/claude-md"><img src="https://agentmods.dev/badge/instructions/riemannzeta/patent_mcp_server/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02392 | $0.02392 |
| Opus 5 | $0.01196 | $0.01196 |
| Sonnet 5 | $0.00478 | $0.00478 |
| Haiku 4.5 | $0.00239 | $0.00239 |
Grade C, and why
patent_mcp_server CLAUDE.md scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
4. Build: `rm -rf dist/ && uv run python -m build` How it starts
The opening of the file, as written. The whole thing — 188 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md - Development Guidelines for USPTO Patent MCP Server
This file provides guidance for Claude Code and other AI assistants working on this project.
Project Overview
This is a Model Context Protocol (MCP) server that provides access to USPTO patent and trademark data through multiple APIs. The server is built with FastMCP and uses async/await patterns throughout. Published to PyPI as patent-mcp-server.
Transports: stdio by default (Claude Desktop/Code), or --transport streamable-http for remote hosting. HTTP mode is stateless by default so it scales across workers without session affinity. Two things to know before touching the server lifecycle:
- Do not move client shutdown into a FastMCP
lifespan. In stateless HTTP mode the low-level server is entered once per request, so a lifespan would close the nine httpx clients after the first tool call. Shutdown lives inserve()inpatents.py, inside the same event loop the clients were opened on. PpubsClientholds an upstream USPTO session (cookie jar,case_id, access token) shared by all concurrent calls. Session setup is serialized by_session_lock; the access token is passed per request rather than stored on the shared client's default headers. Keep it that way — see the concurrency tests intest/unit/test_ppubs_client.py.
Current state (v1.1.0): 61 registered tools, 36 active, 25 unavailable due to API shutdowns:
- Active: PPUBS (5), ODP (12), PTAB (7), TSDR (4), Trademark search/assignments (3), Utility (5)
- Unavailable: PatentsView (14, shut down March 2026), Office Actions (4, decommissioned early 2026), Enriched Citations (3, decommissioned early 2026), Litigation (4, not offered on ODP — issue #16)
Trademark backend contracts (verified live 2026-06-10):
- tmsearch (
tmsearch_client.py):POST tmsearch.uspto.gov/prod-stage-v1-0-0/tmsearch, Elasticsearch-style body, non-standard response envelope (hits.totalValue, hitsource/id). No key; behind AWS WAF (currently permissive —TMSEARCH_WAF_TOKENsupported as escape hatch). Class filters need zero-padded 3-digit terms ("025"). - Assignments (
tm_assignment_client.py):POST assignmentcenter.uspto.gov/ipas/search/api/v2/public/trademark/exportTradeMarkDatawithsearchCriterialist; no key. The legacy assignment-api.uspto.gov died with the Developer Hub on June 5, 2026. - TSDR (
tsdr_client.py): requires a TSDR-specific key from account.uspto.gov/profile/api-manager — the ODP key passes the gateway but 404s on the backend (BACKEND RESPONSE STATUS: 404); the client detects this and explains. Status uses/info+Accept: application/json; the document list at/casedocs/{caseid}/infois XML-ONLY (406 on JSON Accept) and is parsed via_parse_document_list_xml. Binary bundles are capped atTrademarkDefaults.MAX_BINARY_BYTES(full wrappers can exceed 10 MB) — filter bydocument_type/date. All endpoints verified live 2026-06-10 with a real TSDR key.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 188 lines · 2,392 tokens per session scan C fd98b160084f
patent_mcp_server CLAUDE.md is an instructions file published in the GitHub repository riemannzeta/patent_mcp_server (78 stars, last pushed 8d ago), licensed MIT. It adds 2,392 tokens to every session, about $0.0120 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.