Skip to content

IPKit as Your Data Layer

IPKit is an MCP (Model Context Protocol) server that normalizes intellectual property data from 10 trademark, design, and patent offices into a consistent schema. You can use it as a data layer for legal tech products, integrate it into AI agent workflows, or extend it with new jurisdictions.

┌─────────────────────────────────────────────────────┐
│ AI Client (Claude Desktop / ChatGPT / Your App) │
└──────────────────────┬──────────────────────────────┘
│ MCP Protocol (stdio or HTTP)
┌──────────────────────▼──────────────────────────────┐
│ IPKit MCP Server │
│ ┌────────────┐ ┌──────────────┐ ┌─────────────┐ │
│ │ Tool Layer │ │ Schema Layer │ │ Analytics │ │
│ │ (27 tools) │ │ (Zod + JSON) │ │ (metrics) │ │
│ └─────┬──────┘ └──────────────┘ └─────────────┘ │
│ │ │
│ ┌─────▼────────────────────────────────────────┐ │
│ │ Provider Registry │ │
│ │ USPTO │ EUIPO │ IP Australia │ IPONZ │ WIPO │ │
│ │ UKIPO │ CIPO │ JPO │ CNIPA │ EPO │ │
│ └──────────────────────────────────────────────┘ │
│ ┌───────────┐ ┌──────────────┐ ┌─────────────┐ │
│ │ Cache │ │ Rate Limiter │ │ OAuth Pool │ │
│ └───────────┘ └──────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────┘

Key design decisions:

  • Provider pattern: Each jurisdiction implements a TrademarkProvider interface with search(), getDetails(), and getStatus() methods. Designs and patents have separate client/transformer pairs (they are different IP domains with different identifiers and classifications).
  • Three-state singletons: Provider services use undefined (unchecked) / null (not configured) / instance (ready). Tools check for null and return a clear configuration error.
  • Schema normalization: Raw API responses are transformed into Zod-validated schemas (TrademarkSummary, TrademarkDetail, DesignSummary, PatentSummary, etc.). Consumers always get a consistent shape regardless of source jurisdiction.
  • Transport agnostic: The same server instance runs over stdio (Claude Desktop), HTTP (programmatic access), or SSE (ChatGPT).

Clone the repository and build:

Terminal window
git clone https://github.com/ip-kit/core.git
cd core
npm install
npm run build # Produces dist/index.js (~1.6 MB self-contained ESM bundle)

The built dist/index.js runs anywhere Node 20+ exists, with no node_modules required.

{
"mcpServers": {
"ipkit": {
"command": "node",
"args": ["/path/to/core/dist/index.js"],
"env": {
"USPTO_API_KEY": "your_key",
"EUIPO_CLIENT_ID": "your_id",
"EUIPO_CLIENT_SECRET": "your_secret",
"IPAUSTRALIA_CLIENT_ID": "your_id",
"IPAUSTRALIA_CLIENT_SECRET": "your_secret",
"EPO_CONSUMER_KEY": "your_key",
"EPO_CONSUMER_SECRET": "your_secret"
}
}
}
}

IPKit starts with whatever providers have valid credentials. Missing credentials disable that provider gracefully — tools return a clear error message rather than crashing.

VariableProviderRequired
USPTO_API_KEYUSPTO (US trademarks)For US search
EUIPO_CLIENT_IDEUIPO (EU trademarks, designs, G&S)For EU search
EUIPO_CLIENT_SECRETEUIPOFor EU search
IPAUSTRALIA_CLIENT_IDIP Australia (AU trademarks, designs, patents)For AU search
IPAUSTRALIA_CLIENT_SECRETIP AustraliaFor AU search
IPONZ_API_KEYIPONZ (NZ trademarks)For NZ search
EPO_CONSUMER_KEYEPO OPS (European patents)For EP search
EPO_CONSUMER_SECRETEPO OPSFor EP search

WIPO, UKIPO, CIPO, JPO, and CNIPA do not require credentials (public/scraped APIs).

VariableDefaultDescription
TRANSPORTstdioTransport mode: stdio, http, or chatgpt
HTTP_PORT3000Port for HTTP transport
HTTP_HOST127.0.0.1Bind address for HTTP transport
API_KEYS(none)Comma-separated API keys for HTTP authentication
API_KEYS_CONFIG(none)Path to JSON file with per-key configuration
ADMIN_API_KEY(none)Admin key for metrics and management endpoints
VariableDefaultDescription
ENABLE_USPTOtrueEnable/disable individual providers
CACHE_TTL_SEARCH300Search result cache TTL in seconds
CACHE_TTL_STATUS3600Status result cache TTL in seconds
LOG_LEVELinfodebug, info, warn, error
ANALYTICS_ENABLEDtrueEnable in-memory analytics collection

See the Configuration Reference for the complete list.

For programmatic access (no AI assistant needed), run IPKit in HTTP mode:

Terminal window
TRANSPORT=http HTTP_PORT=3000 API_KEYS=sk-my-key node dist/index.js

The server exposes a single MCP endpoint at POST /mcp plus a metrics endpoint at GET /metrics.

The HTTP transport uses the MCP protocol over HTTP. Send JSON-RPC requests to /mcp:

Terminal window
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-my-key" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "trademark_search",
"arguments": {
"query": "CloudBooks",
"jurisdiction": "US",
"searchType": "name",
"maxResults": 10
}
}
}'
Terminal window
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-my-key" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
}'

The response includes the JSON Schema for each tool’s input parameters.

IPKit exposes 27 tools organized by IP domain:

ToolDescription
trademark_searchSearch across 9 jurisdictions by name, owner, number, or fuzzy similarity
trademark_statusFull details for a specific trademark
trademark_clearanceComprehensive conflict analysis with similarity scoring and risk assessment
distinctiveness_hintsEvaluate inherent distinctiveness on the legal spectrum
ToolDescription
nice_class_lookupLook up class details by number or keyword
suggest_nice_classesRecommend classes from a business description
generate_gs_specificationDraft filing-ready specifications (US/EU/WIPO formats)
validate_gs_termsValidate terms against the EUIPO Harmonised Database
translate_gs_termsTranslate terms across 23 EU languages via HDB
ToolDescription
eu_design_searchSearch EU Community Designs (Locarno classification)
eu_design_statusFull details for an EU design
au_design_searchSearch Australian designs
au_design_statusFull details for an AU design
ToolDescription
au_patent_searchSearch Australian patents (IPC classification)
au_patent_statusFull details for an AU patent
ep_patent_searchSearch 130M+ European patents via EPO OPS
ep_patent_statusFull details for an EP patent
patent_family_searchWorldwide patent family members via INPADOC
ToolDescription
eu_person_lookupSearch EUIPO applicants and representatives
eu_applicant_portfolioUnified IP portfolio across EU trademarks and designs
ToolDescription
create_watchMonitor a trademark for status changes, similar filings, or deadlines
list_watches / manage_watchList, pause, resume, or delete watches
get_watch_events / acknowledge_eventsRetrieve and manage watch events
register_webhook / manage_webhookRegister and manage webhook endpoints
get_delivery_logView webhook delivery history
portfolio_analyticsAggregate health score across all watches

See the Tool Reference for full parameter schemas and response shapes.

All trademark tools return normalized schemas defined in Zod:

  • TrademarkSummary — compact result from search (id, name, jurisdiction, status, Nice classes, owner, dates)
  • TrademarkDetail — full result from status lookup (adds G&S specification, history, priority claims, representative info)
  • DesignSummary / DesignDetail — design equivalents (Locarno classes instead of Nice)
  • PatentSummary / PatentDetail — patent equivalents (IPC classification, inventors, patent family)

IDs are formatted as {JURISDICTION}-{applicationNumber} (e.g., US-87654321, EU-018901234).

See the Schema Reference for complete type definitions.

IPKit caches responses in memory (or on disk if CACHE_DIR is set):

Cache TypeDefault TTLOverride
Search results5 minutesCACHE_TTL_SEARCH
Status lookups1 hourCACHE_TTL_STATUS
Classification data24 hoursCACHE_TTL_CLASS

Set any TTL to 0 to disable caching for that category.

Each provider has an independent rate limiter. Defaults are conservative:

ProviderDefault (req/min)Override
USPTO60USPTO_RATE_LIMIT
EUIPO60EUIPO_RATE_LIMIT
IP Australia500IPAUSTRALIA_RATE_LIMIT
IPONZ60IPONZ_RATE_LIMIT
EPO30EPO_RATE_LIMIT
WIPO, UKIPO, CIPO, JPO, CNIPA30{PROVIDER}_RATE_LIMIT

When a rate limit is hit, requests queue and wait rather than failing. The withRetry() wrapper handles transient HTTP errors with exponential backoff.

EUIPO, IP Australia, and EPO use OAuth2 client-credentials flow. Tokens are cached by provider and automatically refreshed on expiry. In HTTP mode, OAuth tokens are pre-warmed at server startup to reduce first-request latency.

IPKit is designed to be extended with additional jurisdictions. Each provider needs:

  1. types.ts — Native API response types
  2. client.tsTrademarkProvider implementation with search(), getDetails(), getStatus()
  3. transformer.ts — Normalize API responses to IPKit schemas
  4. Registration in src/providers/index.ts and src/schemas/common.ts

See Adding a Provider for the full walkthrough with code examples.

src/
├── index.ts # Entry point, transport selection
├── server.ts # MCP server, tool registration
├── config.ts # Environment config (Zod-validated)
├── providers/ # One directory per jurisdiction
├── schemas/ # Zod schemas (trademark, design, patent)
├── tools/ # Tool implementations (one file per tool)
├── transport/ # stdio and HTTP transports
├── cache/ # Memory and file cache
├── analytics/ # In-memory metrics collection
├── keys/ # API key store, quotas, rate limiting
├── errors/ # TrademarkError, ErrorCode enum
└── utils/ # Rate limiter, retry, similarity, phonetics
Terminal window
npm run build # Build self-contained bundle (dist/index.js)
npm run typecheck # TypeScript type checking
npm test # Run vitest tests
npm run ci # Full CI pipeline (typecheck + lint + test + build)
npm run dev # Dev mode (stdio transport via tsx)
npm run dev:chatgpt # Dev mode (HTTP/ChatGPT transport)

For more on the architecture, see Architecture Overview and Transport Layer.