IP-MCP: Instructions file for Claude Code

CLAUDE.md

IP-MCP CLAUDE.md is an instructions file for Claude Code from kitepon/IP-MCP. It costs 3,124 tokens per session, scanned B, original, MIT.

A project instruction document for Claude Code, covering the current state, goals, architecture rules, deployment setup, and development plans. Claude Code reads this kind of file to understand how to work in the repository.

In plain words
What is it for?
Use it to document a patent-information service, its tools, authentication, deployment path, tests, completed phases, and future features.
Why use it?
It gives the coding agent project-specific context and boundaries, reducing guesses about the system and its unfinished work.

Instructions file for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is kitepon/IP-MCP's own configuration. It tells Claude Code how to work on IP-MCP itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything IP-MCP configures →

Reuse

Borrowing it

Nothing to install: this file belongs to kitepon/IP-MCP. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kitepon/IP-MCP/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/kitepon/IP-MCP

Made for: Claude Code.

Wrote 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.

agentmods badge for IP-MCP CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/kitepon/ip-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/kitepon/ip-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/kitepon/ip-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/kitepon/ip-mcp/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.

agentmods 80×15 button for IP-MCP CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/kitepon/ip-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/kitepon/ip-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,124 This file is loaded in full into every session.
When invoked 3,124 The same file — it is already loaded in full.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.03124 $0.03124
Opus 5.5 $0.01250 $0.01250
Sonnet 5.5 $0.00625 $0.00625
Haiku 4.5 $0.00312 $0.00312

Measured 2mo ago against content hash 88628fe337ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

IP-MCP CLAUDE.md scanned grade B 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 2mo 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

JPO 認証情報はデプロイホストの `~/ip-mcp/.env`(`chmod 600`)にのみ置く。Git にコミットしない。`.gitignore` で `.env` / `cache/` / `logs/` を除外する。
CLAUDE.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

現状

Phase 1A / 1B / 1.x 完了済(2026-05-01 時点)。リポジトリには動作する実装が入っている:

  • src/ip_mcp/tools_official/ — 12 ツール (番号変換 / 経過情報 / 登録 / 引用 / 関連出願 / 出願人 / 書類 / J-PlatPat URL / OPD / 全件取得)
  • src/ip_mcp/tools_external/ — 1 ツール (Google Patents キーワード検索、独立実装)
  • src/ip_mcp/auth/ — OAuth 2.1 サーバー (DCR + PKCE + マスターパスワード認可、SqliteOAuthProvider で SQLite 永続化)
  • Dockerfile / docker-compose.yml — ./cache, ./logs, ./data の 3 ボリューム
  • tests/ — 45 テスト、全緑

公開構成: ipmcp.<domain> → Cloudflare Edge → Cloudflare Tunnel (cloudflared が自宅から outbound) → Caddy (CF Origin Cert で end-to-end TLS) → <DEPLOY_HOST>:8765 → Docker コンテナ。CF Tunnel が outbound 接続でエッジに繋がる方式のため、ホームルーターのポート開放もヘアピン NAT 回避も不要。LAN 内/外を問わず CF エッジ経由で同じ URL に届く。

Phase 1.5 完了: OAuth 永続化 / ヘアピン NAT 回避 / アクセスログ JSONL (logs/access.jsonl) + 集計スクリプト (scripts/summarize_logs.py) / マスターパスワード rotate 手順 (OPERATIONS.md)。 Phase 2 (未着手): 拒絶理由通知書 PDF 構造化、AI レビューパイプライン、EPO OPS / WIPO PATENTSCOPE 補完。

PLAN.md は設計計画書として継続維持中(§11 段階表に進捗、§12 リスク表で完了済リスクを取り消し済)。

GitHub: https://github.com/kitepon-rgb/IP-MCP (public、これが正規リモート)

このプロジェクトが目指すもの

特許庁の公式「特許情報取得API」(基底 https://ip-data.jpo.go.jp) を包む Python 製 MCP (Model Context Protocol) サーバー を作り、LLM クライアントから呼べるようにする。<DEPLOY_HOST>(自宅 LAN, SSH ユーザー <SSH_USER>)の Docker 上で常駐させ、Claude Desktop / Claude Code から HTTP+SSE で利用する。

譲れないアーキテクチャ規則

ユーザーから明示的に指示された方針。これを破ったら退行 (regression)。逸脱の前に必ず質問すること。

  1. データソース間の暗黙のフォールバック禁止。公式 JPO API の呼び出しが失敗 (not_found / レート上限 / 一時障害) しても、Google Patents 等の外部ソースに自動で切り替えてはならない。失敗は失敗としてそのまま返し、別ツールを呼ぶかどうかは LLM 側に判断させる。
  2. ツールは完全に分離された 2 カテゴリに分ける:
    • tools_official/ — 公式 JPO API を叩く。ツール名は jpo_* で始める。レスポンスは {"source": "jpo_official", ...}。
    • tools_external/ — 非公式ソース (キーワード検索用の Google Patents XHR 等) を叩く。ツール名は external_* で始める。レスポンスは {"source": "google_patents_unofficial", ...}。
    • tools_official/ から tools_external/ への import は禁止(逆も同様)。これは完了基準として強制する。
  3. 同一ツール内で許される再試行は次の 2 つだけ: 401/期限切れ時のトークン再取得、JPO の statusCode 303(一時的な高負荷)に対する指数バックオフ。どちらも同一データソース内に閉じる。
  4. すべてのツール description は冒頭に Source: 行を必ず置き、データの出所が公式か非公式かを LLM が判別できるようにする。レスポンスペイロードにもトップレベルに source フィールドを必ず含める。

Read the full file on GitHub · 110 lines

Changes

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.

  1. 2mo ago First seen · 110 lines · 3,124 tokens per session scan B 88628fe337ed

Subscribe to this mod's changes

IP-MCP CLAUDE.md is an instructions file published in the GitHub repository kitepon/IP-MCP (0 stars, last pushed 11d ago), licensed MIT. It adds 3,124 tokens to every session, about $0.0125 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

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).

microsoft/vscode · 9,715 tokens

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.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

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.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens