
jp-gateway
io.github.jp-gateway/jp-gateway
Deterministic Japan data & x402 hub: Wareki, business days, JMA quakes, invoices, addresses.
Documentation
JP Gateway (jp-gateway.dev)
Deterministic Japan Data, Verification & Execution Gateway for AI Agents.
Zero-hallucination Japanese legal, fiscal, postal, and real-time disaster intelligence delivered via Remote MCP and x402 (pay-per-request USDC on Base)—with zero account signup, zero API keys, and cryptographic audit receipts on every call.
- Production Gateway:
https://jp-gateway.dev - Remote MCP Endpoint:
https://jp-gateway.dev/mcp(Streamable HTTP / JSON-RPC 2.0) - MCP Discovery Manifest:
https://jp-gateway.dev/.well-known/mcp.json - LLM Catalog:
https://jp-gateway.dev/llms.txt
Why AI Agents Use JP Gateway
LLMs routinely hallucinate Japanese public holidays (substitute holidays & Citizens' Holidays), Japanese Qualified Invoice (インボイス制度) tax rounding rules, Japanese postal-to-English shipping formats, and live seismic events. JP Gateway replaces probabilistic guessing with deterministic code and official Japanese primary sources.
- Zero Signup / Pay-Per-Call (x402): Agents pay micro-amounts ($0.02–$0.05 USDC) autonomously per request.
- Token-Saver Mode (
?compact=1): Append?compact=1to any endpoint to strip verbose metadata and cut output tokens by ~70%. - Cryptographic Audit Receipt (
audit_receipt): Every response includes UTC/JST timestamps, payload SHA-256, and an HMAC-SHA256 server signature for enterprise audit trails. - Prompt-Injection Boundary: Explicit
data_boundarytags isolate raw data from agent instructions.
Quick Connect: Remote MCP (Claude Desktop / Cursor / MCP Clients)
Add jp-gateway to your MCP client configuration:
{
"mcpServers": {
"jp-gateway": {
"url": "[https://jp-gateway.dev/mcp](https://jp-gateway.dev/mcp)"
}
}
}
Exposed MCP Tools
jp_wareki_convert(Free) — Western year to Japanese Era (Wareki) & Japanese Fiscal Year (April–March).jp_business_day_check(Free) — Japanese national holidays, substitute holidays, Citizens' Holidays, Banking Act year-end holidays, and next bank business day.jp_x402_paid_catalog(Free) — Live pricing and endpoint schemas for paid x402 tools.jp_disaster_latest(Paid x402: $0.03) — Real-time Japan Meteorological Agency (JMA) earthquake feed.jp_invoice_verify(Paid x402: $0.05) — Japanese Qualified Invoice validator & consumption tax engine.jp_address_normalize(Paid x402: $0.02) — Japanese postal code verification & English shipping label formatter.
HTTP API Endpoints
Free Utility Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /free/status | Gateway health, security posture, and active network |
GET | /free/wareki?year=2026 | Japanese Era (Reiwa) & Fiscal Year conversion |
GET | /free/business-day?date=2026-09-22 | Japanese holiday & bank business day check + next business day |
Paid x402 Endpoints (USDC on Base)
| Method | Endpoint | Price | Description |
|---|---|---|---|
GET | /paid/disaster/latest?limit=5&min_magnitude=3.0 | $0.03 | Real-time JMA earthquake reports normalized to English JSON with coordinates, Shindo intensity, and supply-chain alert level |
POST | /paid/invoice/verify | $0.05 | Verifies T+13-digit NTA registration check digit, legal fields, and exact 10%/8% tax rounding once per rate |
GET | /paid/address/normalize?postal_code=100-0001&street=1-1 | $0.02 | Verifies Japanese postal code and outputs Kanji, full-width Kana, JIS/ISO-3166-2 codes, and international shipping format |
Example: Calling Paid Endpoints with x402-fetch
import { wrapFetchWithPayment } from "x402-fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
const fetchWithPayment = wrapFetchWithPayment(fetch, account);
const res = await fetchWithPayment(
"[https://jp-gateway.dev/paid/address/normalize?postal_code=100-0001&street=1-1&compact=1](https://jp-gateway.dev/paid/address/normalize?postal_code=100-0001&street=1-1&compact=1)"
);
console.log(await res.json());
Data Attribution & License
- Seismic data sourced from the Japan Meteorological Agency (JMA) under the Government of Japan Standard Terms of Use (CC BY 4.0 compatible).
- Calendar & tax rules implemented from Japanese statutory ordinances (Public Holidays Act, Banking Act Enforcement Order, National Tax Agency Qualified Invoice rules).
No installation packages available.